TransformationManager
TransformationManager
Define beam coordinate transformations through model.transformation.
Factories return registered transformation objects for beam-column element
definitions. These are solver coordinate/kinematic definitions, not spatial
transformations that move mesh points. The latter belong to
model.spatial_transform.
Example
Note
Choose the 3D orientation vector with respect to the eventual beam axis; it must not be parallel to that axis. Creating a transformation alone cannot validate this against a beam mesh that does not yet exist.
Create an empty transformation manager with tags starting at 1.
Methods:
| Name | Description |
|---|---|
transformation2d |
Create and register a planar beam coordinate transformation. |
transformation3d |
Create and register a spatial beam coordinate transformation. |
add |
Add an existing transformation and assign a tag if needed. |
get |
Look up an integer registry tag, returning None when absent. |
get_all |
Return a shallow copy of all managed transformations keyed by tag. |
remove |
Detach a transformation and compact surviving registry tags. |
clear |
Detach all transformations and clear their tags, retaining elements. |
set_tag_start |
Set the positive registry origin and retag existing transformations. |
Methods:
transformation2d
transformation2d(transf_type: str, d_xi: float = 0.0, d_yi: float = 0.0, d_xj: float = 0.0, d_yj: float = 0.0, description: str = '') -> GeometricTransformation2D
Create and register a planar beam coordinate transformation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transf_type
|
str
|
Solver transformation type validated by the component. |
required |
d_xi
|
float
|
Global x joint offset at end i, in length units. |
0.0
|
d_yi
|
float
|
Global y joint offset at end i. |
0.0
|
d_xj
|
float
|
Global x joint offset at end j. |
0.0
|
d_yj
|
float
|
Global y joint offset at end j. |
0.0
|
description
|
str
|
Optional Tcl comment text. |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
transformation |
GeometricTransformation2D
|
Registered definition ready for an appropriate beam element. Constructor errors propagate. |
transformation3d
transformation3d(transf_type: str, vecxz_x: float | str, vecxz_y: float | str, vecxz_z: float | str, d_xi: float | str = 0.0, d_yi: float | str = 0.0, d_zi: float | str = 0.0, d_xj: float | str = 0.0, d_yj: float | str = 0.0, d_zj: float | str = 0.0, description: str = '') -> GeometricTransformation3D
Create and register a spatial beam coordinate transformation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transf_type
|
str
|
Solver transformation type validated by the component. |
required |
vecxz_x
|
float | str
|
Global x component of the local x-z plane vector. |
required |
vecxz_y
|
float | str
|
Global y component of that vector. |
required |
vecxz_z
|
float | str
|
Global z component of that vector. |
required |
d_xi
|
float | str
|
Global x joint offset at end i, in length units. |
0.0
|
d_yi
|
float | str
|
Global y joint offset at end i. |
0.0
|
d_zi
|
float | str
|
Global z joint offset at end i. |
0.0
|
d_xj
|
float | str
|
Global x joint offset at end j. |
0.0
|
d_yj
|
float | str
|
Global y joint offset at end j. |
0.0
|
d_zj
|
float | str
|
Global z joint offset at end j. |
0.0
|
description
|
str
|
Optional Tcl comment text. |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
transformation |
GeometricTransformation3D
|
Registered definition. Numeric and string forms follow the concrete component's rules; this factory does not evaluate Tcl expressions or inspect mesh axes. |
add
Add an existing transformation and assign a tag if needed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transformation
|
GeometricTransformation
|
Unmanaged or already-managed transformation. |
required |
Returns:
| Type | Description |
|---|---|
GeometricTransformation
|
The same transformation after it is stored by this manager. |
get
Look up an integer registry tag, returning None when absent.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Current tag, converted through |
required |
get_all
Return a shallow copy of all managed transformations keyed by tag.
remove
Detach a transformation and compact surviving registry tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Current integer tag; absent tags are ignored. |
required |
Warning
Elements referencing the detached object are not repaired or removed. Cached integer tags can become stale after compaction.
clear
Detach all transformations and clear their tags, retaining elements.
This edits Python definitions only. It neither deletes files nor emits solver commands. Rebuild dependent model definitions before exporting.
set_tag_start
Set the positive registry origin and retag existing transformations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_tag
|
int
|
First tag validated by the tagging policy. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The origin is invalid. Existing object tags may change on success; stored integer references are not updated for you. |