surf_intersect.py 348 B

12345678910111213
  1. """Intersection of two polygonal meshes"""
  2. from vedo import *
  3. settings.use_depth_peeling = True
  4. car = Mesh(dataurl+"porsche.ply").alpha(0.2)
  5. line = [(-9.,0.,0.), (0.,1.,0.), (9.,0.,0.)]
  6. tube = Tube(line).triangulate().c("violet",0.2)
  7. contour = car.intersect_with(tube).linewidth(4).c('black')
  8. show(car, tube, contour, __doc__, axes=7).close()