GeneralMeshNamespace
GeneralMeshNamespace
Bases: _MeshPartNamespace
Import or wrap meshes through model.meshpart.general.
External meshes use a supplied element definition; composite meshes can preserve heterogeneous cell metadata. Inspect those arrays and dependency tags before assembly, rather than assuming imported data is solver-ready.
Methods:
| Name | Description |
|---|---|
external_mesh |
Import a mesh object/file, apply requested geometry edits, and register it. |
composite |
Wrap heterogeneous cell metadata in a registered composite mesh part. |
Methods:
external_mesh
external_mesh(user_name: str, element: Element, region: Optional[RegionBase] = None, *, mesh: DataSet | None = None, filepath: str | None = None, scale: float | None = None, rotate_x: float | None = None, rotate_y: float | None = None, rotate_z: float | None = None, translate_x: float = 0.0, translate_y: float = 0.0, translate_z: float = 0.0) -> ExternalMesh
Import a mesh object/file, apply requested geometry edits, and register it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name
|
str
|
Unique part name. |
required |
element
|
Element
|
Element definition for the imported cells. |
required |
region
|
RegionBase | None
|
Region; None uses the global region. |
None
|
mesh
|
DataSet | None
|
In-memory mesh input. |
None
|
filepath
|
str | None
|
File input supported by the concrete importer. |
None
|
scale
|
float | None
|
Optional geometry scale. |
None
|
rotate_x
|
float | None
|
Rotation about global x in degrees. |
None
|
rotate_y
|
float | None
|
Rotation about global y in degrees. |
None
|
rotate_z
|
float | None
|
Rotation about global z in degrees. |
None
|
translate_x
|
float
|
Global x translation in model length units. |
0.0
|
translate_y
|
float
|
Global y translation. |
0.0
|
translate_z
|
float
|
Global z translation. |
0.0
|
Returns:
| Name | Type | Description |
|---|---|---|
part |
MeshPart
|
Registered ExternalMesh. Input precedence, accepted cell types, and operation ordering follow the concrete importer. File-reading and constructor errors propagate. |
composite
composite(user_name: str, mesh: DataSet, region: Optional[RegionBase] = None, *, ndof: int = 6, element_tag: int = 0, material_tag: int = 0, section_tag: int = 0) -> CompositeMesh
Wrap heterogeneous cell metadata in a registered composite mesh part.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name
|
str
|
Unique part name. |
required |
mesh
|
DataSet
|
Input geometry and cell/point arrays. |
required |
region
|
RegionBase | None
|
Region; None uses the global region. |
None
|
ndof
|
int
|
Fallback nodal DOF count. |
6
|
element_tag
|
int
|
Fallback element-definition tag. |
0
|
material_tag
|
int
|
Fallback material-definition tag. |
0
|
section_tag
|
int
|
Fallback section-definition tag. |
0
|
Returns:
| Name | Type | Description |
|---|---|---|
part |
MeshPart
|
Registered CompositeMesh. Fallback tags are metadata, not newly registered material/element/section definitions. See the concrete component for preserved versus filled arrays. |