pub fn move_faces(
solid: &BrepSolid,
face_ids: &[u64],
translation: Vec3,
) -> Result<BrepSolid, String>Expand description
Golovanov §6.12 direct editing — translate a group of faces rigidly and heal the adjacency with the faces that stay behind.
The moved carriers translate exactly (every control point shifts by the translation, which is exact for ANY surface type), and each boundary edge between a moved face and a fixed face is recomputed as the intersection of the translated moved carrier with the fixed carrier:
- When the translation is parallel to every fixed plane a boundary vertex touches, the whole neighbourhood translates rigidly — exact for any moved carrier and any edge curve type. This is the extrude-like case: pushing a face along its own normal slides the side walls in-plane.
- Otherwise the new corner is re-solved as the common point of ALL carrier
planes meeting at the vertex (moved ones translated), and every affected
straight edge is rebuilt between the re-solved corners — the same
relocate-onto-recovered-corners move
delete_face_and_healperforms on its side edges.
v1 scope (honest refusals, never a bad solid): the moved faces may be any
surface type, but every FIXED face that must be re-intersected — the fixed
side of each boundary edge, and any face whose boundary edges must be
rebuilt — must be PLANAR, and every rebuilt edge must be a straight line.
A translation that collapses an adjacent edge to zero length or reverses
its direction (moving a box face onto or past its opposite face) is
refused, as is a group that tears away from its neighbours. The input is
never mutated; the result is returned only when validate() is clean.