face_frame#
- face_frame(face, normal=None, axis=None)#
Canonical frame of a face.
Added in version 1.1.0.
The canonical frame of a face is formed by the unit vector parallel to its first halfedge (the one accessible as
face.halfedge) as x-direction, the face normal vector as z-direction, and a third vector as y-direction such that (x, y, z) becomes a positively oriented orthogonal basis.- Parameters:
- faceFace
Triangular (or planar) face of a mesh.
- normalndarray, shape (3,), optional
The face normal is computed on the fly if not specified. The direction of normal should be consistent with the orientation of face. This is recommended but not required.
- axis{-2, -1, None}
Format of returned values.
- Returns:
- x, y, zndarray, shape (3,)
Default return values if axis evaluates to
None. Three perpendicular unit vectors that form a positvely oriented frame. Otherwise a matrix of shape (3, 3) is returned with basis vectors as rows if axis evaluates to -1 or as columns if axis has value -2.