Repository navigation
difftest: run primitive.primitive_creation_p2 through the production PrimitiveModel - #623
Merged
bherbruck merged 1 commit intoOct 23, 2026
Conversation
…PrimitiveModel The p2 runner's one-B-rep fixture could not make scratch B-reps (an UNPORTED(topology.brep_p3) SmBrep::SmBrep stub in the runner) and keyed faces in a namespace the B-rep caches cannot resolve, so the shell ray fire solved face-owned surfaces as untrimmed. The entry points now run through primitive::primitive_creation::model::PrimitiveModel. difftest: 328 cases, 194 bit-identical passes, 0 failed, 114 deferred, 20 rejected. The 81 SmBrep::SmBrep deferrals are gone (10 now pass, the rest reach deeper unported calls); 12 earlier passes relied on the fixture keys and now defer at the face-owned trimmed surface cache, like C++ (plan/findings.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2
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.
Follow-up to #617. The
primitive.primitive_creation_p2runner used a one-B-rep fixture adapter with two problems. First, it could not make the scratch and piece B-reps that skin, taper and planar path need: anUNPORTED(topology.brep_p3)SmBrep::SmBrepstub in the runner, although the constructor is ported. Second, it keyed new faces in its own namespace. The runner now runs every entry point through the production adapterprimitive::primitive_creation::model::PrimitiveModel. It also removes ~230 lines of fixture adapter. Library code is unchanged.Why some former passes now defer
The fixture's face keys (
FACE_TYPE,100000 + 97·i) cannot be resolved to a face by the B-rep caches of the shell ray fire (StitchAndOrient→ region split →FindInfiniteRegion→SmShell::RayFire). Those caches therefore solved the faces' surfaces as untrimmed, which is the shortcutSurfaceCache::get_treerefuses for a face-owned surface.12 pipe, skin and planar-path cases matched C++ only because the record compares status and list sizes, not geometry. To confirm, I changed nothing in the old fixture except its face keys, using the production
notify_refformula. Exactly those 12 then defer atTrimSrfCache::build_tree_with_face for a face-owned surface(passes 196 → 184,surface.trim_srf_cache6 → 18). With the production adapter they reach the trimmed cache, as C++ does, and defer honestly. Details are inplan/findings.md.Difftest (macOS arm64, pinned
c9c5979, on main7935b4c09)Case-by-case against main's CI report:
SmBrep::SmBrepnow pass.The other 71 former
SmBrep::SmBrepcases now reach deeper unported calls. The fixture README's deferred table is updated.Checks:
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, the same with-p difftest --features cpp,cargo test -p solidcore(2054 passed),cargo test -p difftestand wasm check.Follow-up, not in this PR
PrimitiveModel::new_mergestill returnsUnported(SmMerge::SmMerge, boolean.merge_p2)although the unit is ported; that accounts for the 34 taper deferrals. I left it alone because #615 is reworkingmodel.rs.Related
curve.curve_p2to their next blocker. No overlapping files.🤖 Generated with Claude Code
https://claude.ai/code/session_01TYEpC4tUKxEP3MCaFL5Kz2