Mesh.boolean does not show the correct intersection with recoSurface mesh.
See original GitHub issueI generated a mesh from a pointcloud. When trying to intersect it with a sphere i get the results shown in (picture 1). If I however intersect two vedo spheres it shows the correct intersection (picture 2).
Do you have any idea why my code isnt working? Thanks in advance.
Im using Vedo 2022.01.
from vedo import *
pointcloud_points = Points(hullpoints3d)
pointcloud_points.clean(tol=0.01).legend("smooth cloud")
reco = recoSurface(pointcloud_points, dims=(200,200,200), radius=0.15, holeFilling=True, pad=3).legend("surf. reco")
print("Volume of reconstructed reachability maps 3D-Mesh:")
print(reco.volume())
pts0 = Points(hullpoints3d, r=10).legend("reachability map")
sphere = vedo.shapes.Sphere(pos=(-0.2, -0.2, -0.2), r=0.75, c='r5', alpha=1, res=24, quads=False)
sphere2 = vedo.shapes.Sphere(pos=(0, 0, 0), r=0.75, c='r5', alpha=1, res=24, quads=False)
intersection = reco.boolean("intersect", sphere)
intersection2 = sphere.boolean("intersect", sphere2)
print("The reconstructed mesh is closed: ")
print(reco.isClosed())
print("Intersection volume is: ")
print(sphere.volume() - intersection.volume())
plt = Plotter(shape=(2, 2), interactive=False, axes=3)
plt.show(pts0, "Reach_points", at=0)
plt.show(reco, "Reach_mesh", at=1)
plt.show(sphere, reco, "Sphere", at=2, resetcam=False)
plt.show(intersection, "Intersection", at=3, resetcam=False)
#plt.show(Sphere, "Sphere1", at=0)
#plt.show(Sphere2, "Sphere2", at=1)
#plt.show(Sphere, Sphere2, "sphere", at=2, resetcam=False)
#plt.show(Intersect1, "intersection", at=3, resetcam=False)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
The Boolean modifier is not working - Blender Stack Exchange
If the modified Mesh has inverted normals, Blender will intersect the target Mesh. If both Meshes use inverted normals, Blender will add both...
Read more >Boolean modifier problems and how to solve them
Avoid very slight intersections. Also, avoid edges moving alongside each other just a short distance apart. Booleans work best when the meshes don't...
Read more >5 fixes for Exact Boolean problems in Blender - YouTube
Having problems with Booleans in Blender? ... 5 fixes for Exact Boolean problems in Blender: Most don't know #2! ... Show more. Show...
Read more >Mesh Boolean Node — Blender Manual
The Mesh Boolean Node allows you to cut, subtract, and join the geometry of two inputs. This node offers the same operations as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Absolute madlad. Thanks dude the reverse() worked!
It’s because of the orientation of the polygons (rather than the normals) which is interesting… anyways
reverse()
seems to do the job:hullpoints3D.txt