Skip to main content

mirror_brep

Function mirror_brep 

Source
pub fn mirror_brep(
    solid: &BrepSolid,
    plane_point: Vec3,
    plane_normal: Vec3,
) -> Result<BrepSolid, String>
Expand description

Reflect an exact BREP across the plane through plane_point with unit normal n = plane_normal.normalized(). The reflection is the affine map p' = R p + t with linear part R = I - 2 n nᵀ and translation t = 2 (plane_point·n) n, so points on the plane map to themselves. A reflection has negative determinant (it flips handedness), so faces are re-oriented via the existing transform with reverse_orientation = true, keeping outward normals.