Repository navigation
fix(booleans): exact cylinder minus half-space cuboid with ellipse trims - #28
Merged
Merged
Conversation
A full cylinder cut by one cuboid face plane failed when the plane was oblique to the axis (coverage gap) or parallel to a sloped axis (SSI support residual). Build the kept part directly: the side trimmed by the cut ellipse (parameter = cylinder angle) or two rulings, full or chord-clipped caps, and one planar cut face. Aligned subtractions keep their existing builders.
- Build the chart from cross products so near-perpendicular cuts keep an orthonormal frame. - Replace the absolute near-parallel guard with a rounding bound on the ellipse centre and amplitude. - Only exact results and UnresolvedIntersection replace the original error; other failures keep the generic fallbacks. - Leave cuts within 1e-3 r of a side or rim (tessellation slivers) to the other paths. - Add the reviewer's probe families as crate tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Exact Boolean for a full cylinder minus a half-space cuboid (one face plane cuts the cylinder).
Before, this cut failed when the plane was oblique to the cylinder axis (coverage gap), or parallel to a sloped axis (SSI support residual). Now the kept part is built directly:
Aligned subtractions keep their existing builders.
Robustness
UnresolvedIntersectionreplace the original error; other failures keep the generic fallbacks.Tests
analytic/booleans/cylinder_half_space.rs(oblique, perpendicular, parallel, sloped axis, near-rim probe families): all pass.cargo test --release: 439 pass, 2 fail. The same 2 tests also fail onmainatrelease: 2.0.18without this change, so they are not caused by it:analytic::tessellation::tests::a_trimmed_curved_face_keeps_its_triangle_setanalytic::wasm::tests::text_and_object_tessellation_give_the_pinned_trianglesFiles
main/opengeometry/src/analytic/booleans.rsmain/opengeometry/src/analytic/booleans/cylinder_half_space.rs(new)