Units / surface
surface.sphere green
- Layer
- 28
- Upstream lines
- 2,861
- Functions
- 34
- Rust module
surface::sphere
Source: crates/solidcore/src/surface/sphere.rs
Upstream: source/SMLib/inc/SmSphere.h, source/SMLib/src/SmSphere.cpp
Notes
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
Difftest
- Cases
- 800
- Passed
- 800
- Deferred
- 0
- Failed
- 0
- Both errored
- 0
- Max rel. error
- 0.0
- Tolerance
- 1e-09 rel.
- Seeds
- 16
Blocked by
Nothing: no deferred cases.
Report JSON (per-case results)
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 partial 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 partial surface.cone_p1 green surface.surf_of_revolution_p1 green surface.surf_of_revolution_p2 partial surface.surf_of_revolution_p3 partial surface.surface_p2 partial topology.database_io green
Soft dependencies: curve.curve_p4 partial geom.geom_utility_p2 green nurbs.b_spline_curve_p2 green surface.plane_p1 partial surface.plane_p2 partial
Dependents: none
Soft dependents: primitive.primitive_creation_p1 claimed surface.cone_p3 partial surface.surface_p1 partial
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmSphere::SmSphere | SmSphere.h:117 | 1 | [Sphere], [Sphere::new], [SphereOptions] |
SmSphere::~SmSphere | SmSphere.h:142 | 1 | Drop (implicit) |
SmSphere::GetRadius | SmSphere.h:280 | 1 | [Sphere::radius], [Sphere::inside_out] |
SmSphere::GetMaxAnalyticDomain | SmSphere.h:294 | 1 | [Sphere::max_analytic_domain] |
SmSphere::GetClassString | SmSphere.h:519 | 1 | [Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string] |
SmSphere::GetType | SmSphere.h:519 | 1 | [Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string] |
SmSphere::GetTypeString | SmSphere.h:519 | 1 | [Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string] |
SmSphere::SmSphere | SmSphere.cpp:40 | 56 | [Sphere], [Sphere::new], [SphereOptions] |
SmSphere::SmSphere | SmSphere.cpp:102 | 7 | [Sphere], [Sphere::new], [SphereOptions] |
SmSphere::operator== | SmSphere.cpp:116 | 24 | [Sphere::approx_eq] |
SmSphere::Copy | SmSphere.cpp:146 | 10 | Clone, [Sphere::copy] |
SmSphere::CreateCanonical | SmSphere.cpp:168 | 52 | [Sphere::create_canonical] |
SmSphere::CreateOffsetSurface | SmSphere.cpp:259 | 156 | [Sphere::create_offset_surface] |
SmSphere::CreateIsoParametricCurve | SmSphere.cpp:431 | 167 | [Sphere::create_iso_parametric_curve] |
SmSphere::ConvertUVFromSTEPToNURBS | SmSphere.cpp:702 | 106 | [Sphere::convert_uv_from_step_to_nurbs] |
SmSphere::ConvertUVFromNURBSToSTEP | SmSphere.cpp:815 | 44 | [Sphere::convert_uv_from_nurbs_to_step] |
SmSphere::EvaluateSTEP | SmSphere.cpp:873 | 101 | [Sphere::evaluate_step], [Sphere::evaluate_step_point] |
SmSphere::EvaluateSTEPPoint | SmSphere.cpp:990 | 9 | [Sphere::evaluate_step], [Sphere::evaluate_step_point] |
SmSphere::EvaluateNormal | SmSphere.cpp:1005 | 36 | [Sphere::evaluate_normal] |
SmSphere::GetSTEPUVDomain | SmSphere.cpp:1048 | 6 | [Sphere::step_uv_domain] |
SmSphere::GlobalSurfaceIntersect | SmSphere.cpp:1332 | 87 | [Sphere::global_surface_intersect] |
SmSphere::IntersectWithPlane | SmSphere.cpp:1425 | 182 | [Sphere::intersect_with_plane] |
SmSphere::IntersectWithSphere | SmSphere.cpp:1613 | 297 | [Sphere::intersect_with_sphere] |
SmSphere::CreateTrimmedCircleSegments | SmSphere.cpp:1917 | 457 | [Sphere::create_trimmed_circle_segments] |
SmSphere::IntersectWithCone | SmSphere.cpp:2381 | 285 | [Sphere::intersect_with_cone] |
SmSphere::IsNurbSurfaceSphere | SmSphere.cpp:2673 | 290 | [Sphere::is_nurb_surface_sphere] |
SmSphere::RebuildSTEPFromNURBParameters | SmSphere.cpp:2973 | 236 | [Sphere::rebuild_step_from_nurb_parameters] |
SmSphere::IsClosed | SmSphere.cpp:3222 | 52 | [Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v] |
SmSphere::IsClosedU | SmSphere.cpp:3284 | 10 | [Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v] |
SmSphere::IsClosedV | SmSphere.cpp:3304 | 10 | [Sphere::is_closed], [Sphere::is_closed_u], [Sphere::is_closed_v] |
SmSphere::STEPInversion | SmSphere.cpp:3454 | 87 | [Sphere::step_inversion] |
SmSphere::Transform | SmSphere.cpp:3547 | 41 | [Sphere::transform] |
SmSphere::ReadFromDB | SmSphere.cpp:3874 | 42 | [Sphere::read_from_db] |
SmSphere::IsKindOf | SmSphere.cpp:3921 | 4 | [Sphere::is_kind_of], [Sphere::TYPE], [Sphere::type_code], [Sphere::type_string], [Sphere::class_string] |
Module file-header table (29 rows)
| Rust | Upstream |
|---|---|
[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::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::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