Commit Graph

2380 Commits

Author SHA1 Message Date
bherbruck f40da1fca6 topology: B-rep writer, part-file reader and the corpus parity harness (S1)
- topology::brep_data_write / geometry_write: write B-reps and geometry to the SMLib
  database format; topology::part_file: read part files.
- difftest units topology.part_file and corpus.parity (whole upstream TestFiles corpus,
  Rust vs C++), with their shims and FFI, plus the corpus example.
- Fixes found by the corpus in line, ellipse, plane, offset-surface, B-spline and
  surface code.
- WR-449: one sphere_diff fillet face integrates 0.6 too much area upstream; its area and
  volume are exempted in corpus.parity, cause under investigation.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJzQKZ9sjU1DhgS253e8J5
2026-10-26 14:11:22 -04:00
bherbruck 1e95d9844a Merge pull request #1131 from tdamsma/codex/fillet-rollover-concrete-solver-ops
wire: preserve concrete solver dispatch through rollover recovery
2026-10-26 15:58:11 +00:00
bherbruck bf45bcf6f1 Merge pull request #1139 from tdamsma/codex/difftest-variable-radius-solid
difftest: compare full variable-radius fillet results
2026-10-26 15:58:08 +00:00
bherbruck 4b3b0e8f72 Merge pull request #1171 from brett19/fix/fillet-corner-null-guards
fix: blend.fillet_corner_p3 — narrow the MakeFaceBrep null-curve refusal to analytic surfaces made
2026-10-26 15:58:00 +00:00
bherbruck 7cc8699078 Merge pull request #1159 from brett19/wire/refine-cci-to-surfaces
wire: intersect.curve_class_p2 — sm_RefineCCIToSurfaces large-gap refinement
2026-10-26 15:46:14 +00:00
Thijs Damsma bc697973c1 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 16:31:48 +01:00
Thijs Damsma 309ed35671 Merge main into codex/difftest-variable-radius-solid
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 16:31:43 +01:00
Brett Lawson b80fd2aa91 Merge remote-tracking branch 'origin/main' into fix/fillet-corner-null-guards 2026-10-26 16:22:33 +01:00
Brett Lawson 2537aa6bf0 Narrow fillet_corner_p3 MakeFaceBrep refusal to analytic surfaces actually made
MakeAnalyticCornerSurface's SER / NER exits return TRUE without adding a
surface, so the MakeFaceBrep that follows sees m_vSurfaces unchanged (none in
the harness: it returns at once). The shim's pre-check treated every TRUE as a
surface added and refused the corners whose edge curve is NULL, although
upstream never copies those curves. Split P3A_TRUE into a surface exit and a
status exit; a planar corner's status exit after SetCurve(NULL) still refuses
when the corner already had one surface (MakeFaceBrep would copy the deleted
curve). Nine generated corner cases of blend.fillet_corner_p3 now compare
(rejected 28 -> 19), all passing.

Every remaining refused case was run natively with the pre-check bypassed:
each crashes in upstream (SIGSEGV), hangs in CreateExtendedSurface (HANG-9) or
calls a member through a null solver. Runner headers say so; the p2 header no
longer implies its rejections come from the find_concave refusal. HANG-9 gets
an addendum for the two side-face triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 16:21:59 +01:00
Brett Lawson dbb6b420cf Merge remote-tracking branch 'origin/main' into wire/refine-cci-to-surfaces 2026-10-26 16:11:04 +01:00
Brett Lawson 97a52695c2 Port sm_RefineCCIToSurfaces large-gap refinement over the mutable adapter
The large-gap part of sm_RefineCCIToSurfaces (surf/surf/surf move, curve and
edge surface intersections, RefinePoint on both surface pairs and the bounded
recursion) now runs through refine_cci_to_surfaces_mut over ClassGeometryMut,
editing the classification curve, the edge and its UV trim curves. The
part-5 Access trait dispatches the refinement; curve_on_classify_mut inserts
edge solutions through a new intersect_edges_mut with the surface owner
cleared over the edge loop, as upstream.

