Page 1 of 1

Boolean operations with 3D meshes

Posted: Wed Apr 23, 2014 4:18 am
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 22288 times

Re: Boolean operations with 3D meshes

Posted: Wed Apr 23, 2014 6:52 am
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 ;)

Re: Boolean operations with 3D meshes

Posted: Tue May 06, 2014 1:48 pm
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.

Re: Boolean operations with 3D meshes

Posted: Tue May 06, 2014 2:13 pm
by daniel
I'll add this to the TODO list. Can't say when it will show up however!

Re: Boolean operations with 3D meshes

Posted: Thu Oct 02, 2014 8:23 pm
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.

Re: Boolean operations with 3D meshes

Posted: Sat Jan 14, 2017 7:31 pm
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.

Re: Boolean operations with 3D meshes

Posted: Sun Jan 15, 2017 8:56 am
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 ;).