Repository navigation
difftest: own imported geometry under the harness's keys (brep_p6, merge_p2) - #618
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rge_p2) The topology solver finds an edge from its curve's owner, and the B-rep cache trees hold only the curves and surfaces whose owner equals the name the caller hands the library. Two runners imported geometry under other names: - topology.brep_p6 MakeFaceTopology left edge curves unowned, so the infinite-region rays skip the edge the C++ hits first and classify a face the C++ prunes (cube_faces_6, cube_faces_6_reversed, once trims are created). - boolean.merge_p2 MergeEdge/MakeFaceuse owned the operands under arena identities but names entities with the copy keys, so MakeFace's rays saw no edges and one of two faces (make_faceuse_*). util::own_edge_curves / own_face_surfaces take the names; own_arena_geometry uses them with arena identities. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
erlis
marked this pull request as ready for review
October 23, 2026 13:56
henlamp
added a commit
to henlamp/solidcore
that referenced
this pull request
Oct 23, 2026
Co-Authored-By: Codex <noreply@openai.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.
Two difftest runners import B-reps whose geometry owners don't match the names the runner hands the library. The topology solver depends on those owners:
BrepObjects::curve_edgefinds an edge from its curve's owner;BrepCache::build_treesadds an edge or face to the solver trees only when its curve's or surface's owner equals the caller's key.In the C++ fixtures an edge owns its curve and a face its surface, so the inputs differed.
topology.brep_p6, op 3
MakeFaceTopologykey_ofnames but leaves edge curves unowned.cube_faces_6, the infinite-region ray from (1.50002)³ hits the edge y=1,z=1 at t=0.9427. The C++ solves it there, which sets best² = 0.8888 and prunes the x=0 and y=0 face boxes.curve_edgeisNone), so it classifies face x=0 and creates 4 UV trims the C++ never makes.key_of(Edge).boolean.merge_p2,
MergeEdge/MakeFaceusep5::importowns the operands' geometry under arena identities (edge i → key i), but the runner names entities with the copy keys (edge i → 2 000 000 + i, face i → 4 000 000 + i).MakeFace's infinite-region rays use those names, so their tree held no edges and only the new face, and the shell rays failed withedge owner is not in source B-rep.util::own_edge_curves/own_face_surfacestake the names;own_arena_geometrynow calls them with arena identities (unchanged behaviour).Results (Linux, pinned reference c9c5979; tolerances and fixtures unchanged)
This branch (merged with main 7935b4c):
make_faceuse_square_to_make_faceandmake_faceuse_circle_region_givenmove fromtopology.edgeuse_p3(GetOrCreateUVTrimCurve, read-only refusal) totopology.face_p2SmFace::GetToleranceandcurve.curve_p2SmCurve::GetNaturalInterval. No other case of either unit changed.own_arena_geometryrunners show no change on any case: query.brep, boolean.merge_p1, topology.brep_p2, boolean.merge_p5.With #613 (shell ray fires create the missing trims), on main + #613:
and on main + #613 + this branch:
Checks (after merging main 7935b4c):
cargo fmt --all --check;cargo clippy --workspace --all-targets -- -D warnings;cargo clippy -p difftest -p solidcore-ffi --features difftest/cpp --all-targets -- -D warnings;cargo test -p difftest --features cpp(258 passed); difftest--unitfor the 7 units above. No library code changed.How it was found: a gdb trace of the C++ reference (
SmTopologySolver::MayContainAnswer,SmTLSPointEdge/Face::SolveIt,SmFace::PointClassify) next to a traced Rust run, while looking at the cases #541 moved to the read-only trim refusal.🤖 Generated with Claude Code