Boolean operations with 3D meshes

To post any request/idea for new functionalities
Post Reply
vivzqs
Posts: 3
Joined: Wed Apr 23, 2014 4:03 am

Boolean operations with 3D meshes

Post by vivzqs »

Hello !

Would it be possible to add some boolean operations (Union, Difference, Intersection) with meshes.

Thanks :)
boolean
boolean
1.png (37.22 KiB) Viewed 22266 times
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Boolean operations with 3D meshes

Post by daniel »

That's funny because I recently tested at work a very nice library for performing boolean operations on meshes (cork: https://github.com/gilbo/cork).

My only concern is about the 'Cloud' in CloudCompare... CloudCompare is not really a meshing tool. What about MeshLab? Can it do this kind of stuff?

If you convince me that MeshLab can't (properly) do it, I'll integrate Cork in CloudCompare ;)
Daniel, CloudCompare admin
vivzqs
Posts: 3
Joined: Wed Apr 23, 2014 4:03 am

Re: Boolean operations with 3D meshes

Post by vivzqs »

Sorry for my late reply.

I have tried MeshLab that it can do some boolean operations, but the actual effect is not very well. So I really hope this function can be added to CloudCompare. Thanks very much.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Boolean operations with 3D meshes

Post by daniel »

I'll add this to the TODO list. Can't say when it will show up however!
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Boolean operations with 3D meshes

Post by daniel »

Ok, CC has now a CSG-capable plugin based on the Cork library:
http://www.cloudcompare.org/doc/wiki/in ... PluginCork

The latest release (2.6.0) now incorporates this plugin.
Daniel, CloudCompare admin
cosmocompare
Posts: 10
Joined: Sat Jan 14, 2017 6:30 pm

Re: Boolean operations with 3D meshes

Post by cosmocompare »

Hi all, thanks for all the incredible work invested in CloudCompare.

I was suprised that the boolean operations code is only for mesh!!!

It's a lot easier to do boolean when there are no triangles to thing about, that is the entire difficulty of CSG for spheres and simple objects. I expect that a CSG for a 1 million vertex mesh will completely crash the PC!!!

I may have to program my own version of boolean because i have to delete spheres and cubes from lots of stuff. and spheres and cubes are easy, they just compare every point to distance from N in space and delete anything closer to cut a sphere out, and the same is similar using cubes with math.max functions.

Perhaps it's very easy to code CSG for clouds using mesh, i don't know how they figure out inner volume, it must be very easy because there are only points to delete, you wouldn't even have to rewrite the normals of the points because the poisson mesh can find the space afterwards.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Boolean operations with 3D meshes

Post by daniel »

Indeed, it's very simple to do boolean operations between a cloud and a mesh in one way. You can even do it directly with CC: compute the distances and then use the 'SF > Filter by value' tool to keep the points inside or outside. Of course it requires a bit more tinkering that the qCork plugin.

And in the other way, you'll face the issue of finding what is 'inside' the cloud as you guessed. And that's really hard :D.

By the way, the qCork plugin is simply a portage of the Cork library (this is why it exists, we didn't have to develop anything ;).
Daniel, CloudCompare admin
Post Reply