diff --git a/crates/kernel/src/surface_trim.rs b/crates/kernel/src/surface_trim.rs index e81db0d99..c63423d68 100644 --- a/crates/kernel/src/surface_trim.rs +++ b/crates/kernel/src/surface_trim.rs @@ -57,8 +57,8 @@ pub fn trim(body: &Body, tool: &SplitTool, keep: Vec3) -> Result
{ /// A surface body trimmed by a tool, keeping what `keep` says. Each kept face is the face it is /// a piece of (its history is over `[body]`). /// -/// The body is split where the tool meets it ([`crate::splitface::split_any`]) and the pieces -/// not kept are taken away ([`crate::remove_faces`]); both carry their history, so the kept +/// The body is split where the tool meets it ([`crate::splitface::split_any`]), each piece's side +/// read at a point inside it ([`face_sides`]), and the pieces not kept are taken away ([`crate::remove_faces`]); both carry their history, so the kept /// faces are the body's own, cut. pub fn trim_keep(body: &Body, tool: &SplitTool, keep: TrimKeep) -> Result { body.require_brep("trim")?; @@ -95,23 +95,24 @@ pub fn trim_keep(body: &Body, tool: &SplitTool, keep: TrimKeep) -> Result Ok(crate::record::after(trimmed, &split, &crate::record::counts(&[body]))) } -/// The side of the tool each face of `body` (in its face order) lies on: the tool's field at -/// the centre of the face's mesh triangle where it is largest (a face lies on one side once -/// the tool has cut it; on the tool's own surface the field is the rounding of zero). +/// The side of the tool each face of `body` (in its face order) lies on: the tool's field at a +/// point inside the face, on its surface and inside its trims (SMLib's +/// `CalculateAnInternalPoint`). Once the tool has cut the body each piece lies on one side, so +/// one such point says which. fn face_sides(body: &Body, side: &ToolSide) -> Result