solidcore

Units / surface

surface.sphere green

Layer
28
Upstream lines
2,861
Functions
34
Rust module
surface::sphere

Status history

Oct 12Nov 25
  1. todo 2,861 lines
  2. green 2,861 lines

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

Upstream: source/SMLib/inc/SmSphere.h, source/SMLib/src/SmSphere.cpp

Port-plan notes

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

#1433: opt-in Kernel::fixes.found_torus_sphere_keep_tested_nurb (WR-493, smlib@7ea6a96) in is_nurb_surface_sphere (half-meridian tol 360*SM_EFF_ZERO, keeps the tested NURB); default unchanged. main CI e33985411 (2026-10-23): PASS surface.sphere cases=816 passed=816 failed=0 deferred=0. GREEN (PR #100): difftest 800 generated cases, 800 pass bit-identical, 0 deferred, --perturb 800/800 (every op: CreateCanonical and the constructor with MakeNurb incl. swap/inside-out/partial-domain/explicit-generator, operator==, Copy, CreateOffsetSurface (+rebuild), CreateIsoParametricCurve, ConvertUVFromSTEPToNURBS/NURBSToSTEP, EvaluateSTEP(Point), EvaluateNormal, RebuildSTEPFromNURBParameters, Transform, IsClosed/U/V, STEPInversion, CreateTrimmedCircleSegments, IntersectWithPlane/Sphere/Cone, GlobalSurfaceIntersect with a plane, IsNurbSurfaceSphere). DISPATCH GAP: the sphere is not a SurfaceKind variant (as the torus): SmSphere::GlobalSurfaceIntersect falls back to SmSurface::GlobalSurfaceIntersect with a sphere this as Unported (names surface.sphere), Surface::read_from_db reads the record with Sphere::read_from_db and then reports the gap, and the ssi engine defers SurfaceSpec::Sphere on surface.surface_p2. Sphere implements Revolved so SurfOfRevolution::intersect_with_sphere takes it. No UNPORTED(surface.sphere) stubs remain. Not ported (not in the unit's function list): GetCanonical, GlobalPointSolveSTEP, RotationAboutAxisX/Y/Z, AssertValid, WriteToDB, Dump. 34 fns; largest: SmSphere::CreateTrimmedCircleSegments, SmSphere::IntersectWithSphere, SmSphere::IsNurbSurfaceSphere, SmSphere::IntersectWithCone; unit-SCC #22 (220 units); 319 upstream test entry points reach this unit

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
816
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 curve.ellipse_p1 green curve.ellipse_p2 green geom.axis2_placement green geom.extent1d green geom.extent2d green geom.extent3d green geom.geom_utility_p1 green geom.object green geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_p1 green nurbs.b_spline_surface_p2 green surface.cone_p1 green surface.surf_of_revolution_p1 green surface.surf_of_revolution_p2 green surface.surf_of_revolution_p3 green surface.surface_p2 partial topology.database_io green

Soft dependencies: curve.curve_p4 green geom.geom_utility_p2 green nurbs.b_spline_curve_p2 green surface.plane_p1 partial surface.plane_p2 green

Dependents: surface.surface_assert_valid green

