Comments (11)
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.
from cork.
@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.
from cork.
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 ?
from cork.
@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
from cork.
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.
from cork.
@reduz +1 , any csg stuff is welcome at this point
from cork.
Hi Group,
Is such a library available yet ?
best regards Günther
from cork.
@spiroyster you are precious , will try it
from cork.
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
from cork.
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.
from cork.
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.
from cork.
Related Issues (20)
- Visual Studio project file's additional include paths are not relative
- Starting Point for Further Development
- Perfect Boolean? HOT 1
- make: clang++: Command not found
- Increasing perturbing positions times? HOT 2
- Getting GMP fatal error HOT 1
- using cork in my own project HOT 1
- Fails to build with clang-5
- exception thrown on visual studio2017+windows10_x64 during computeing Difference with ballA\ballB HOT 1
- commercial use
- Instability in intersection calculation
- crash when free memory
- nullptr exception on specific operation with specific mesh
- Trying to run main.cpp with sample files ballA.off and ballB.off always crashes HOT 2
- Sequential execution of any operation leads to different results
- Triangulate symbol
- Missing $(CCFLAGS) in Makefile
- some error about "triangle.c"
- Installation problem with M1 Pro :clang: error: linker command failed with exit code 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cork.