fibomat.linalg.transformables.transformation_builder module¶
Provides the functions translate(), rotate(), scale() and mirror() to build chained
transformations.
- fibomat.linalg.transformables.transformation_builder.translate(trans_vec: fibomat.linalg.transformables.transformation_builder.VectorT)[source]¶
Translate a object by trans_vec.
- Args:
trans_vec (VectorLike): translation vector
- Returns:
_TranslationBuilder
- fibomat.linalg.transformables.transformation_builder.rotate(theta: float, origin: Optional[Union[fibomat.linalg.transformables.transformation_builder.VectorT, str]] = None)[source]¶
Rotate a object origin with angle theta in math. positive direction (counterclockwise).
- Args:
theta (float): rotation angle in rad origin (Vector, str, optional):
origin of rotation. If not set, (0,0) is used as origin. If origin == ‘center’, the
Transformable.centerof the object will be used. The same applies for the case that origin == ‘origin’ with theTransformable.originproperty. Default to None.- Returns:
_RotationBuilder
- fibomat.linalg.transformables.transformation_builder.scale(fac: float, origin: Optional[Union[fibomat.linalg.transformables.transformation_builder.VectorT, str]] = None)[source]¶
Scale a object homogeneously about origin with factor fac.
- Args:
fac (float): rotation angle in rad origin (Optional[Union[linalg.VectorLike, str]], optional):
origin of rotation. If not set, (0,0) is used as origin. If origin == ‘center’, the
Transformable.centerof the object will be used. The same applies for the case that origin == ‘origin’ with theTransformable.originproperty. Default to None.- Returns:
_ScaleBuilder