Repository navigation
Conversation
…#4058) A ring extruded round a part, its hole the part's outline (rounded corners included), only touches the part, back to back on planes and cylinders. The boolean can't intersect faces lying on each other, and the join failed with "Union: no result" after many retries. - Contact seen from both bodies (coplanar::faces_touch): a tall wall's face meshes too coarsely for any sample to land on a thin floor's side, so the imprint-and-glue route was never tried. - Round contact faces glued: cylinders_imprinted splits each body's faces on a shared cylinder across the axis where the other's faces end, on exact arcs (splitface::split_across), and glue_round pairs back-to-back cylinder faces as glue pairs planar ones. - Slits refused: a glued union that leaves two faces back to back on a contact surface over a common area is refused (coplanar::slit_free), on every glue path, including the glue of touching operands. - Lineage kept: an imprint step that changed nothing no longer composes the previous step's history twice (boolean_record::step). - Faster cylinder lookups: faces that can lie on the other body's cylinders are found by their corners before their surfaces are classified. Seed 33's golden is recorded again: its join of a box onto a filleted revolved disc is now exact. Fixes tangency-labs#4058
kaievns
force-pushed
the
walls-flush-join
branch
from
October 22, 2026 21:45
93c27c2 to
919740d
Compare
Contributor
Author
Contributor
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.
Fixes #4058. Related to #2770, which this does not fix (see the end).
This is the kernel half of #2465, split out on its own on current
main. #2465 keeps the Extrude window's Targets row (#2464).Draft, on hold. @jyviko asked to pause new kernel fixes aimed at
truck's booleans while the maintainers evaluate the kernel (#3992, solidcore). This PR is ready for review once that evaluation is done. Until then it stays a draft.Overlaps with other open drafts:
splitface. Here,fit_ontakes the cylinder a split face lies on andsplit_acrossuses it. The two would need reconciling.What changes
A ring extruded round a part, its hole the part's outline (rounded corners included), only touches the part, back to back on planes and on cylinders. The B-rep boolean can't intersect faces lying on each other, so the retry ladder ended in "no result" after many full booleans. Now the join is exact:
coplanar::faces_touch). A 40 mm wall's face meshes into two triangles, and none of their samples lands on a 3 mm floor's side. So the exact imprint-and-glue route was never tried.cylinders_imprintedsplits each body's faces on a shared cylinder across the axis, where the other body's faces end. The splits are exact arcs of the circle (splitface::split_across, given the cylinder), so revolved and STEP round sides are cut the same way.glue_roundthen pairs back-to-back cylinder faces as it pairs planar ones, wherever the result is checked for slits (below).coplanar::slit_freerefuses that on every glue path, and the ladder goes on.maina pin through a hole, on a base under the plate, is left with a slit (the test fails with the base -10..50).boolean_record::stepcomposes only when a step changed the body.cylinders()walked the face list once per face. That is quadratic: about 0.4 s per call on a 2,100-face body, with several calls per boolean. Faces that can lie on the other body's cylinders are now found by their corners first.The change is the same as #2465's kernel half (compared line for line). Two things are new here:
boolean_regression_tests.rs;docs/robustness.mdentry says "after many retries" rather than "after a minute of retries", because the small reproduction fails in seconds.Before / after
Steps: a 60 × 50 floor with r4 corners, a tapered pocket and a socket under it. The 10 mm ring sketched round it (r14 outside) is extruded 40 mm as a Join, through the Extrude window over the control channel. The issue has the same steps as a
solidcraft-cliscript.Measured on
main776541b against this branch:mainboolean Union: the operation failed: no resultsolidcraft-cli run walls-repro.jsonerror: step 14 (solid.extrude): boolean Union: the operation failed: no resultafter 4.6 sTests
coplanar_tests.rs,mod wall_join, 7 tests):boolean_regression_tests.rs,walls_join_flush_round_a_floor): the walls joined throughsolid.extrude, from the floor's bottom (40 mm) and from the socket's floor (10 mm). Each join is exact (no strategy that alters the result), gives one valid shell, and adds the ring's area × height to within 2e-5.Without the fix they fail. With the kernel's production files (
boolean_record.rs,coplanar.rs,ops.rs,outline.rs,splitface.rs) set back tomain's:boolean Union: the operation failed: no result;slit_freeand its helpers were added on top ofmain'scoplanar.rsso that the tests compile:no result;faces_touch(&plate, &wall)is false;The split-arc tests and the two slit-checker tests test new functions, which don't exist on
main. Each fix was also checked by putting its bug back on this branch:fit_onno result)arc_on_faceignoring the faceRobustness goldens
Seed 33 is recorded again, with its reason in the file's notes. Its join of a box onto a filleted revolved disc (step 5) is now exact. On
mainit needed a tool nudge and left the body as two shells touching along a face, so that face's area was counted twice.The fused body then changes what the generator draws later: rejected 4 → 3, unsupported 1 → 2. The design ends with one shell fewer (4 → 3), 68 mm² less area and the same volume within 0.6 mm³. Every step passes the validity and volume-direction checks. The new record was made on macOS and matches #2465's record within the test's 1e-6 relative tolerance.
All 96 seeds were run on
main776541b and on this branch (macOS):maintoo, identically on both, and are left as they are. The record is the Linux one CI checks.Checks
On macOS, Rust 1.99,
ciprofile, on this branch atmain776541b (since rebased ontomaine949009, which changes only the IGES importer in the kernel; after the rebase clippy, the kernelwall_jointests, the engineboolean_regression_testsand seed 33 pass again):cargo fmt --all --check;cargo clippy --profile ci -p solidcraft-kernel -p solidcraft-engine --all-targets -- -D warnings;cargo check --target wasm32-unknown-unknown --profile ci -p solidcraft-kernel -p solidcraft-engine;cargo test -p solidcraft-kernel: 857 library tests passed, 28 ignored; the integration test binaries pass;cargo test -p solidcraft-engine --lib -- --skip robustness_goldens: 1825 passed, 1 failed. The failure isprism_local_tests::a_ring_cut_round_a_counterbored_hole_in_a_chamfered_disc(148.2797 taken, want 148.4403). It fails identically withmain's kernel on this Mac, so it is not caused by this change;cargo xtask ciwas not run as a whole; GitHub CI runs the rest.Not fixed here
🤖 Generated with Claude Code