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_color_by_layer
set the color by layer
Parameters:
-
color_by_layer(bool) –color by layer
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_help_construction
set the help construction flag
Parameters:
-
help_construction(bool) –help construction flag
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_pen_by_layer
set the pen by layer
Parameters:
-
pen_by_layer(bool) –pen by layer
set_section_bitmap
set the section bitmap properties
Parameters:
-
bitmap_id(str) –bitmap ID
set_section_face_style
set the section face style properties
Parameters:
-
face_style_id(int) –face style ID
set_section_filling
set the section filling properties
Parameters:
-
filling_id(int) –filling ID
set_section_hatching
set the section hatching properties
Parameters:
-
hatching_id(int) –hatching ID
set_section_pattern
set the section pattern properties
Parameters:
-
pattern_id(int) –pattern ID
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_stroke_by_layer
set the stroke by layer
Parameters:
-
stroke_by_layer(bool) –stroke by layer
set_texture
set_texture(texture_def: TextureDefinition | None)
set_texture_mapping
set_texture_mapping(texture_mapping: TextureMapping | None)