Fixture route: topology.brep_p2 MergeSsi op (MergeCurvesOnSurface with UV
curves and pOptIntersectionSurface), the IntersectObject::FreeSurface handle
and p10 merge_curves_on_surface_through_surface. New fixture
refine_cci.json: CreatePlanarSectionCurves curves of Solids/nurb_fillet.smb
reaching parts 2a, 2b and 2d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 16:08:50 +01:00
bherbruck d9266b4b62 Merge pull request #1165 from brett19/wire/topology-intersector-face-edges
wire: boolean.topology_intersector_p1 — MakeEdgeInFace fixtures
2026-10-26 15:05:09 +00:00
Thijs Damsma c16bca0c3e Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 16:01:39 +01:00
Thijs Damsma e4bcb758c7 Merge main into codex/difftest-variable-radius-solid
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 16:01:35 +01:00
Brett Lawson e70348c517 difftest: topology_intersector_p1 merged-B-rep fixtures reaching MakeEdgeInFace
Adds a MergeBreps runner op (shim op 35, SmBrep::MergeBrep) that puts both
operands in the primary B-rep as SmMerge does, and merged_* cases that run
SetEditing, EdgeFace and FaceFace on faces of that one B-rep.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 15:33:35 +01:00
Brett Lawson 0acba70343 difftest: topology_intersector_p1 runner support for edits before FaceFace
Adds a SetEditing script op (shim op 34, m_bEditingEnabled), a ChainFaces
marker that lets a FaceFace without input vertices follow a VertexFace or
EdgeFace (the FFI guard now allows exactly that), Vertexuse handles in the
runner's topology_entity, and crossing-plane fixtures. Existing cases are
unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 15:22:43 +01:00
Brett Lawson f609e53236 wire: SmTol::MapTo2d curve-on-surface branch; sphere and torus tessellation diagonals compared
map_to_2d_on_curve evaluates the UV curve of a curve on this very surface
object (std::ptr::eq with the base surface) instead of returning Unported.
The surface_p9 analytic-surface stub was unreachable: the diagonal
SmCrvOnSurf already holds the analytic surface. Eight sphere and torus
diagonal cases (shim kinds 5 and 6) compare against C++.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 14:55:17 +01:00
Thijs Damsma fb6dc3a293 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 14:31:34 +01:00
Thijs Damsma 1a51894d3a Merge main into codex/difftest-variable-radius-solid
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 14:31:30 +01:00
Thijs Damsma 44335481b4 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 13:31:32 +01:00
Alex Lytvynenko a1633e9314 Merge upstream harness updates before publication
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 13:24:38 +01:00
Thijs Damsma 8048756f61 Merge origin/main into codex/difftest-variable-radius-solid
Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-26 13:23:46 +01:00
Thijs Damsma 64bcc2cd54 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 13:01:37 +01:00
Thijs Damsma 678b7ac2aa Merge main into codex/difftest-variable-radius-solid
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 13:01:33 +01:00
bherbruck 7344e62c8b Merge pull request #1129 from brett19/difftest/fillet-corner-p2-side-faces
difftest: blend.fillet_corner_p2 — real faces on adjust_concave side edge uses
2026-10-26 12:01:00 +00:00
bherbruck b9731443ad Merge pull request #1138 from brett19/fix/offset-sweep-over-broad-guards
fix: offset.offset_executive_p2 and sweep.trans_sweep — narrow guards to the inputs that crash
2026-10-26 12:00:55 +00:00
Alex Lytvynenko d3ad1bdd7a Merge upstream/main for final volume validation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 12:41:13 +01:00
Brett Lawson 68ed171701 fix: compare defined native fixture outcomes instead of rejecting them
offset_executive_p2: tiny/far-translated boxes build as an empty B-rep and
merged/dropped-face sheets as a degenerate face; both are defined native
results (no crash, hang or UB) and are now built and compared on both sides.
Only a selection of the nonexistent face 0 stays rejected (nothing to run).
trans_sweep_geometry: a curve constructor failure status is compared with
Rust's instead of rejected; null curves are never passed to
CreateWireEdgeFromCurve.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 12:30:50 +01:00
Alex Lytvynenko 7b67d365ba test(geom): compare scaled zero on real B-spline volumes
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 12:29:19 +01:00
Brett Lawson e48e9172d4 Merge origin/main 2026-10-26 12:21:45 +01:00
Thijs Damsma 2b38826967 difftest: compare complete variable-radius solid results
Add a full-only radius_end form for the actual native and Rust public linear-law fillet APIs. Keep the constant wire and API path, share complete output records, and reject unsupported prefix or thumbweight combinations before construction.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-26 12:18:00 +01:00
bherbruck 793e22a873 Merge pull request #1133 from brett19/difftest/fillet-corner-p3-solvers
difftest: blend.fillet_corner_p3 — real solvers on corner-op model geoms
2026-10-26 11:15:37 +00:00
Thijs Damsma 8ff280a4c8 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 12:01:31 +01:00
Brett Lawson 8312f20f28 Document the confirmed C++ hang behind the fillet corner gap-zero guard
A runtime backtrace shows AdjustConcaveCornerTopology (SmFilletCorner.cpp:7185)
extending the side surface by 10 * dGapDist; with dGapDist == 0 the
CreateExtendedSurface halving loop (HANG-9) never ends. Add an addendum to HANG-9
and point the shim guard comment at it; the guard condition is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 12:01:20 +01:00
Brett Lawson a59f3105a3 difftest: blend.fillet_corner_p3 real solvers on corner-op model geoms
Generated patch and calc_geom corner cases give the model's fillet geometries a base solver
with a cross-section generator, identically in the Rust runner and the shim, so the
analytic-corner fits that read the solver run instead of being refused. The shim now
follows MakeAnalyticCornerSurface past the solver reads (chamfer re-intersection, the
constant radius conversion's generator checks); solver-less geometries stay refused.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 11:45:33 +01:00
Brett Lawson 562460dbd6 Merge origin/main 2026-10-26 11:35:48 +01:00
Brett Lawson ba5397ef12 difftest: blend.fillet_corner_p2 adjust_concave side edge uses on a target face's loop
A new classification kind 5 puts the model's side edge use on the first loop of a
target face, so the side face (and its radial's face) exist and
AdjustConcaveCornerTopology reaches the surface extension. Rejected cases 19 -> 7.
The shim also refuses coincident rail points with a zero tolerance, where
CreateExtendedSurface (by 10 * 0) does not return.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 11:35:47 +01:00
bherbruck fd40613b75 Merge pull request #1062 from altvnk/fix/surface-p11-torus-boundaries
test(surface): compare real torus iso-boundaries in p11
2026-10-26 10:32:07 +00:00
bherbruck 62cad6cc5c Merge pull request #1128 from brett19/fix/api-brep-shell-order
fix: boolean.api_brep — compare shell order and match SMLib's shell order
2026-10-26 10:31:52 +00:00
Thijs Damsma a9a9abef93 Merge main into codex/fillet-rollover-concrete-solver-ops
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 11:31:19 +01:00
Thijs Damsma de7e1ccda9 Merge remote-tracking branch 'fork/codex/fillet-rollover-owner-context' into codex/fillet-split-rail-causal 2026-10-26 10:52:17 +01:00
Brett Lawson b5f1647a38 fix: compare api_brep shell order and keep the region list's link order
boolean.api_brep now records, per region in GetRegions order, IsVoid,
IsInfiniteRegion and the shell count, and per shell its faceuse count and
the region behind its first faceuse's mate, so region and shell order are
compared against SMLib.

That exposed three merges of inverted spheres (gen0001, gen0033, gen0118)
whose region list differed from SMLib's. The B-rep region list was modelled
as the region arena rotated to its head, which is only SMLib's circular list
while the head is the oldest region. Once the head moves to a later region
(the inverted sphere's infinite region), SmOwningTopology::PostInsert
appends before the head, but the arena model put new regions after the
newest one. The Brep now records the link order whenever the head moves or a
region is pre/post-inserted or removed; regions appended since follow in
arena order, as PostInsert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 10:48:58 +01:00
Brett Lawson e48967cd0d Narrow fillet_corner_p3 null-curve guard and check curve count first
The shim no longer refuses a corner edge without a 3D curve: upstream
CreateCornerBlend returns SM_ERR below four curves and otherwise
SM_ERR_NULL_POINTER, without crashing. create_corner_patch now checks the
count before dereferencing curves, matching that order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 10:17:00 +01:00
Thijs Damsma 9fcd38695d difftest: retain actual split vertex tolerance cascades 2026-10-26 10:13:50 +01:00
Thijs Damsma fe3ebd0eb7 fix: read public Rust interval and initialize native endpoints 2026-10-26 10:09:22 +01:00
Thijs Damsma 1d44083c08 fix: use public native interval accessors 2026-10-26 10:05:26 +01:00
Thijs Damsma e8b6b66aeb fix: read actual native split curve interval fields 2026-10-26 10:04:00 +01:00
Thijs Damsma 68e16bc504 difftest: compare actual split rail owner notifications 2026-10-26 09:56:56 +01:00
Brett Lawson b5454636a5 Merge remote-tracking branch 'origin/main' into fixes/opt-in-wr214-wr254-wr265 2026-10-26 09:23:34 +01:00
Brett Lawson c91845a161 fixes: WR-214, WR-254 and WR-265 become opt-in UpstreamFixes fields
Follows #1077: a result-changing fix of an upstream defect is an opt-in
`Kernel::fixes` field and the default is pinned SMLib behaviour.

- WR-214 (#480): the Boolean's topology intersector sets
  `split_self_loops_on_vertices` from `proto_edge_self_loop_on_vertex_degenerate`
  instead of forcing it off.
- WR-254 (#528): the slice side rule for coincident faces needs
  `slice_coincident_faces_sheet_side`; by default the slice takes upstream's
  difference rule.
- WR-265 (#388): `put_outer_shells_first` (shell order and the nested-solid
  void-flag rewrite) needs `boolean_outer_shell_first`.

The boolean.api_brep runner can now build sheets (SmApiCreatePlane) and operands
that are an SmApiBoolean result, and it gains the C++-confirmed WR-254 and WR-265
repros as fixture cases that pass at the default. Each fix has an issue test with
the field on and a test that pins the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 08:49:00 +01:00