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.
Any good CSG lib?
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…
Thanks for the pointers!
I also found this javascript lib:
https://evanw.github.io/csg.js/
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
I experimented with cpp port of csgjs: https://github.com/rokups/Urho3D/commits/feature/CSG
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.