The transform.py module#

Summary#

move_feature

Translate a source, sensor, LightBox, SubPart, or Body.

rotate_feature

Rotate a source, sensor, LightBox, SubPart, or Body around an axis.

axis_to_axis_feature

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:
featureTransformableFeature

Feature to translate.

directionlist[float]

Direction of translation. The vector is normalized before use.

distancefloat

Translation distance.

copybool, optional

If True, return a transformed duplicate instead of changing the input.

namestr, optional

Name for the duplicate. Only valid when copy=True.

Returns:
TransformableFeature

The 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:
NotImplementedError

If the Speos server version is older than 2026 R1.

TypeError

If the feature or an input vector has an unsupported type.

ValueError

If 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:
featureTransformableFeature

Feature to rotate.

pointlist[float]

A point on the rotation axis.

axislist[float]

Rotation axis.

anglefloat

Rotation angle in degrees.

copybool, optional

If True, return a transformed duplicate instead of changing the input.

namestr, optional

Name for the duplicate. Only valid when copy=True.

Returns:
TransformableFeature

The 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:
NotImplementedError

If the Speos server version is older than 2026 R1.

TypeError

If the feature or an input vector has an unsupported type.

ValueError

If 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:
featureTransformableFeature

Feature to transform.

reference_axislist[float]

Source frame in twelve-value [O, X, Y, Z] representation.

target_axislist[float]

Destination frame in twelve-value [O, X, Y, Z] representation.

copybool, optional

If True, return a transformed duplicate instead of changing the input.

namestr, optional

Name for the duplicate. Only valid when copy=True.

Returns:
TransformableFeature

The 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:
NotImplementedError

If the Speos server version is older than 2026 R1.

TypeError

If the feature or axis-system input has an unsupported type.

ValueError

If an axis system is invalid or a standalone Face is provided.

transform.TransformableFeature#