solidcore

Units / surface

surface.surface_p1 partial

Layer
29
Upstream lines
2,458
Functions
75
Rust module
surface::surface::p1

Source: crates/solidcore/src/surface/surface/p1.rs

Upstream: source/SMLib/inc/SmSTEPSurface.h, source/SMLib/inc/SmSurface.h, source/SMLib/src/SmSTEPSurface.cpp, source/SMLib/src/SmSurface.cpp

Notes

PARTIAL (PR #43): difftest 806 cases (6 fixture + 800 generated), 764 pass bit-identical, 42 deferred (surface.surface_p6 17: CalculateContinuities in every surface cache build (Cache, BBox of curve-bounded/STEP surfaces, DomCont of non-STEP surfaces); curve.iso_curve 13: ApproximateSize of non-B-spline kinds; surface.surface_p5 12: IsSingularity), --perturb 764/764; SmSTEPSurface ported here; a polar box of a curve-bounded or STEP surface is refused (upstream recurses without bound, UB-84); the Evaluate1stDerivatives / Evaluate2ndDerivatives / EvaluateDirectionalDerivs co-ports of surface.surface_p7 (PR #24) moved here (surface::surface::p1, generic over SurfaceEvaluate); shim guards GetDomainWithContinuity without a surface cache (upstream reads it through NULL) with SM_ERR. No UNPORTED(surface.surface_p1) stubs remain; the call sites this unit cannot wire are DISPATCH GAPs whose errors name the real blocker: grid expand_hierarchy (the element holds a handle and no store turns it into the Surface; smsurf_GetSurfaceCache, surface.surface_p2), the p7 SP/SS solver patch reads and sm_IsNodeValid (a Tree does not reach its owning cache; surface.surface_cache_p1), ApproximateSize and the iso_curve/crv_on_surf readers of non-B-spline surfaces (the curves hold an SmBSplineSurface; curve.iso_curve / curve.crv_on_surf); a polar box of a curve-bounded/STEP surface is refused (UB-84). CO-PORTED in surface.surf_of_revolution_p3 (PR #29): SmSurface::ConvertDomainFromNURBSToSTEP for surfaces of revolution; on merging with this unit both now share surface::surface::p1::convert_domain_from_nurbs_to_step_with (SurfOfRevolution::convert_domain_from_nurbs_to_step and the Revolved trait call it). CO-PORTED in intersect.surface_intersector_p1 (PR #33): SmSurface::EvaluateDirectionalDerivs, SmSurface::Evaluate1stDerivatives (one-line Evaluate wrappers) -> private helpers in intersect::surface_intersector::p1. CO-PORTED in surface.surface_p9 (PR #6): SmCSIGlobalSolver members the LocalSolve body reads (the curve being intersected, the surface cache holding the node patches, and the kernel) -> optional borrowed fields curve, surface_cache, kernel on surface::surface::p1::CsiGlobalSolver (the constructor is unchanged; LocalSolve lives in surface::surface::p9). 75 fns; largest: SmSurface::CacheMakeOrValidate, SmSurface::IsDegenerateCurve, SmSurface::CreateSilhouetteCurves, SmSurface::IsDegeneratePoint; cycle back-edges (call into later units; stub or co-port): surface.offset_surface(3), mass.integrator(2), surface.srf_in_volume(2), intersect.surface_silhouette(1), intersect.surface_tracer(1), topology.face_p4(1); unit-SCC #22 (220 units); 320 upstream test entry points reach this unit [surface.surface_p6 wired (PR #92): 806 cases, 781 pass, 25 deferred (curve.iso_curve 13, surface.surface_p5 12)] Re-run with surface.surface_p5's back-edges wired (PR #50): cases=806 passed=764 failed=0 deferred=42 max_rel_err=0e0 blocked_by=curve.iso_curve(13),surface.surface_p3(12),surface.surface_p6(17). Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 806 cases, 781 pass, 25 deferred (curve.iso_curve 25). surface.surface_p11 (PR #120, after merging main with surface.surface_p3): CsGlobalSolver gained the borrowed curve and surface cache its leaf solve reads, and BranchMayContainAnswers uses the cache's polar boxes when it has them: cases=806 passed=793 failed=0 deferred=13 (curve.iso_curve 13).

Difftest

Cases
806
Passed
793
Deferred
13
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
curve.iso_curve green13

Report JSON (per-case results)

Dependencies

Depends on: geom.a_object partial geom.extent1d green geom.extent2d green geom.extent3d green geom.global_solver partial geom.object partial geom.pseudo_box green geom.solution_array partial geom.tol green geom.tree partial geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_p1 green surface.surface_cache_p1 green surface.surface_cache_p3 partial surface.surface_p2 partial topology.database_io green

Soft dependencies: curve.curve_p2 green curve.curve_p7 green curve.iso_curve green curve.line green geom.context green geom.geom_utility_p1 green geom.polar_box green nurbs.b_spline_curve_n_lib green surface.cone_p1 green surface.curve_bounded_surface green surface.plane_p1 partial surface.sphere green surface.surf_of_extrusion_p1 green surface.surf_of_revolution_p1 green surface.torus green surface.trim_srf_cache partial

Dependents: blend.fillet_executive_p1 todo blend.fillet_standard_solver_p1 claimed intersect.surface_drop_curve partial intersect.surface_drop_lib_p1 partial intersect.surface_drop_lib_p2 green intersect.surface_drop_lib_p3 claimed offset.offset_geometry_creation claimed surface.offset_surface green surface.srf_in_volume partial surface.surface_p10 partial surface.surface_p11 partial surface.surface_p3 green surface.surface_p8 partial surface.surface_point_solve_p1 green surface.surface_point_solve_p3 green topology.brep_p3 claimed topology.brep_p7 claimed topology.edgeuse_p3 claimed topology.face_p1 partial

Soft dependents: blend.fillet_corner_p2 todo blend.fillet_custom_solver partial blend.fillet_geom_p1 claimed blend.fillet_geom_p4 todo blend.fillet_intersector claimed blend.fillet_solver_p1 claimed blend.fillet_standard_solver_p2 todo blend.hcr claimed boolean.merge_p1 partial boolean.merge_p3 todo boolean.topology_intersector_p3 claimed intersect.curve_class_p1 partial intersect.curve_class_p4 claimed intersect.point_class partial intersect.ray_tracer partial intersect.surface_intersector_p1 partial intersect.surface_intersector_p3 partial intersect.topology_solver_p1 partial intersect.topology_solver_p2 partial offset.offset_executive_p1 claimed query.brep claimed query.face_p1 claimed query.face_p2 partial query.face_p3 claimed surface.surface_point_solve_p2 green sweep.api_surfaces partial sweep.topology_sweep claimed topology.brep_cache partial topology.brep_p1 claimed topology.brep_p10 claimed topology.brep_p2 claimed topology.brep_p4 claimed topology.brep_p5 claimed topology.brep_p6 claimed topology.brep_p9 claimed topology.edge partial topology.edgeuse_p1 partial topology.edgeuse_p2 partial topology.face_p2 partial topology.face_p3 claimed topology.face_p4 claimed topology.vertexuse partial

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmSTEPSurface::SmSTEPSurfaceSmSTEPSurface.h:461[StepSurface]
SmSTEPSurface::SetContextSmSTEPSurface.h:1142[StepSurface]
SmSTEPSurface::GetClassStringSmSTEPSurface.h:1331[StepSurface]
SmSTEPSurface::GetTypeSmSTEPSurface.h:1331[StepSurface]
SmSTEPSurface::GetTypeStringSmSTEPSurface.h:1331[StepSurface]
SmDropCurveFail::SmDropCurveFailSmSurface.h:1641[DropCurveFail::copy_of]
SmSurfaceEval::FailsEvalSmSurface.h:21862[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::PosSmSurface.h:21902[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::SuSmSurface.h:21922[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::SvSmSurface.h:21942[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::SuuSmSurface.h:21962[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::SuvSmSurface.h:21982[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSurfaceEval::SvvSmSurface.h:22002[SurfaceEval::fails_eval], [SurfaceEval::pos], ...
SmSTEPSurface::SmSTEPSurfaceSmSTEPSurface.cpp:216[StepSurface]
SmSTEPSurface::~SmSTEPSurfaceSmSTEPSurface.cpp:335
SmSTEPSurface::GetNaturalUVDomainSmSTEPSurface.cpp:444[StepSurface]
SmSTEPSurface::operator==SmSTEPSurface.cpp:5624[StepSurface]
SmSTEPSurface::EvaluatePointSmSTEPSurface.cpp:866[StepSurface]
SmSTEPSurface::EvaluateSmSTEPSurface.cpp:9845[StepSurface]
SmSTEPSurface::GetDomainWithContinuitySmSTEPSurface.cpp:1559[StepSurface]
SmSTEPSurface::GetKnotsSmSTEPSurface.cpp:17248[StepSurface]
SmSTEPSurface::ReadFromDBSmSTEPSurface.cpp:28941[StepSurface]
SmSTEPSurface::IsKindOfSmSTEPSurface.cpp:3354[StepSurface]
SmDropCurveFail::SmDropCurveFailSmSurface.cpp:8355[DropCurveFail::copy_of]
SmSurface::SmSurfaceSmSurface.cpp:71114[Surface::new] (part 2), Clone
SmSurface::SmSurfaceSmSurface.cpp:73116[Surface::new] (part 2), Clone
sm_GetSurfaceToEvaluateSmSurface.cpp:362210[surface_to_evaluate], [is_point_valid], [is_node_valid]
sm_IsPointValidSmSurface.cpp:364736[surface_to_evaluate], [is_point_valid], [is_node_valid]
sm_IsNodeValidSmSurface.cpp:369935[surface_to_evaluate], [is_point_valid], [is_node_valid]
SmIsoCurveLengthIFEO::EvaluateSmSurface.cpp:521045[IsoCurveLengthIntegrand::evaluate], [AreaIntegrand]
SmAreaIFEO::EvaluateSmSurface.cpp:526323[IsoCurveLengthIntegrand::evaluate], [AreaIntegrand]
SmSurface::operator==SmSurface.cpp:529314[Surface::approx_eq], [Surface::base_eq]
SmSurface::SetOwnerSmSurface.cpp:531317[Surface::set_owner], [Surface::face]
SmSurface::CalculateBoundingBoxSmSurface.cpp:539780[Surface::calculate_bounding_box], [SurfaceBoxes]
SmSurface::ApproximateSizeSmSurface.cpp:567644[Surface::approximate_size]
SmSurface::CacheMakeOrValidateSmSurface.cpp:5784301[validate_surface_cache], [make_surface_cache], [make_trim_srf_cache], [cache_tolerances]
SmFindSingularParamWithGivenTangentDirEFO::SmFindSingularParamWithGivenTangentDirEFOSmSurface.cpp:658115[FindSingularParamWithGivenTangentDir]
SmFindSingularParamWithGivenTangentDirEFO::EvaluateSmSurface.cpp:664556[StepSurface]
sm_CrossedSeamOrPoleSmSurface.cpp:778050[crossed_seam_or_pole]
SmSurface::ComputeParamDirectionSmSurface.cpp:874438[Surface::compute_param_direction]
SmSurface::EvaluateDirectionalDerivsSmSurface.cpp:878827[Surface::evaluate_directional_derivs]
SmSurface::CreateOffsetSurfaceSmSurface.cpp:941725[Surface::create_offset_surface]
SmSurface::CreateSilhouetteCurvesSmSurface.cpp:9594105[Surface::create_silhouette_curves]
SmSurface::Evaluate1stDerivativesSmSurface.cpp:1074625[Surface::evaluate_1st_derivatives], [Surface::evaluate_2nd_derivatives]
SmSurface::Evaluate2ndDerivativesSmSurface.cpp:1079028[Surface::evaluate_1st_derivatives], [Surface::evaluate_2nd_derivatives]
SmSurface::EvaluateSTEPSmSurface.cpp:1095034[Surface::evaluate_step], [Surface::evaluate_step_point], [Surface::evaluate_simple]
SmSurface::EvaluateSTEPPointSmSurface.cpp:109919[Surface::evaluate_step], [Surface::evaluate_step_point], [Surface::evaluate_simple]
SmSurface::EvaluateSimpleSmSurface.cpp:1153037[Surface::evaluate_step], [Surface::evaluate_step_point], [Surface::evaluate_simple]
SmSurface::GetFaceSmSurface.cpp:1198724[Surface::set_owner], [Surface::face]
SmSurface::GetDomainWithContinuitySmSurface.cpp:12048100[StepSurface]
SmSurface::ConvertDomainFromSTEPToNURBSSmSurface.cpp:1229622[Surface::convert_domain_from_step_to_nurbs], [Surface::convert_domain_from_nurbs_to_step]
SmSurface::ConvertDomainFromNURBSToSTEPSmSurface.cpp:1232430[Surface::convert_domain_from_step_to_nurbs], [Surface::convert_domain_from_nurbs_to_step]
SmCSIGlobalSolver::SmCSIGlobalSolverSmSurface.cpp:1381413[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmCSGlobalSolver::SmCSGlobalSolverSmSurface.cpp:1730511[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmCSGlobalSolver::BranchMayContainAnswersSmSurface.cpp:1738117[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmLSIGlobalSolver::SmLSIGlobalSolverSmSurface.cpp:1793419[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmSPGlobalSolver::SmSPGlobalSolverSmSurface.cpp:1954814[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmSSGlobalSolver::SmSSGlobalSolverSmSurface.cpp:2094513[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]
SmSurface::IsPeriodicSmSurface.cpp:2243899[Surface::is_periodic]
SmSurface::IsDegeneratePointSmSurface.cpp:22550102[Surface::is_degenerate_point], [base_is_degenerate_point]
SmSurface::IsDegenerateCurveSmSurface.cpp:22665241[Surface::is_degenerate_curve], [base_is_degenerate_curve]
SmSurface::IsFlatCornerSmSurface.cpp:2326844[Surface::is_flat_corner], [Surface::is_on_boundary], [Surface::is_in_domain], [Surface::is_analytic]
SmSurface::IsOnBoundarySmSurface.cpp:2331943[Surface::is_flat_corner], [Surface::is_on_boundary], [Surface::is_in_domain], [Surface::is_analytic]
SmSurface::IsInDomainSmSurface.cpp:2363155[Surface::is_flat_corner], [Surface::is_on_boundary], [Surface::is_in_domain], [Surface::is_analytic]
SmSurface::IsAnalyticSmSurface.cpp:2369410[Surface::is_flat_corner], [Surface::is_on_boundary], [Surface::is_in_domain], [Surface::is_analytic]
SmSurface::FindUVCurveIvlInDomainSmSurface.cpp:2434768[find_uv_curve_ivl_in_domain]
SmCSIntersectENFO::SmCSIntersectENFOSmSurface.cpp:2444811[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmCSNormalizeENFO::SmCSNormalizeENFOSmSurface.cpp:2520514[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmFindPSNormalENFO::SmFindPSNormalENFOSmSurface.cpp:258239[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmSSPIntersectENFO::SmSSPIntersectENFOSmSurface.cpp:2659511[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmSSINormalizeENFO::SmSSINormalizeENFOSmSurface.cpp:269558[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmSSNormalizeENFO::SmSSNormalizeENFOSmSurface.cpp:2806912[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmSSSIntersectENFO::SmSSSIntersectENFOSmSurface.cpp:286259[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]
SmSurface::SnapToKnotsSmSurface.cpp:2959938[Surface::snap_to_knots]
smsurf_EvaluateNormalSectionSmSurface.cpp:2994369[evaluate_normal_section]
Module file-header table (33 rows)
RustUpstream
[StepSurface]SmSTEPSurface (constructors, destructor, GetNaturalUVDomain, operator==, EvaluatePoint, Evaluate, GetDomainWithContinuity, GetKnots, ReadFromDB, IsKindOf, SetContext, GetType, GetTypeString, GetClassString)
[Surface::new] (part 2), CloneSmSurface::SmSurface (both)
[Surface::approx_eq], [Surface::base_eq]operator== (virtual), SmSurface::operator==
[Surface::set_owner], [Surface::face]SetOwner, GetFace
[Surface::calculate_bounding_box], [SurfaceBoxes]CalculateBoundingBox (base body)
[Surface::approximate_size]ApproximateSize
[validate_surface_cache], [make_surface_cache], [make_trim_srf_cache], [cache_tolerances]CacheMakeOrValidate
[Surface::compute_param_direction]ComputeParamDirection
[Surface::evaluate_directional_derivs]EvaluateDirectionalDerivs
[Surface::create_offset_surface]CreateOffsetSurface
[Surface::create_silhouette_curves]CreateSilhouetteCurves
[Surface::evaluate_1st_derivatives], [Surface::evaluate_2nd_derivatives]Evaluate1stDerivatives, Evaluate2ndDerivatives
[Surface::evaluate_step], [Surface::evaluate_step_point], [Surface::evaluate_simple]EvaluateSTEP, EvaluateSTEPPoint, EvaluateSimple
[Surface::domain_with_continuity]GetDomainWithContinuity
[Surface::convert_domain_from_step_to_nurbs], [Surface::convert_domain_from_nurbs_to_step]ConvertDomainFromSTEPToNURBS, ConvertDomainFromNURBSToSTEP
[Surface::is_periodic]IsPeriodic
[Surface::is_degenerate_point], [base_is_degenerate_point]IsDegeneratePoint
[Surface::is_degenerate_curve], [base_is_degenerate_curve]IsDegenerateCurve
[Surface::is_flat_corner], [Surface::is_on_boundary], [Surface::is_in_domain], [Surface::is_analytic]IsFlatCorner, IsOnBoundary, IsInDomain, IsAnalytic
[find_uv_curve_ivl_in_domain]FindUVCurveIvlInDomain (static)
[Surface::snap_to_knots]SnapToKnots
[evaluate_normal_section]smsurf_EvaluateNormalSection
[crossed_seam_or_pole]sm_CrossedSeamOrPole (static)
[surface_to_evaluate], [is_point_valid], [is_node_valid]sm_GetSurfaceToEvaluate, sm_IsPointValid, sm_IsNodeValid (static)
[zone_tol_3d], [map_to_2d_dir], [map_to_2d], [scaled_zero_of_surface]SmTol::GetZoneTol3d(const SmObject*) for surfaces, SmTol::MapTo2d (surface overloads), SmTol::GetScaledZero(const SmSurface&) (co-ports)
[map_to_2d_on_curve]SmTol::MapTo2d(const SmTol3d&, double, const SmCurve&, const SmSurface&) (co-port, first ported privately by intersect.curve_class_p1)
[SurfaceEval::fails_eval], [SurfaceEval::pos], ...SmSurfaceEval::FailsEval, Pos, Su, Sv, Suu, Suv, Svv
[DropCurveFail::copy_of]SmDropCurveFail copy constructor
[IsoCurveLengthIntegrand::evaluate], [AreaIntegrand]SmIsoCurveLengthIFEO::Evaluate, SmAreaIFEO::Evaluate
[FindSingularParamWithGivenTangentDir]SmFindSingularParamWithGivenTangentDirEFO (constructor, Evaluate)
[evaluate_1st_derivatives], [evaluate_2nd_derivatives], [SecondDerivatives], [evaluate_directional_derivs]Evaluate1stDerivatives, Evaluate2ndDerivatives, EvaluateDirectionalDerivs for code generic over [SurfaceEvaluate] (first co-ported by surface.surface_p7)
[CsiGlobalSolver], [CsGlobalSolver], [LsiGlobalSolver::new], [SpGlobalSolver::new], [SsGlobalSolver::new]the constructors of SmCSIGlobalSolver, SmCSGlobalSolver (and its BranchMayContainAnswers), SmLSIGlobalSolver, SmSPGlobalSolver, SmSSGlobalSolver
[CsIntersectEnfo], [CsNormalizeEnfo], [FindPsNormalEnfo], [SspIntersectEnfo], [SsiNormalizeEnfo], [SsNormalizeEnfo], [SssIntersectEnfo]the constructors of SmCSIntersectENFO, SmCSNormalizeENFO, SmFindPSNormalENFO, SmSSPIntersectENFO, SmSSINormalizeENFO, SmSSNormalizeENFO, SmSSSIntersectENFO

Upstream tests reaching this unit

SM_API_test:TestSmPrincipalDirectionPairing, prog_test:my_test_extent3d, prog_test:my_test_vector2d, prog_test:my_test_surface_closest_point, prog_test:my_test_drop_point, prog_test:my_test_matrix