Skip to content

LineMeshNamespace

LineMeshNamespace

LineMeshNamespace(manager: 'MeshPartManager')

Bases: _MeshPartNamespace

Line-mesh factories accessed through model.meshpart.line.

Definitions use the supplied element object and optional region. Factories return generated, registered parts; no section creation or final assembly is performed. Use density or mass_per_length, not both, for line mass input.

Methods:

Name Description
single_line

Generate a subdivided straight segment through model.meshpart.line.

structured_lines

Generate an array of subdivided line members on a base grid.

Methods:

single_line

single_line(user_name: str, element: Element, region: Optional[RegionBase] = None, *, x0: float = 0.0, y0: float = 0.0, z0: float = 0.0, x1: float = 1.0, y1: float = 0.0, z1: float = 0.0, number_of_lines: int = 1, merge_points: bool = True, density: Optional[float] = None, mass_per_length: Optional[float] = None) -> SingleLineMesh

Generate a subdivided straight segment through model.meshpart.line.

Parameters:

Name Type Description Default
user_name str

Unique registered part name.

required
element Element

Compatible line element definition.

required
region RegionBase | None

Region; None selects the global region.

None
x0 float

Start-point global x coordinate.

0.0
y0 float

Start-point global y coordinate.

0.0
z0 float

Start-point global z coordinate.

0.0
x1 float

End-point global x coordinate.

1.0
y1 float

End-point global y coordinate.

0.0
z1 float

End-point global z coordinate.

0.0
number_of_lines int

Segment subdivision count.

1
merge_points bool

Point-merging option within the generated part.

True
density float | None

Volumetric density for section-based mass.

None
mass_per_length float | None

Alternative explicit line mass density.

None

Returns:

Name Type Description
part MeshPart

Generated and registered SingleLineMesh.

Note

Density and mass_per_length are mutually exclusive. Check component mass settings to avoid counting the same physical mass twice.

structured_lines

structured_lines(user_name: str, element: Element, region: Optional[RegionBase] = None, *, base_point_x: float = 0.0, base_point_y: float = 0.0, base_point_z: float = 0.0, base_vector_1_x: float = 1.0, base_vector_1_y: float = 0.0, base_vector_1_z: float = 0.0, base_vector_2_x: float = 0.0, base_vector_2_y: float = 1.0, base_vector_2_z: float = 0.0, normal_x: float = 0.0, normal_y: float = 0.0, normal_z: float = 1.0, grid_size_1: int = 10, grid_size_2: int = 10, spacing_1: float = 1.0, spacing_2: float = 1.0, length: float = 1.0, offset_1: float = 0.0, offset_2: float = 0.0, number_of_lines: int = 1, merge_points: bool = True, density: Optional[float] = None, mass_per_length: Optional[float] = None) -> StructuredLineMesh

Generate an array of subdivided line members on a base grid.

Parameters:

Name Type Description Default
user_name str

Unique registered part name.

required
element Element

Compatible line element definition.

required
region RegionBase | None

Region; None selects the global region.

None
base_point_x float

Base origin global x coordinate.

0.0
base_point_y float

Base origin global y coordinate.

0.0
base_point_z float

Base origin global z coordinate.

0.0
base_vector_1_x float

First grid direction x component.

1.0
base_vector_1_y float

First grid direction y component.

0.0
base_vector_1_z float

First grid direction z component.

0.0
base_vector_2_x float

Second grid direction x component.

0.0
base_vector_2_y float

Second grid direction y component.

1.0
base_vector_2_z float

Second grid direction z component.

0.0
normal_x float

Member direction x component.

0.0
normal_y float

Member direction y component.

0.0
normal_z float

Member direction z component.

1.0
grid_size_1 int

Grid count along the first base direction.

10
grid_size_2 int

Grid count along the second base direction.

10
spacing_1 float

Spacing along the first base direction.

1.0
spacing_2 float

Spacing along the second base direction.

1.0
length float

Member length in model length units.

1.0
offset_1 float

Initial offset along the first grid direction.

0.0
offset_2 float

Initial offset along the second grid direction.

0.0
number_of_lines int

Subdivision count per member.

1
merge_points bool

Point-merging option within the generated part.

True
density float | None

Optional volumetric density.

None
mass_per_length float | None

Alternative explicit mass per length.

None

Returns:

Name Type Description
part MeshPart

Registered StructuredLineMesh. Concrete constructor validation applies to directions, sizes, and mass inputs.