solidcore

Units / blend

blend.fillet_geom_p6 green

Layer
60
Upstream lines
1,813
Functions
17
Rust module
blend::fillet_geom::p6

Status history

Oct 12Nov 25
  1. todo 1,813 lines
  2. partial 1,813 lines
  3. green 1,813 lines

Source: crates/solidcore/src/blend/fillet_geom/p6.rs

Upstream: source/SMLib/src/SmFilletGeom.cpp

Port-plan notes

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

GREEN (own reader, face-handle context): the Rust side reads its .smb targets with the Rust reader (crate::own_reader), so face surfaces are face-owned as in the C++ B-rep; CalcBlendingRail (and CalcBlendingGeom's lift in blend.fillet_geom_p4) now take the target as &mut Brep and run GlobalPointSolve, LiftCurve and DropCurve on the face's surface through BrepFaceServices (handle CacheObject::Surface(face)), so smsurf_GetSurfaceCache builds the face's trimmed cache as upstream; 400 cases, 400 pass, 0 failed, 0 deferred, max_rel_err=0 (the 37 cone/vase_rev/Endcap/torus/Mouse/box_with_large_fillet cases that deferred at SurfaceCache::face under topology.face_p2 now compare; plan/findings/blend.fillet_geom_p6--addendum-2026-10-28-face-handle-context-wired.md). Earlier: GREEN (PR #1004): wired RailEdgeuseIntersect with geometry-owned offset surfaces on base FilletSolver (with UB-204 missing-offset guard) and RecordFilletError into ErrorInfo::note_merge_error (GeomErrorObject, record_fillet_error_in); difftest 400/400 pass bit-identical (0 failed, 0 deferred, max_rel_err=0, with_values=400); --perturb SENSITIVE 400/400; --fuzz 500 FUZZ-PASS (0 differs, 0 crashes, 0 panics). main CI e33985411 (2026-10-23): PARTIAL blend.fillet_geom_p6 cases=400 passed=322 failed=0 deferred=78 blocked_by=blend.fillet_executive_p1(9),blend.fillet_geom_p1(8),harness:analytic-geometry-export(61). 17 fns; largest: SmFilletGeom::TrimOriginalSurfaces, SmFilletEdge::CalcBlendingRail, SmFilletEdge::CalcSetBackRail, JoinTwoFilletVertsByCurves; unit-SCC #22 (220 units); 31 upstream test entry points reach this unit; PR #247 partial: 400 generated cases (edge on edge, fillet end, set-back rail, blending rail, ShouldSwapFaces, JoinTwoFilletVertsByCurves, SmFilletGeom::Copy, the rail lookups and SetUpRailPoint, sm_MoveTSP, RailEdgeuseIntersect, RecordFilletError), 304 pass bit-identical, 0 failed, 96 deferred (harness:analytic-geometry-export 61: ops evaluating cone/cylinder/torus/revolution faces or analytic edges the B-rep export carries as their B-spline part; topology.face_p4 11: sm_ClassifyFacePoint's face queries (the stub owner moved from topology.face_p3 when that unit landed); blend.fillet_executive_p1 9: NoteFilletError; blend.fillet_solver_p2 8: RailEdgeuseIntersect; intersect.surface_drop_lib_p3 7: DropCurve), max_rel_err=0, no absolute floors; --seeds 3000: 2396 pass, 604 deferred, 0 failed; --perturb SENSITIVE 304/304; --fuzz 2000 FUZZ-PASS. After topology.face_p4 (PR #239) landed: 315 pass, 0 failed, 85 deferred (its 11 sm_ClassifyFacePoint cases compare bit-identical); --perturb SENSITIVE 315/315. Built on #242 (blend.fillet_geom_p3, which merges #147 and #192; re-merged at eb6560b7). No co-ports: the corner members part 6 reads come from blend::fillet_corner::p3::FilletCorner (#256) and the solver lookup is blend::fillet_geom::p4::solver_of. TrimOriginalSurfaces is not compared against the C++, kernel-tested only (needs a fillet B-rep and executive topology-intersector mates the shim does not build); the curve-classification branch of ShouldSwapFaces is not generated. Wired UNPORTED(blend.fillet_geom_p6) in blend/fillet_geom/p3.rs (CalcEdgeOnEdge, CalcFilletEnd, CalcSetBackRail through CalcCornerEdgeGeom; sm_MoveTSP in ReCalcFilletGeom), p2.rs (GetRailIndexOfSideEU, RailEdgeuseIntersect, ShouldSwapFaces), p4.rs (GetRailIndexOfVertexuse, JoinTwoFilletVertsByCurves, CalcBlendingRail, RecordFilletError), fillet_corner/p3.rs (GetRailVertex) and fillet_executive/p3.rs (TrimOriginalSurfaces adapter); p4 deferred 36 -> 0 on part 6, corner_p3 33 -> 0. GetRailIndexOfVertexuse takes an Option and keeps upstream's NER(pFVU). Not wired: GetRailIndexOfVertexuse, GetRailVertex, SetUpRailPoint in blend/fillet_solver/p1.rs (split_fillet_geom_at_side_edge, split_fillet_geom): those take the solver's opaque FilletGeomRef and a plain pseudo Brep, not a FilletBrep, as for p3's TopologySplit. Found on the way: surface.surface_p2's sm_IntersectAndSplit passed no curve handle, so near-duplicate plane roots were not merged as upstream and LiftCurve split UV curves ~1e-10 off (findings.md); main's #444 fixed it the same way and this PR now uses main's fix. Moved onto #303 (blend.fillet_solver_p1 green: FilletGeomRef replaced by pseudo-B-rep FilletGeomIds; merge e67e390e): wired the solver's p6 calls (GetRailIndexOfVertexuse and GetRailVertex in SplitFilletGeomAtSideEdge, GetRailVertex/SetUpRailPoint in SplitFilletGeom) and SmFilletGeom::TopologySplit (blend.fillet_geom_p3); FilletBrep::rail_edgeuse_intersect drops its FilletGeomRef argument, re_calc_fillet_geom its geometry_id resolver. Numbers unchanged: 400 cases, 315 pass, 0 failed, 85 deferred; blend.fillet_corner_p3's geom_p6(33) deferrals now run (592 pass, 0 failed); adjust_tangent_corner's SplitFilletGeomAtSideEdge is wired through a new CornerEnv::solvers table; its one case (gen0067) is now rejected: the model's geometries have no solver and upstream dereferences NULL (shim refuses; corner_p3 592 pass, 357 deferred, 56 rejected). After merging main 5c3adfbe (#264 blend.fillet_geom_p5): 400 cases, 309 pass, 0 failed, 91 deferred; 6 generated cases (gen0044/0056/0093/0147/0281/0380) moved from pass to deferred at SmSurface::DropCurve (intersect.surface_drop_lib_p3), reached now that #264's p1/p2 solves name their objects as upstream does; TopologySplit's MakeRailEdgeuse/MakeFilletEdge call p5's (FilletBrep::make_rail_edgeuse_on). Analytic export (difftest/fillet-geom-p6-analytic-export): the runner now uses ImportTypes::inexact_surface (the shared export already rebuilds cone/cylinder/sphere/torus/revolution/extrusion faces and circles/ellipses exactly): 400 cases, 383 pass, 0 failed, 17 deferred (blend.fillet_executive_p1 9, blend.fillet_geom_p1 8); harness:analytic-geometry-export 61 -> 0, max_rel_err 0.

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
400
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: blend.fillet_geom_p1 green blend.fillet_solver_p1 green curve.curve_p2 green geom.extent1d green geom.extent2d green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green surface.surface_p2 partial topology.brep_p3 partial topology.edge green topology.edgeuse_p1 green topology.topology green topology.vertex green

Soft dependencies: blend.fillet_corner_p1 green blend.fillet_executive_p1 green blend.fillet_solver_p2 green boolean.merge_p1 green boolean.topology_intersector_p1 green curve.curve_p6 green curve.hermite_curve green geom.context green geom.geom_utility_p1 green intersect.curve_class_p1 green intersect.point_class green intersect.surface_drop_lib_p3 green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p2 green surface.offset_surface green surface.surface_p11 green surface.surface_p4 green surface.surface_p7 green topology.edgeuse_p3 green topology.face_p2 partial topology.loopuse green topology.topology_traverser green topology.vertexuse green

Dependents: blend.fillet_geom_p2 green blend.fillet_geom_p5 green

Soft dependents: blend.fillet_corner_p2 partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmFilletEdge::CalcBlendingRailSmFilletGeom.cpp:6341318[FilletBrep::calc_blending_rail]
SmFilletEdge::CalcEdgeOnEdgeSmFilletGeom.cpp:7521107[FilletBrep::calc_edge_on_edge]
SmFilletEdge::CalcFilletEndSmFilletGeom.cpp:7743163[FilletBrep::calc_fillet_end]
SmFilletEdge::CalcSetBackRailSmFilletGeom.cpp:7919242[FilletBrep::calc_set_back_rail]
SmFilletEdge::ShouldSwapFacesSmFilletGeom.cpp:846275[FilletBrep::should_swap_faces]
JoinTwoFilletVertsByCurvesSmFilletGeom.cpp:8604209[join_two_fillet_verts_by_curves]
SmFilletGeom::CopySmFilletGeom.cpp:908197[FilletBrep::copy_geom]
SmFilletGeom::FindEdgeTangentAtPointSmFilletGeom.cpp:920733[FilletBrep::find_edge_tangent_at_point]
SmFilletGeom::GetRailIndexOfSideEUSmFilletGeom.cpp:969646[FilletBrep::rail_index_of_side_eu]
SmFilletGeom::GetRailIndexOfVertexuseSmFilletGeom.cpp:975220[FilletBrep::rail_index_of_vertexuse]
SmFilletGeom::GetRailVertexSmFilletGeom.cpp:981910[FilletBrep::rail_vertex]
SmFilletGeom::SetUpRailPointSmFilletGeom.cpp:986764[FilletBrep::set_up_rail_point]
sm_MoveTSPSmFilletGeom.cpp:1128831[move_tsp]
SmFilletGeom::RailEdgeuseIntersectSmFilletGeom.cpp:1181229[FilletBrep::rail_edgeuse_intersect]
SmFilletGeom::TrimOriginalSurfacesSmFilletGeom.cpp:12226346[FilletBrep::trim_original_surfaces_with_solver]
SmFilletGeom::RecordFilletErrorSmFilletGeom.cpp:1321117[FilletBrep::record_fillet_error], [FilletBrep::record_fillet_error_in]
SmFilletBrep::SmFilletBrepSmFilletGeom.cpp:137506[FilletBrep::new](super::p1::FilletBrep::new) (in part 1)
Module file-header table (17 rows)
RustUpstream
[FilletBrep::calc_blending_rail]SmFilletEdge::CalcBlendingRail
[FilletBrep::calc_edge_on_edge]SmFilletEdge::CalcEdgeOnEdge
[FilletBrep::calc_fillet_end]SmFilletEdge::CalcFilletEnd
[FilletBrep::calc_set_back_rail]SmFilletEdge::CalcSetBackRail
[FilletBrep::should_swap_faces]SmFilletEdge::ShouldSwapFaces
[join_two_fillet_verts_by_curves]JoinTwoFilletVertsByCurves
[FilletBrep::copy_geom]SmFilletGeom::Copy
[FilletBrep::find_edge_tangent_at_point]SmFilletGeom::FindEdgeTangentAtPoint
[FilletBrep::rail_index_of_side_eu]SmFilletGeom::GetRailIndexOfSideEU
[FilletBrep::rail_index_of_vertexuse]SmFilletGeom::GetRailIndexOfVertexuse
[FilletBrep::rail_vertex]SmFilletGeom::GetRailVertex
[FilletBrep::set_up_rail_point]SmFilletGeom::SetUpRailPoint
[move_tsp]sm_MoveTSP
[FilletBrep::rail_edgeuse_intersect]SmFilletGeom::RailEdgeuseIntersect
[FilletBrep::trim_original_surfaces_with_solver]SmFilletGeom::TrimOriginalSurfaces
[FilletBrep::record_fillet_error], [FilletBrep::record_fillet_error_in]SmFilletGeom::RecordFilletError
[FilletBrep::new](super::p1::FilletBrep::new) (in part 1)SmFilletBrep::SmFilletBrep (CO-PORTED in blend.fillet_geom_p1)

Upstream tests reaching this unit

SM_API_test:TestSmFilletPreview, SM_API_test:TestSmSurfaceSurfaceFillet, SM_API_test:TestSmCircularFillet, SM_API_test:TestSmChamferFillet, SM_API_test:TestSmFilletEdges, SM_API_test:TestSmFilletEdgesPerEdge