Any good CSG lib?

Does anyone know of any good, easy-to-use CSG lib out there?
In a first step I just want to subtract (difference) a sphere from a box.
Preferably a lib that could easily be integrated into Urho3D.

Have a look at PyMesh. It’s a python wrapper over a number of such C++ libraries. Check the docs. Integration should be easy as every of them is managed as cmake project.

EDIT: possibly CSG afaik are carve and cork.

Can I hijack your topic and ask for good C or C++ CSG library with permissive license (like MIT, BSD, Zlib)?
Bad library with above conditions are fine too though…

You could use the godot implementation.
I’m also looking for a csg library for a near future…

article : Godot gets CSG support

code : godot csg module


Thanks for the pointers!

I also found this javascript lib:

And a C# port of it:

I’m thinking of giving the C# lib a try (because I’m using C# with UrhoSharp).

I think that blender uses carve

1 Like

I experimented with cpp port of csgjs:
But csgjs is slow, you most likely do not want to use that code. I would work on porting godot’s implementation. It is so much faster.