Repository navigation
STEP export: a merged partial cylinder keeps its cylinder (silent volume loss) - #1497
Merged
bherbruck merged 7 commits intoOct 16, 2026
Merged
Conversation
The writer joins the pieces truck splits a revolved wall into (three quarter turns of a 270° wall) into one face, and rewrites the B-spline sheet as an exact cylinder or cone with its parameter seam opposite the face's middle. The middle came from the mean direction of the face's vertices: zero for a face split at 0°, 90°, 180° and 270°, so no seam was found, the sheet was not rewritten, and the merged 270° face kept the first piece's quarter sheet. The file's face ran far outside its own surface; read back, the body was closed, with no warning, and 7% too small (robustness seed 17: 2968.53 mm³ became 2754.67). For a face over 180° with only two vertices the mean even put the seam in the face's middle. The seam now goes in the middle of the one angular gap the face leaves: its vertices sorted by angle about the axis, each two neighbours joined by one of its edges except across the gap. Faces with two vertices, or without exactly one gap, keep the mean as before. Tests: the shelled thin three-quarter tube of seed 17 round-trips at kernel level (fails without the change with the seed's volumes) and through the engine commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-face seam Upstream d8a088f (tangency-labs#1438) changed the seam search in analytic_sheets. It now averages points sampled along the face's edges, not only the edge ends. This conflicted with this branch's gap_middle in the same match arm. Resolution: take main's step_out.rs and drop gap_middle. Keep the two seed 17 regression tests, so the case stays pinned in CI. Evidence (cargo test --profile ci, 2 cores): - step_in::tests::shelled_three_quarter_tube_round_trips fails on d8a088f^ (volume 2754.67 vs 2968.53) and passes on 843c548. - step_merge_regressions passes on 843c548 with no step_out change. Not shown: that main's mean is right for every merged face. A face whose rim is split unevenly may still get its seam inside the face. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2968.53 mm3 read back as 2754.67 mm3: 7.2% short. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Thanks for tracking this one down. Silent volume loss is exactly what I want caught. Main has moved under it in |
…gh STEP The merged wall of a wide partial tube leaves a gap of 60, 30 or 10 degrees. Written against main's seam fallback; it records whether that fallback keeps the volume on a face wider than 270 degrees.
analytic_sheets puts the parameter seam of a rewritten cylinder or cone in the middle of the one angular gap the face leaves, found from its boundary vertices, ahead of the edge-point fallback from tangency-labs#1198. A face with two corners (a slot's half turn) or without exactly one gap has no such gap and keeps the fallback.
Ian-cmd-ops
added a commit
to Ian-cmd-ops/solidcraft
that referenced
this pull request
Oct 15, 2026
Edit and comment for tangency-labs#1497 (tests only after the merge with main) and a draft issue for robustness seed 55. The dry run passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
A STEP export could silently lose part of a body. The file read back closed, with no warning, but smaller.
Reproduction. Robustness seed 17, shrunk to two features:
Exported and read back, the volume drops from 2968.53 to 2754.67 mm³ (−7.2 %) and the area from 6048.43 to 5811.70 mm².
What goes wrong. Face by face, only the inner and outer walls change. Each loses 8.9 % of its area, about 24° of its 270°.
merge_split_facesjoins them into one 270° face, which keeps one piece's surface.analytic_sheetsshould then rewrite that sheet as an exact cylinder, but doesn't.In the written file, the merged
ADVANCED_FACEhas a 270° boundary, but its surface is still the first piece's quarter-turnB_SPLINE_SURFACE. The face runs far outside its own surface, and the reader loses part of it.Why
analytic_sheetsskipped it. For a sheet that doesn't make a full turn, it puts the cylinder's seam opposite the face's middle. It took that middle as the mean direction of the face's vertices.The fix.
gap_middle(crates/kernel/src/step_out.rs) sorts the face's boundary vertices by angle about the axis. Every two neighbours are joined by one of the face's edges, except across the gap the face leaves. With exactly one gap, the seam goes in its middle. Faces with fewer than three vertex angles, or without exactly one gap, keep the mean as before.Validation
step_in::tests::shelled_three_quarter_tube_round_trips(kernel calls: revolve, shell, then the existing strictround_trip). It fails without the change with the seed's volumes (2754.67 vs 2968.53) and passes with it.crates/engine/tests/step_merge_regressions.rsruns seed 17 as engine commands. It reads back closed, with no warnings, and volume and area are within 0.1 %.cargo clippy --profile ci -p solidcraft-kernel -p solidcraft-engine --all-targets -- -D warningsandcargo fmt --all -- --checkare clean.stepin its name passes. That includes those from feat: STEP import takesupfor Y-up files andnamesfor the bodies' names #1312, which changed STEP import. This was run on the branch merged with main, and with STEP export: shelled revolved bodies export instead of panicking #1496 (scaled revolved faces) applied as well.cargo xtask ci;cargo xtask wasm, because there is no wasm32 target in my environment. The change is plain arithmetic.Screenshots of the behavior (when observable)
Not attached. The loss shows as a volume or area difference after re-import, not in the app's view of the original body. The before and after are the numbers above.
Integration status
Merged
upstream/mainat 0872eb9, including #1312's STEP import changes, with no conflicts. The validation above ran after the merge.