Open mgraugal opened 1 year ago
Vedo installed with pip install -U git+https://github.com/marcomusy/vedo.git
Hi, the boolean operations tend to work only if the original meshes are sufficiently hi-res in terms of triangles and faces. Check out this discussion: https://discourse.vtk.org/t/compute-the-volume-of-the-intersection-between-two-vtkpolydata-objects/8338/4
Thank you very much for your answer! I've just added the triangulate method on the box creation and now it works, although the addition is strange:
Thank you very much for your answer! I've just added the triangulate method on the box creation and now it works, although the addition is strange:
I think that if the faces are exactly in the same plane the algorithm does not work correctly... but it seems to do it right in other cases provided the faces are sufficiently small:
from vedo import Cube, show
c1 = Cube().subdivide(5, method=1).wireframe()
c2 = Cube().subdivide(5, method=1).pos(0.5,0.4,0.3).rotate_x(20).wireframe()
cc = c1.boolean("plus", c2)
show(cc, axes=1)
I've successfully run the example boolean.py, whichs mainly consists on the following lines:
Obtaining the following result:
But when switching from Sphere to other types of shapes (I've tried operation between sphere-cylinder, cylinder-cylinder, cyñinder-box, box, box) the result appears to be always empty.
An example box-box
Any clues why this occurs?
Running on an Ubuntu 18.14 with Intel I7 and nvidia RTX 2060