Commit Graph

2393 Commits

Author SHA1 Message Date
Alex Lytvynenko e6da98ef94 difftest: preserve exact face classification geometry
Reuse lossless analytic surface and edge-curve transport. All 1401 cases now compare values, replacing 27 both-error comparisons; retain original fixture identities, guards, and tolerances.

Co-Authored-By: OpenAI GPT-6.1 <noreply@openai.com>
2026-10-26 22:00:35 +01:00
bherbruck 68d23b710d Merge pull request #1178 from tdamsma/codex/difftest-positive-original-trim
difftest: compare successful surface trimming on real B-reps
2026-10-26 19:40:31 +00:00
bherbruck 52d3b93ead Merge pull request #1182 from altvnk/fix/brep-cross-body-mut
wire: topology.brep_p1 — mutable cross-body intersections
2026-10-26 19:40:29 +00:00
bherbruck d74981b5f6 Merge pull request #1185 from altvnk/fix/linear-sweep-geometry
difftest: linear-sweep geometry, manifold and volume observations
2026-10-26 19:40:26 +00:00
Thijs Damsma b8b1eb8d3f Merge main into codex/difftest-positive-original-trim
Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 20:01:44 +01:00
bherbruck 60f89a7f1f Merge origin/main into fix/torus-uv-dispatch-383
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJzQKZ9sjU1DhgS253e8J5
2026-10-26 14:40:35 -04:00
bherbruck d99d954c80 fix: surface — torus STEP<->NURBS UV conversions dispatch to SmTorus's overrides (#383)
Surface::convert_uv_from_step_to_nurbs / convert_uv_from_nurbs_to_step had no Torus arm,
so a torus took the base identity. Upstream SmTorus overrides both (SmTorus.h:184/:190);
the ported overrides (surface/torus.rs) were never dispatched. In BooleanPostProcess the
merge of two torus faces then united a NURBS domain with a STEP-degree domain and
re-trimmed the merged face in it: box ∩ tangent torus lost volume (seed 86: 23.57 against
C++ 104.84).

Difftest: boolean.api_brep gains a torus operand kind and a measured call (volume and face
areas), 8 issue383 cases and 12 torus_guard cases (radius boundaries, horn, huge scale).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJzQKZ9sjU1DhgS253e8J5
2026-10-26 14:40:28 -04:00
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
Alex Lytvynenko 08f35e8d5b fix: match split-owner recorder type to native GetType
Use SM_TYPE for the observed type, avoiding signed-to-unsigned
aggregate narrowing on Clang without a cast or warning suppression.
Exact-base syntax control fails; the one-field remedy passes with
identical flags and headers. No solver or observation values change.

Exact one-field scope released by original author @tdamsma:
https://github.com/tangency-labs/solidcore/pull/1127#issuecomment-6423035540

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 18:45:59 +01:00
Alex Lytvynenko 8d842f3fa2 fix: match split-owner recorder type to native GetType
Use SM_TYPE for the observed type, avoiding signed-to-unsigned
aggregate narrowing on Clang without a cast or warning suppression.
Exact-base syntax control fails; the one-field remedy passes with
identical flags and headers. No solver or observation values change.

Exact one-field scope released by original author @tdamsma:
https://github.com/tangency-labs/solidcore/pull/1127#issuecomment-6423035540

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 18:45:52 +01:00
Alex Lytvynenko d267d7889d difftest: observe linear-sweep geometry and solid properties
Keep legacy outputs and generator draws unchanged. Add default-off
linear observations and targeted geometry/query sensitivity controls.
Retain draft status pending full native build and regression gates.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 18:22:47 +01:00
Alex Lytvynenko 3ddf816506 wire: mutable cross-body intersections and geometry observations
Preserve immutable/self APIs and legacy fixture/generator streams.
Add independent native/Rust face construction and curve/point records.
Native production checks remain blocked by baseline Clang narrowing;
keep the feature draft pending those gates.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
2026-10-26 18:20:44 +01:00
Thijs Damsma 8aada1beb2 Merge commit '7895407' into codex/difftest-positive-original-trim 2026-10-26 17:45:26 +01: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
Thijs Damsma 9e13f58163 difftest: add native positive original-trim controls
Construct only the two verified fixed plane and creased inputs. Reuse the existing p10 graph and sampled-geometry observer with its full snapshot metadata, without changing existing operations.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-26 16:52:06 +01: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