Issues with Combine models module

Hello 3DSlicer community !

I’ve been experiencing weird behaviors with the Combine models module, as it sometimes returns an empty mesh and I can’t figure out why as it sometimes does work.

I’m trying to compute the intersection of those two blue cones, into the white volume.

For the bigger picture, I’m trying to optimize the placement of robotic arms to avoid collision using the volume of the intersection as a part of my optimization formula.

Can someone help me figure out what’s happening and what I can do ?

Thank you for your attention and have a good day !

PS : It looks like the sandbox extension is no longer available

It is practically impossible to implement binary operations on polygonal meshes that works on ill-shaped polygons. When cones are meshed in a trivial way, they tend to have extremely elongated triangles, therefore binary operations can easily fail. vtkConeSource creates such a trivial mesh because the main use is just visualization.

One simple option is reduce the resolution of the cone along the circumference, but if the resolution is lowered too much then the cone will appear faceted, which may not be acceptable. You can improve the triangle shapes while keeping the smooth appearance by remeshing the cone source output - maybe subdivide filter followed by quadric decimation would work.

The extension is available for latest stable and preview releases, on all platforms. If you don’t see it on your computer then check out this page.

1 Like

Thank you for your answer !
Hmm, I see the problem, I’ll try to do what you suggested.

I’ll also update to the latest version for Slicer, I’m on 5.1.0 2022-05-04 right now