Soft dependents: primitive.primitive_creation_p1 green surface.cone_p3 green surface.surface_p1 green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmSphere::SmSphereSmSphere.h:1171[Sphere], [Sphere::new], [SphereOptions]
SmSphere::~SmSphereSmSphere.h:1421Drop (implicit)
SmSphere::GetRadiusSmSphere.h:2801[Sphere::radius], [Sphere::inside_out]
SmSphere::GetMaxAnalyticDomainSmSphere.h:2941[Sphere::max_analytic_domain]
SmSphere::GetClassStringSmSphere.h:5191[Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string]
SmSphere::GetTypeSmSphere.h:5191[Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string]
SmSphere::GetTypeStringSmSphere.h:5191[Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string]
SmSphere::SmSphereSmSphere.cpp:4056[Sphere], [Sphere::new], [SphereOptions]
SmSphere::SmSphereSmSphere.cpp:1027[Sphere], [Sphere::new], [SphereOptions]
SmSphere::operator==SmSphere.cpp:11624[Sphere::approx_eq]
SmSphere::CopySmSphere.cpp:14610Clone, [Sphere::copy]
SmSphere::CreateCanonicalSmSphere.cpp:16852[Sphere::create_canonical]
SmSphere::CreateOffsetSurfaceSmSphere.cpp:259156[Sphere::create_offset_surface]
SmSphere::CreateIsoParametricCurveSmSphere.cpp:431167[Sphere::create_iso_parametric_curve]
SmSphere::ConvertUVFromSTEPToNURBSSmSphere.cpp:702106[Sphere::convert_uv_from_step_to_nurbs]
SmSphere::ConvertUVFromNURBSToSTEPSmSphere.cpp:81544[Sphere::convert_uv_from_nurbs_to_step]
SmSphere::EvaluateSTEPSmSphere.cpp:873101[Sphere::evaluate_step], [Sphere::evaluate_step_point]
SmSphere::EvaluateSTEPPointSmSphere.cpp:9909[Sphere::evaluate_step], [Sphere::evaluate_step_point]
SmSphere::EvaluateNormalSmSphere.cpp:100536[Sphere::evaluate_normal]
SmSphere::GetSTEPUVDomainSmSphere.cpp:10486[Sphere::step_uv_domain]
SmSphere::GlobalSurfaceIntersectSmSphere.cpp:133287[Sphere::global_surface_intersect_with]
SmSphere::IntersectWithPlaneSmSphere.cpp:1425182[Sphere::intersect_with_plane]
SmSphere::IntersectWithSphereSmSphere.cpp:1613297[Sphere::intersect_with_sphere]
SmSphere::CreateTrimmedCircleSegmentsSmSphere.cpp:1917457[Sphere::create_trimmed_circle_segments]
SmSphere::IntersectWithConeSmSphere.cpp:2381285[Sphere::intersect_with_cone]
SmSphere::IsNurbSurfaceSphereSmSphere.cpp:2673290[Sphere::is_nurb_surface_sphere]
SmSphere::RebuildSTEPFromNURBParametersSmSphere.cpp:2973236[Sphere::rebuild_step_from_nurb_parameters]
SmSphere::IsClosedSmSphere.cpp:322252[Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v]
SmSphere::IsClosedUSmSphere.cpp:328410[Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v]
SmSphere::IsClosedVSmSphere.cpp:330410[Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v]
SmSphere::STEPInversionSmSphere.cpp:345487[Sphere::step_inversion]
SmSphere::TransformSmSphere.cpp:354741[Sphere::transform]
SmSphere::ReadFromDBSmSphere.cpp:387442[Sphere::read_from_db]
SmSphere::IsKindOfSmSphere.cpp:39214[Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string]
Module file-header table (33 rows)
RustUpstream
[Sphere], [Sphere::new], [SphereOptions]SmSphere, SmSphere(crOrigin, crXAxis, crYAxis, crAnalUVDomain, dRadius, ..)
[Sphere::empty]SmSphere()
Clone, [Sphere::copy]SmSphere(const SmSphere&), Copy
Drop (implicit)~SmSphere
[Sphere::approx_eq]operator==
[Sphere::create_canonical]CreateCanonical
[Sphere::make_nurb]SmSurfOfRevolution::MakeNurb on a sphere (virtual iso curves)
[Sphere::reparameterize]SmSurfOfRevolution::Reparameterize on a sphere (virtual iso curves)
[Sphere::adjust_step_uv_domain]SmSurfOfRevolution::AdjustSTEPUVDomain on a sphere (virtual iso curves)
[Sphere::trim_with_domain]SmSurfOfRevolution::TrimWithDomain on a sphere (virtual conversion and iso curves)
[Sphere::global_surface_intersect_with]GlobalSurfaceIntersect with the holding SmSurface
[Sphere::create_offset_surface]CreateOffsetSurface
[Sphere::create_iso_parametric_curve]CreateIsoParametricCurve
[Sphere::convert_uv_from_step_to_nurbs]ConvertUVFromSTEPToNURBS
[Sphere::convert_uv_from_nurbs_to_step]ConvertUVFromNURBSToSTEP
[Sphere::evaluate_step], [Sphere::evaluate_step_point]EvaluateSTEP, EvaluateSTEPPoint
[Sphere::evaluate_normal]EvaluateNormal
[Sphere::step_uv_domain]GetSTEPUVDomain
[Sphere::global_surface_intersect]GlobalSurfaceIntersect
[Sphere::intersect_with_plane]IntersectWithPlane
[Sphere::intersect_with_sphere]IntersectWithSphere
[Sphere::intersect_with_cone]IntersectWithCone
[Sphere::create_trimmed_circle_segments]CreateTrimmedCircleSegments
[Sphere::is_nurb_surface_sphere]IsNurbSurfaceSphere
[Sphere::fitted_nurb_surface_sphere]IsNurbSurfaceSphere as upstream returns it (the fitted circles' NURB)
[Sphere::rebuild_step_from_nurb_parameters]RebuildSTEPFromNURBParameters
[Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v]IsClosed, IsClosedU, IsClosedV
[Sphere::step_inversion]STEPInversion
[Sphere::transform]Transform
[Sphere::read_from_db]ReadFromDB
[Sphere::max_analytic_domain]GetMaxAnalyticDomain
[Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string]IsKindOf, GetType, GetTypeString, GetClassString (SM_COMMON)
[Sphere::radius], [Sphere::inside_out]GetRadius, GetInsideOut (inline)

Upstream tests reaching this unit

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, prog_test:my_test_reversed_line_join