fornjot icon indicating copy to clipboard operation
fornjot copied to clipboard

`fj::Difference2d` operation doesn't work unless the second shape is fully contained within the first

Open hannobraun opened this issue 3 years ago • 2 comments

Such a limitation would be okay, if not meeting it would result in an error message. However, the code doesn't check for this precondition. I don't know what specifically would happen, if the precondition isn't met. I just know it would result in a very weird (and also wrong) triangulation.

The following methods are affected:

The ideal outcome for this issue is to address the limitation and make sure the code works for all cases. But it would be a good start to check for the precondition and cause an error with a clear message (as of this writing, that would just be a panic; #68 might be relevant). In that case, it might be best to close this issue and open follow-up issues, classified as enhancements, for addressing each unsupported case.

hannobraun avatar Jan 26 '22 16:01 hannobraun

The second shape needs to be fully contained within the first. It won't work the other way around. Updated the title to reflect that.

hannobraun avatar Feb 15 '22 13:02 hannobraun

This issue is currently tracked as part of the Straight edges, flat faces, ... milestone. However, I'm thinking of leaving 2D differences out of the milestone and marking that feature as experimental. Once CSG is available (which definitely is part of the milestone), you can always do a difference of the extruded 3D parts.

No decision has been made, but I wanted to leave a note. At some point, I'd like to see better support for sketching, and I'm not sure how fj::Difference2d will fit into that anyway. Quite possible that it will be removed, in favor of some better way to achieve the same result.

hannobraun avatar Feb 25 '22 12:02 hannobraun

This issue is no longer applicable. The code affected by this bug has been removed. See A New Direction for context.

hannobraun avatar May 15 '23 09:05 hannobraun