The transform.py module#
Summary#
Translate a source, sensor, LightBox, SubPart, or Body. |
|
Rotate a source, sensor, LightBox, SubPart, or Body around an axis. |
|
Move and rotate a feature by mapping one rigid coordinate frame onto another. |
Description#
Workflow helpers for transforming Speos features.
Module detail#
- transform.move_feature(feature, direction, distance, *, copy=False, name=None)#
Translate a source, sensor, LightBox, SubPart, or Body.
- Parameters:
- feature
TransformableFeature Feature to translate.
- direction
list[float] Direction of translation. The vector is normalized before use.
- distance
float Translation distance.
- copybool,
optional If
True, return a transformed duplicate instead of changing the input.- name
str,optional Name for the duplicate. Only valid when
copy=True.
- feature
- Returns:
TransformableFeatureThe original feature when
copy=False, or its transformed duplicate. For a surface source, the referenced body geometry (constant exitance) or XMP map plane (variable exitance) is transformed.
- Raises:
NotImplementedErrorIf the Speos server version is older than 2026 R1.
TypeErrorIf the feature or an input vector has an unsupported type.
ValueErrorIf an input is invalid or a standalone Face is provided.
- transform.rotate_feature(feature, point, axis, angle, *, copy=False, name=None)#
Rotate a source, sensor, LightBox, SubPart, or Body around an axis.
- Parameters:
- feature
TransformableFeature Feature to rotate.
- point
list[float] A point on the rotation axis.
- axis
list[float] Rotation axis.
- angle
float Rotation angle in degrees.
- copybool,
optional If
True, return a transformed duplicate instead of changing the input.- name
str,optional Name for the duplicate. Only valid when
copy=True.
- feature
- Returns:
TransformableFeatureThe original feature when
copy=False, or its transformed duplicate. For a surface source, the referenced body geometry (constant exitance) or XMP map plane (variable exitance) is transformed.
- Raises:
NotImplementedErrorIf the Speos server version is older than 2026 R1.
TypeErrorIf the feature or an input vector has an unsupported type.
ValueErrorIf an input is invalid or a standalone Face is provided.
- transform.axis_to_axis_feature(feature, reference_axis, target_axis, *, copy=False, name=None)#
Move and rotate a feature by mapping one rigid coordinate frame onto another.
- Parameters:
- feature
TransformableFeature Feature to transform.
- reference_axis
list[float] Source frame in twelve-value
[O, X, Y, Z]representation.- target_axis
list[float] Destination frame in twelve-value
[O, X, Y, Z]representation.- copybool,
optional If
True, return a transformed duplicate instead of changing the input.- name
str,optional Name for the duplicate. Only valid when
copy=True.
- feature
- Returns:
TransformableFeatureThe original feature when
copy=False, or its transformed duplicate. For a surface source, the referenced body geometry (constant exitance) or XMP map plane (variable exitance) is transformed.
- Raises:
NotImplementedErrorIf the Speos server version is older than 2026 R1.
TypeErrorIf the feature or axis-system input has an unsupported type.
ValueErrorIf an axis system is invalid or a standalone Face is provided.
- transform.TransformableFeature#