Repository navigation
fix: sm_FixUVTrimCurves moves only the trim end points (#570) - #703
Merged
bherbruck merged 2 commits intoOct 24, 2026
Merged
Conversation
…#570) Closing a corner's UV gap, upstream drops the vertex's UV point onto each trim, trims it there and stretches it back over its interval (Trim + EditParameterization). The stretch slides every interior parameter of the trim off its edge's by the trimmed length. Follow tangency-labs/smlib@5af7070: only the end control points move, by the UV gap. Documented deviation (WR-255); regression test fix_uv_trim_curves_keeps_interior_parameters. No difftest case reaches the removed branch, so every unit's results are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
denelson1-dot
added a commit
to denelson1-dot/solidcore
that referenced
this pull request
Oct 24, 2026
…on main) 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.
Fixes #570. Ports jyviko's fork fix tangency-labs/smlib@5af7070 into the Rust
sm_FixUVTrimCurves(topology::face::p2::fix_uv_trim_curves). This is a documented deviation from upstream. Standalone on main (no other PR stacked).What was wrong
Closing a corner's UV gap, upstream drops the vertex's UV point onto each of the two trims,
Trims the trim there andEditParameterizations it back over its old interval, and only then moves the end point (SmFace.cpp:7609–7687atc9c5979). The stretch slides every interior parameter of the trim off its edge's by the trimmed length. Any point classification builds the trim cache that runs this. On SolidCraft's 06-threads/004, a 1.15e-6 corner gap left a thread-flank trim 5.05e-5 off its edge, against a tolerance of 1e-5 (details in the issue).Change
fix_uv_trim_curvesno longer callsDropPoint,TrimorEditParameterization. Only the two end control points move onto the vertex's UV point, by the UV gap, as in the fork. The early returns, the end-weight handling and the rational/non-rationalEditEndPointare unchanged.DropPoint.plan/upstream-issues.md: WR-255.plan/findings.md: a section for issue SMLib's tolerances don't cover its own approximations: trims and intersection curves lie outside the edge tolerance recorded for them #570.fix_uv_trim_curves_keeps_interior_parameters. It builds a box withcreate_boxand gives one face's trim three spans and a 1e-3 overshoot past its vertex. It then checks that the knots and interior control points are unchanged and the vertex end lands on the vertex. On the old code path it fails: interior knots move from 3.3333 to 3.3324.Difftest: nothing moves, and why
No difftest case reaches the removed branch. The
topology.face_p2FixUvcases call the function on the fixture B-reps' own trims, whose ends already lie on their vertices' UV points; the cases pass a nominaluv_dist_between. The drop point is therefore the trim's end, so upstream'sSM_ARE_SAME(dTCurr, dTCurrNew)skips the trim. The same holds for its callers,CreateUVTrimCurvesandCheckAndFixUVTrimCurves. As a result there are no known-mismatch entries, and the unit test above is the only coverage of the changed behaviour. A difftest op that moves a trim's end would make the deviation visible against the C++; I left that out to keep this PR small.Per-case outcomes match main's CI reports (run 40048046902,
20bef40d1) for all 260 units. The one difference before merging main wassweep.trans_sweep_geometry, from #692 landing after my base; it is identical after the merge.Preserved invariants
No tolerance loosened, no case dropped, no generator, shim, FFI or runner changed, no unit status changed, no stub added.
Verified on head a0e9147: fmt, clippy -D warnings (plain +
difftest/cpp),cargo test -p solidcore(2080 + integration), wasm32 check,units.py check, difftest above (x86-64 Linux).🤖 Generated with Claude Code