SpConstraintManager
SpConstraintManager
Create supports through model.constraint.sp.
dofs in these factories is a fixity flag vector: one entry per nodal
DOF, with 1 fixed and 0 free. It is not a list of DOF numbers. Coordinate
factories emit solver selection commands; macro factories use model-boundary
variables generated during export. Creation alone does not test whether
the selected nodes exist or whether the supports stabilize the model.
Example
Methods:
| Name | Description |
|---|---|
fix |
Register explicit nodal fixity. |
fix_x |
Register fixity on a constant-global-x plane. |
fix_y |
Register fixity on a constant-global-y plane. |
fix_z |
Register fixity on a constant-global-z plane. |
fix_macro_x_min |
Register fixity at the exported minimum-x macro boundary. |
fix_macro_x_max |
Register fixity at the exported maximum-x macro boundary. |
fix_macro_y_min |
Register fixity at the exported minimum-y macro boundary. |
fix_macro_y_max |
Register fixity at the exported maximum-y macro boundary. |
fix_macro_z_min |
Register fixity at the exported minimum-z macro boundary. |
fix_macro_z_max |
Register fixity at the exported maximum-z macro boundary. |
add |
Register an SP object, returning it with an assigned constraint tag. |
get |
Return an SP definition by integer-convertible registry tag, or None. |
get_all |
Return a shallow tag-to-definition snapshot with shared object values. |
remove |
Detach a definition and compact surviving constraint registry tags. |
clear |
Detach every SP definition and clear its registry tag. |
set_tag_start |
Set the positive SP registry origin and retag existing definitions. |
to_tcl |
Render explicit-node and coordinate-plane fixities grouped by kind. |
Methods:
fix
Register explicit nodal fixity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
node_tag
|
int
|
Solver node tag. |
required |
dofs
|
list[int]
|
Per-DOF 0/1 fixity flags. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
FixConstraint
|
Registered definition; no solver is run. |
fix_x
Register fixity on a constant-global-x plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xCoordinate
|
float
|
Plane coordinate in model length units. |
required |
dofs
|
list[int]
|
Per-DOF 0/1 fixity flags. |
required |
tol
|
float
|
Coordinate selection tolerance in length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
FixXConstraint
|
Deferred coordinate-based constraint. |
fix_y
Register fixity on a constant-global-y plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
yCoordinate
|
float
|
Plane coordinate in model length units. |
required |
dofs
|
list[int]
|
Per-DOF 0/1 fixity flags. |
required |
tol
|
float
|
Coordinate selection tolerance in length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
FixYConstraint
|
Deferred coordinate-based constraint. |
fix_z
Register fixity on a constant-global-z plane.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
zCoordinate
|
float
|
Plane coordinate in model length units. |
required |
dofs
|
list[int]
|
Per-DOF 0/1 fixity flags. |
required |
tol
|
float
|
Coordinate selection tolerance in length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
FixZConstraint
|
Deferred coordinate-based constraint. |
fix_macro_x_min
Register fixity at the exported minimum-x macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
fix_macro_x_max
Register fixity at the exported maximum-x macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
fix_macro_y_min
Register fixity at the exported minimum-y macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
fix_macro_y_max
Register fixity at the exported maximum-y macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
fix_macro_z_min
Register fixity at the exported minimum-z macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
fix_macro_z_max
Register fixity at the exported maximum-z macro boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dofs
|
list[int]
|
Per-DOF fixity flags. |
required |
tol
|
float
|
Boundary coordinate tolerance in model length units. |
1e-10
|
Returns:
| Name | Type | Description |
|---|---|---|
constraint |
SPConstraint
|
Macro definition requiring export context. |
add
Register an SP object, returning it with an assigned constraint tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
constraint
|
SPConstraint
|
Unmanaged object or one already owned here. |
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
The object is not an SPConstraint. |
ValueError
|
Ownership or registry-tag conflict. |
get
Return an SP definition by integer-convertible registry tag, or None.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Constraint registry tag, not the constrained solver node tag. |
required |
get_all
Return a shallow tag-to-definition snapshot with shared object values.
remove
Detach a definition and compact surviving constraint registry tags.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
int
|
Current tag; absent tags are ignored. Solver node tags stored inside constraints do not change during compaction. |
required |
clear
Detach every SP definition and clear its registry tag.
MP constraints and model meshes remain unchanged. Exported files and a running solver are not affected.
set_tag_start
Set the positive SP registry origin and retag existing definitions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_tag
|
int
|
Positive origin validated by the tagging policy. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Invalid origin. This does not change solver node numbering. |