Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrote an alternative #41

Open
reduz opened this issue May 6, 2018 · 11 comments
Open

Wrote an alternative #41

reduz opened this issue May 6, 2018 · 11 comments

Comments

@reduz
Copy link

reduz commented May 6, 2018

For Godot, I had to implement my own CSG library as we needed something compatible with MIT. If anyone wants to take it out and make a standalone lib, please let me know. I would have loved to useing Cork, but I don't understand the reasoning behind using GPL and then abandoning it.

Please change the license to MIT at least.

@maximecb
Copy link

maximecb commented May 13, 2018

@reduz Came here looking for a Python CSG library. Seems they are all abandoned/unmaintained. I think it would be worthwhile to produce a new one. I'm particularly interested in using this for procedural mesh generation. If you're doing this and looking for a beta tester, ping me.

@Raki
Copy link

Raki commented Jun 19, 2018

Hi @reduz , I'm looking for a cpp CSG library, seems your own CSG for Godot is a fit. Can you share me code to make standalone lib ?

@spiroyster
Copy link

@reduz , yep another vote here for something else. Happy to contribute if there is an upto date MIT CSG lib for c++. Carve has errors, Cork has errors, csgjs-cpp infinitely loops which leaves OpenCascade OCE (LGPL) and a few vague others. Don't want a whoel framework, just a simple lib that can perform the standard boolean operations would be nice... a working one seems to be somewhat elusive. o.0

@nyholku
Copy link

nyholku commented Jun 22, 2018

just a simple lib that can perform the standard boolean operations would be nice.

There is no such thing. Simple to use, maybe, simple to implement, don't think so, thus very unlikely to materialise ... OCE is everyone's best bet if you can live with LGPL... and why not.

@yetigit
Copy link

yetigit commented Sep 13, 2018

@reduz +1 , any csg stuff is welcome at this point

@gsohler
Copy link

gsohler commented Aug 22, 2019

Hi Group,
Is such a library available yet ?

best regards Günther

@spiroyster
Copy link

spiroyster commented Aug 22, 2019

I have a working one. https://github.com/spiroyster/qdcsg, which is a quick and dirty header only implementation using the same white paper... It works fine in 99% of cases although has issues around coplanar triangles from each solid and can sometimes lead to infinite looping (FP precision issues with exrtemely small triangles). I have done some research on this for work and have much better implementations which at some point I may be able to open source. A better approach is to check for intersections and carve (no punn inteneded) up the triangles based around just the intersections. Only problem with this approach is that you need a decent tessellator. qdcsg doesn't require retessellation which means it is easy to implement but results in nasty tessellations some times (many triangles, and long thin ones at that). ymmv.

@yetigit
Copy link

yetigit commented Aug 23, 2019

@spiroyster you are precious , will try it

@baldhumanity
Copy link

I have a working one. https://github.com/spiroyster/qdcsg, which is a quick and dirty header only implementation using the same white paper... It works fine in 99% of cases although has issues around coplanar triangles from each solid and can sometimes lead to infinite looping (FP precision issues with exrtemely small triangles). I have done some research on this for work and have much better implementations which at some point I may be able to open source. A better approach is to check for intersections and carve (no punn inteneded) up the triangles based around just the intersections. Only problem with this approach is that you need a decent tessellator. qdcsg doesn't require retessellation which means it is easy to implement but results in nasty tessellations some times (many triangles, and long thin ones at that). ymmv.

Tried it, too slow compared to cork, uses too much memory. Ty anyway

@loic-jourdan
Copy link

I have a working one. https://github.com/spiroyster/qdcsg, which is a quick and dirty header only implementation using the same white paper... It works fine in 99% of cases although has issues around coplanar triangles from each solid and can sometimes lead to infinite looping (FP precision issues with exrtemely small triangles). I have done some research on this for work and have much better implementations which at some point I may be able to open source. A better approach is to check for intersections and carve (no punn inteneded) up the triangles based around just the intersections. Only problem with this approach is that you need a decent tessellator. qdcsg doesn't require retessellation which means it is easy to implement but results in nasty tessellations some times (many triangles, and long thin ones at that). ymmv.

I've had a look at it, it's very clean, modern-styled, clear, simple (as simple as possible), efficient, easy-to-use, easy-to-build and quite robust. It's really worth a try. Congrats @spiroyster, it's an amazing job.

@bluelightning32
Copy link

I found this thread too late, and I ended up writing my own boolean operation library too: https://github.com/bluelightning32/walnut

The algorithm is different than Cork's, but there is a design doc explaining it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants