Qualify "coplanar" in the documentation #26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I understand this code isn't actively maintained, but hopefully this pull request will help others understand it correctly.
The code uses the word "coplanar" to refer to two specific conditions: overlapping polygons with the same normal direction and overlapping polygons with reversed normal directions:
csg.js/csg.js
Line 439 in a8512af
The documentation, on the other hand, uses it in one specific way: overlapping polygons with the same normal direction. But, it doesn't doesn't qualify. I think this qualification is key to understanding the algorithm correctly, so it is worth adding.
Namely,
clipTo
will return polygons in the argument list with the same normal direction as theCSGNode
, but removes coplanar polygons with a reversed normal.