Units / surface
surface.plane_p2 partial
- Layer
- 27
- Upstream lines
- 1,627
- Functions
- 10
- Rust module
surface::plane::p2
Source: crates/solidcore/src/surface/plane/p2.rs
Upstream: source/SMLib/src/SmPlane.cpp
Notes
PARTIAL: difftest 2218 cases (218 fixture: 25 derived from SM_API_test TestSmCreateRectangle / TestSmCreateRegularPolygon (rectangle/hexagon edges and circumcircle trimmed to the rectangle plane, the 1e10 far rectangle), 102 edge cases (plane/plane: infinite, bounded, touching, disjoint, parallel, coincident with/without NURB, near-parallel, huge/tiny, sub-domains; trim of segments/arcs/B-splines/rational arcs incl. along-edge and tangent cases; MakeNewPlaneEllipse zero radii/tangent/corner/opposite-normal/partial arcs; Transform identity/rotate/iso/aniso/zero scale; TrimWithDomain; IsNurbSurfacePlane flat/twisted/skewed/rational/cylinder; ReadFromDB ASCII+binary v30/v33/truncated/bad rat), 91 review adversarial cases (plane/plane at 1e-8..1e-6 rad either side of the 1e-16 cross-product threshold, uv-scaled, parallel with one NURB, coincident with flipped Y; zero, huge, negative and SM_USE_DEFAULT tolerances, including negative/USE_DEFAULT through IntersectWithPlane and GlobalSurfaceIntersect; degenerate domains; IsNurbSurfacePlane C0 kinks/folds/degenerate edges/tiny+huge scale/reversed normal; Transform negative-iso/near-identity/nearly-iso scales; trims of dim-2 B-splines, segments along an edge or through a corner, zero/negative tol; ellipses with negative or >360 intervals, non-unit or non-perpendicular axes, zero/negative tol) + 2000 generated over 1e-4/1/1e5 scales), 2209 pass bit-identical (max_rel_err 0), 9 deferred (intersect.surface_intersector_p5 9: SmSurfaceIntersector::DoIntersection in the general SmSurface::GlobalSurfaceIntersect after coincident planes or for a B-spline other; the SmAdvSurfaceIntersector is built since intersect.adv_surface_intersector merged); 60k-seed run clean; perturbation 2209/2209. The runner converts the tolerance with approx_tol3d as the shim does (SmApproxTol3d: |tol|, SM_USE_DEFAULT -> zone tol / 2; see findings.md). Builds on PR #24 (surface.surface_p7: SmSurface::EvaluateNormal for IsNurbSurfacePlane). Wired UNPORTED(surface.plane_p2) in surface.surface_p2 (Transform/TrimWithDomain/ReadFromDB/IntersectWithPlane/GlobalSurfaceIntersect plane dispatch), nurbs.b_spline_surface_p2 (CopyAndAddAnalytics returns the recognised plane; the cone recogniser is UNPORTED(surface.cone_p2)) and surface.surf_of_revolution_p1 (ported the IntersectWithPlane body below the plane box: 31 deferred -> 0, GREEN). A bare Plane has no owner: its CalculateBoundingBox zone tolerance is SM_ZONE_TOL_3D (a plane with a face through Surface::global_surface_intersect returns Unported on SmFace::GetTolerance, topology.face_p2: GetFace is Surface::face since surface.surface_p1). The SurfOfRevolution special case of SmPlane::GlobalSurfaceIntersect was added when merging main. 10 fns; largest: SmPlane::MakeNewPlaneEllipse, SmPlane::IntersectWithPlane, SmPlane::TrimCurveToPlaneDomain, SmPlane::IsNurbSurfacePlane; cycle back-edges (call into later units; stub or co-port): surface.cone_p3(1), surface.sphere(1), surface.surf_of_extrusion_p2(1), surface.surface_p1(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit intersect.surface_intersector_p5 wired (PR #82): base_global_surface_intersect runs DoIntersection, whose surface caches defer at SmSurface::CalculateContinuities (surface.surface_p6); now 2218 cases, 2209 pass, 9 deferred (surface.surface_p6 9). [surface.surface_p6 wired (PR #92): 2218 cases, 2210 pass, 8 deferred (surface.surface_cache_p1 8)]
Difftest
- Cases
- 2,218
- Passed
- 2,210
- Deferred
- 8
- Failed
- 0
- Both errored
- 0
- Max rel. error
- 0.0
- Tolerance
- 1e-09 rel.
- Seeds
- 16
Blocked by
| Unported unit | Deferred cases |
|---|---|
surface.surface_cache_p1 green | 8 |
Report JSON (per-case results)
Dependencies
Depends on: curve.curve_p2 green curve.line green geom.axis2_placement green geom.extent1d green geom.extent2d green geom.extent3d green geom.global_solver partial geom.matrix green geom.object partial geom.pseudo_box green geom.solution_array partial geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_p1 green surface.plane_p1 partial surface.surface_p2 partial surface.surface_p7 partial topology.database_io green
Soft dependencies: curve.curve_p8 green curve.ellipse_p1 green geom.geom_utility_p2 green nurbs.b_spline_curve_p1 green surface.surf_of_revolution_p1 green
Dependents: none
Soft dependents: blend.fillet_geom_p2 todo surface.cone_p3 partial surface.sphere green surface.surf_of_extrusion_p2 partial
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmPlane::CreateOffsetSurface | SmPlane.cpp:261 | 42 | [Plane::create_offset_surface] |
SmPlane::GlobalSurfaceIntersect | SmPlane.cpp:1942 | 131 | [global_surface_intersect] (via [Surface::global_surface_intersect]) |
SmPlane::IntersectWithPlane | SmPlane.cpp:2095 | 284 | [Plane::intersect_with_plane] |
SmPlane::TrimCurveToPlaneDomain | SmPlane.cpp:2483 | 252 | [Plane::trim_curve_to_plane_domain] |
SmPlane::IsNurbSurfacePlane | SmPlane.cpp:2762 | 178 | [Plane::is_nurb_surface_plane] |
SmPlane::Transform | SmPlane.cpp:3184 | 63 | [Plane::transform] |
SmPlane::TrimWithDomain | SmPlane.cpp:3260 | 83 | [Plane::trim_with_domain] |
SmPlane::ReadFromDB | SmPlane.cpp:3590 | 78 | [Plane::read_from_db] |
SmPlane::MakeNewPlaneLine | SmPlane.cpp:3747 | 40 | [Plane::make_new_plane_line] |
SmPlane::MakeNewPlaneEllipse | SmPlane.cpp:3797 | 476 | [Plane::make_new_plane_ellipse] |
Module file-header table (10 rows)
| Rust | Upstream |
|---|---|
[Plane::create_offset_surface] | CreateOffsetSurface |
[global_surface_intersect] (via [Surface::global_surface_intersect]) | GlobalSurfaceIntersect |
[Plane::intersect_with_plane] | IntersectWithPlane |
[Plane::trim_curve_to_plane_domain] | TrimCurveToPlaneDomain |
[Plane::is_nurb_surface_plane] | IsNurbSurfacePlane (static) |
[Plane::transform] | Transform |
[Plane::trim_with_domain] | TrimWithDomain |
[Plane::read_from_db] | ReadFromDB (static) |
[Plane::make_new_plane_line] | MakeNewPlaneLine |
[Plane::make_new_plane_ellipse] | MakeNewPlaneEllipse |
Upstream tests reaching this unit
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, SM_API_test:TestSmCreateRectangle, SM_API_test:TestSmCreateRegularPolygon