ModelEleList
implementation of the model element list
ModelEleList
Canonical path: TypeCollections.ModelEleList.ModelEleList
Bases: list[AllplanElement]
implementation of the model element list
trans_stack
property
trans_stack: TransformationStack
__add__
__add__(other: ModelEleList) -> ModelEleList
add the elements of the current and another list
Parameters:
-
other(ModelEleList) –other list
Returns:
-
ModelEleList–new list
__getitem__
__getitem__(index: int) -> AllplanElement
get the model element by an index
Parameters:
-
index(int) –index
Returns:
-
AllplanElement–model element as AllplanElement
__iadd__
__iadd__(other: ModelEleList) -> ModelEleList
add the elements of another list to the current list
Parameters:
-
other(ModelEleList) –other list
Returns:
-
ModelEleList–current list
__init__
__init__(
com_prop: CommonProperties = GetCurrentCommonProperties(),
element: AllplanElement | None = None,
trans_stack: TransformationStack = TransformationStack(MM, RADIAN),
)
initialize
Parameters:
-
com_prop(CommonProperties, default:GetCurrentCommonProperties()) –common properties for the elements
-
element(AllplanElement | None, default:None) –element to add to the list
-
trans_stack(TransformationStack, default:TransformationStack(MM, RADIAN)) –transformation stack
append
append(allplan_ele: AllplanElement)
append_geometry_2d
append_geometry_2d(
geo_ele: ListModelEle2D | ModelEle2D | ModelEle2DList | None,
com_prop: CommonProperties | None = None,
)
append a 2D geometry element to the list
Parameters:
-
geo_ele(ListModelEle2D | ModelEle2D | ModelEle2DList | None) –2D geometry element
-
com_prop(CommonProperties | None, default:None) –common properties
append_geometry_3d
append_geometry_3d(
geo_ele: ListModelEle3D | ModelEle3D | ModelEle3DList | Curve3DList | None,
com_prop: CommonProperties | None = None,
section_surface_ele_props: SurfaceElementProperties | None = None,
use_trans_matrix: bool = True,
)
append a 3D geometry element to the list
Parameters:
-
geo_ele(ListModelEle3D | ModelEle3D | ModelEle3DList | Curve3DList | None) –3D geometry element
-
com_prop(CommonProperties | None, default:None) –common properties
-
section_surface_ele_props(SurfaceElementProperties | None, default:None) –surface element properties for the representation in the section
-
use_trans_matrix(bool, default:True) –use the current transformation matrix state
append_geometry_3d_with_texture
append_geometry_3d_with_texture(
geo_ele: ListModelEle3D | ModelEle3D | ModelEle3DList | Curve3DList,
texture_def: TextureDefinition,
com_prop: CommonProperties | None = None,
texture_mapping: TextureMapping | None = None,
section_surface_ele_props: SurfaceElementProperties | None = None,
use_trans_matrix: bool = True,
)
append a 3D geometry element to the list
Parameters:
-
geo_ele(ListModelEle3D | ModelEle3D | ModelEle3DList | Curve3DList) –3D geometry element
-
texture_def(TextureDefinition) –texture definition
-
com_prop(CommonProperties | None, default:None) –common properties
-
texture_mapping(TextureMapping | None, default:None) –texture mapping
-
section_surface_ele_props(SurfaceElementProperties | None, default:None) –surface element properties for the representation in the section
-
use_trans_matrix(bool, default:True) –use the current transformation matrix state
get_common_properties
get_common_properties() -> CommonProperties
get_texture
get_texture() -> TextureDefinition | None
get_texture_mapping
get_texture_mapping() -> TextureMapping | None
set_common_properties
set_common_properties(com_prop: CommonProperties)
set_element_attributes
set_element_attributes(index: int, attributes: list[Attribute])
set the attributes to the element with the defined index
Parameters:
-
index(int) –index
-
attributes(list[Attribute]) –attributes
set_layer
set_layer(layer: int | str, document: DocumentAdapter)
set the layer
Parameters:
-
layer(int | str) –layer as integer or string
-
document(DocumentAdapter) –document adapter to get the layer ID by the short name
set_section_surface_ele_props
set_section_surface_ele_props(
section_surface_ele_props: SurfaceElementProperties | None,
)
set the section surface element properties
Parameters:
-
section_surface_ele_props(SurfaceElementProperties | None) –section surface element properties
set_texture
set_texture(texture_def: TextureDefinition | None)
set_texture_mapping
set_texture_mapping(texture_mapping: TextureMapping | None)