pub fn split(
topo: &mut Topology,
solid: SolidId,
plane_point: Point3,
plane_normal: Vec3,
) -> Result<SplitResult, OperationsError>Expand description
Split a solid into two halves along a plane.
The cutting plane is defined by a point and a normal. The positive
half contains geometry on the side the normal points toward; the
negative half contains the rest.
§Algorithm
For each face of the solid:
- Classify vertices as above (+), below (-), or on the plane
- Faces entirely on one side go to that half
- Faces straddling the plane are clipped into two fragments
- A cap face (the cross-section) is added to close each half
§Errors
Returns an error if the plane doesn’t intersect the solid, any face is NURBS, or the result cannot be assembled.