solidcore

Units / topology

topology.brep_mirror green

Layer
48
Upstream lines
330
Functions
0
Rust module
topology::brep::mirror

Status history

Oct 12Nov 25
  1. green 330 lines

Source: crates/solidcore/src/topology/brep/mirror.rs

Upstream: source/SMLib/src/SmBrep.cpp, source/SMLib/src/SmAxis2Placement.cpp, source/SMLib/src/SmBSplineSurface.cpp, source/SMLib/src/SmOffsetSurface.cpp, source/SMLib/src/SmCrvOnSurf.cpp, source/SMLib/src/SmCrvInVolume.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

GREEN: difftest 196 cases (68 fixtures: 17 upstream .smb solids x 4 planes, + 128 generated), 196 pass, 0 deferred, 0 failed, max_rel_err=0e0 (--seeds 1000: 1068/1068; --perturb: 196/196 detected; 3 repeat runs identical, ASLR on). NOT IN callgraph/units.json: SmBrep::Mirror and its callees are in harness/callgraph/unused_functions.txt (no upstream test or SM_API entry point reaches them). Owns SmBrep::Mirror (SmBrep.cpp:23449), SmAxis2Placement::MirrorPoint / MirrorVector, and the CreateMirrorCurve / CreateMirrorSurface overrides of SmBSplineSurface, SmOffsetSurface, SmCrvOnSurf and SmCrvInVolume; the SmBSplineCurve and SmSrfInVolume overrides were ported earlier (nurbs.b_spline_curve_p1, surface.srf_in_volume). Rust: topology::brep::mirror::mirror; Axis2Placement::mirror_point / mirror_vector; Curve::create_mirror_curve and Surface::create_mirror_surface dispatch every kind (SM_ERR where upstream's base default applies: Hermite, projected, iso, offset, conic and composite curves; curve bounded and STEP surfaces). The runner compares status, the whole graph and samples of every edge curve, edge use UV trim curve and face surface (type code, domain, points). Uncertified, not reached by a fixture: the OffsetSurface, CrvOnSurf, CrvInVolume and SrfInVolume overrides, the SM_ERR kinds, and bodies with a composite edge (no arena model). Excluded: Solids/fillet_ts.smb (the native vertex list holds a vertex the import does not create) and SmallBox.smb (the runner's native import crashes the process). Deviation: make_missing_nurbs makes the NURBs of analytic surfaces before FindAndSetInfiniteRegion (upstream's bounding box makes them lazily; query.brep--boolean-results-need-their-analytic-nurbs). The runner recomputes Face::shell / Shell::faces on both sides (no upstream counterpart) and sets the native face / vertex list orders on the Rust import. SmBrep::Transform(const double[4][4], SmBoolean) ported here (#1570, PR #1595): topology::brep::mirror::transform_matrix; difftest 341 cases (adds 49 transform_matrix fixtures on box/cylinder/sphere/cone + 96 generated mat####), 0 deferred, max_rel_err 0; mat0076 (near-flat sheared revolution) needs the ray-fire GetTree dispatch of PR #1600 and the SmSurfaceEval::EvalNormal fix of PR #1690 (the brute-force UV trim drop's GlobalPointSolve on the flattened face); with both, 341/341 pass.

Goldens

This is committed inventory, not a runtime result or a correctness proof. A golden records what solidcore produced when blessed. Current results require the canonical CI gate, not these counts.

Golden records
341
Stored error outcomes
0
Stored deferrals
0
Stored harness rejections
0
Known-failure entries
0

Metadata counts describe fields in the stored records; they are not passes or live failures.

Source at f9704ee3b: golden JSONL · known-failure list.

Dependencies

Depends on: curve.curve_p2 green geom.axis2_placement green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_p1 green surface.surface_p2 partial topology.brep_p1 green topology.brep_p2 green topology.brep_p5 green topology.edge green topology.face_p1 green topology.face_p3 green

Soft dependencies: none

Dependents: none

Soft dependents: none

Upstream functions

No upstream functions listed in harness/callgraph/units.json.

Module file-header table (11 rows)
RustUpstream
[mirror], [mirror_with_notifications]SmBrep::Mirror
[transform_matrix], [transform_matrix_with_notifications]SmBrep::Transform(const double[4][4], SmBoolean)
fold_status (private)eStat = std::max(..., eStat)
Axis2Placement::mirror_pointSmAxis2Placement::MirrorPoint
Axis2Placement::mirror_vectorSmAxis2Placement::MirrorVector
Curve::create_mirror_curveSmCurve::CreateMirrorCurve (virtual)
Surface::create_mirror_surfaceSmSurface::CreateMirrorSurface (virtual)
BSplineSurface::create_mirror_surfaceSmBSplineSurface::CreateMirrorSurface
OffsetSurface::create_mirror_surfaceSmOffsetSurface::CreateMirrorSurface
CrvOnSurf::create_mirror_curveSmCrvOnSurf::CreateMirrorCurve
CrvInVolume::create_mirror_curveSmCrvInVolume::CreateMirrorCurve

Upstream tests reaching this unit

none