-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Implement union operation #42
Comments
Blocked on #97. |
Now that |
This is no longer blocked on #97! |
I'm back to working on this issue directly. I'm not aware of any blockers, but of course some new ones may show up, as I'm getting into this. |
All known hurdles are out of the way now. I'm back to working on this issue directly. |
#993 has been addressed. This issue is no longer blocked! |
This issue has been sidelined for a long time now, but with both #1162 and #1589 addressed, I'm finally ready to get back to it! That this work has been sitting for so long is unfortunate, but it's also given me some perspective. I now believe that the approach I was following previously was not optimal, and ultimately rooted in a naive view of the problem. Basically, I approach this with the thought of "let's just implement the algorithm", then realizing that a lot of intersection tests had to exist for the algorithm to even know what to do, then going off and implementing those. However, even when all the intersection tests are in place and the "knowing what to do" problem is solved, the other (maybe even bigger) problem still exists: actually doing the thing. Basically, once the algorithm knows where to remove/split/add vertices/edges/faces, it needs to then do those things. Initially, I didn't realize how hard of a problem that was. But over the last few months that became painfully clear, mostly when I needed to construct geometry to write test cases, and that always turned into a huge pain. Since then, I've done a lot to ease the problem, namely the cleanup work in #1589 (and a lot of what came before). Those cleanups will directly benefit the work required for this issue. However, there remain two problems:
Since I don't want to write more code that will be useless until the very end, I think it would be better to start with the geometry construction/manipulation APIs first. This has the following advantages:
So given all that, I've decided to build up this geometry construction/manipulation API until it has become powerful enough to support the union operation. When it has, it's time to revisit the intersection testing side of it. |
You are right about that, @A-Walrus. It's a fact that the way we represent geometry is pretty limited, and won't serve us much longer. As far as this issue is concerned, this problem is out of scope though. Please note that the milestone this issue is assigned to only plans for straight edges and flat faces. There's also this older blog post which provides some more context. I've been thinking about this in the back of my mind for a while, but I don't know what the solution is. A possible feature-based milestone after "straight edges, flat faces" could be "square things with round holes", which would essentially mean the stable subset of Fornjot (see #431) would be restricted to combining a straight/flat part with a round part, side-stepping the problem you mentioned to some degree. After that, I don't know what the best path is. Maybe there are some more tricks we can pull (i.e. enable more useful features with specific, targeted changes), or maybe we're going to need a better geometry representation (I don't currently know what that would look like) or maybe we would need to go for full NURBS at that point. |
I've decided to add boolean operations to the feature wishlist and close this issue. There are just too many moving parts (some of which I've implemented, many of which are still missing) to make this actionable. I wrote about why that is a while ago. This doesn't mean that I don't think this is a desirable feature, but I want issues to be actionable work items, and this one definitely isn't. |
It should be possible to create the union of two shapes, using constructive solid geometry (CSG). This is currently not supported, except for the simplest case, disjoint bodies, which is supported in the form of
fj::Group
.Implementing this requires more solid infrastructure in the host application for storing and querying shapes. Also see #43 and #44.
The text was updated successfully, but these errors were encountered: