Skip to main content

delete_faces_and_heal

Function delete_faces_and_heal 

Source
pub fn delete_faces_and_heal(
    solid: &BrepSolid,
    face_ids: &[u64],
) -> Result<BrepSolid, String>
Expand description

Delete a SET of faces and heal, in one operation.

Two lanes, chosen by the selection’s own shape (see the module docs):

  • a PATCH — a set whose free boundary consumes whole hole loops of the faces around it (a pocket’s walls + floor, a boss’s wall + top, a bore’s wall) — is CAPPED: the patch and those loops go, and nothing else is touched;
  • anything else is healed one face at a time by delete_face_and_heal, which extends and re-intersects each face’s neighbours. Face ids are stable across a heal, so the chain re-uses the ids it was given.

A single-face selection always takes the second lane — a lone face is exactly the question delete_face_and_heal was written for, and its through-wall cap already covers the one-face patch there is.