pub fn detect_self_intersection(
surface: &NurbsSurface,
grid_res: usize,
tolerance: f64,
) -> Result<Vec<SelfIntersectionCurve>, MathError>Expand description
Detect self-intersections on a NURBS surface.
Samples the surface on a grid, finds non-adjacent regions where the surface folds back on itself, and traces the self-intersection curves.
§Parameters
surface: The NURBS surface to testgrid_res: Grid resolution for sampling (e.g., 20)tolerance: Distance tolerance for considering points as intersecting
§Errors
Returns an error if NURBS evaluation or curve fitting fails.