Skip to content

Python Part Util

Class full path: PythonPartUtil.PythonPartUtil

Implementation of the PythonPart utilities

Functions

__init__(common_props=None)

Initialize

Parameters:

Name Type Description Default
common_props CommonProperties | None

common properties

None

add_architecture_elements(elements)

add the architecture elements to the PythonPart

Parameters:

Name Type Description Default
elements Any

architecture elements

required

add_attribute_list(attribute_list)

add the attribute list to the PythonPart

Parameters:

Name Type Description Default
attribute_list BuildingElementAttributeList

attribute list

required

add_fixture_elements(elements)

add the fixture elements to the PythonPart

Parameters:

Name Type Description Default
elements Any

fixture elements

required

add_label_elements(elements)

add the label elements to the PythonPart

Parameters:

Name Type Description Default
elements Any

label elements

required

add_library_elements(elements)

add the library elements to the PythonPart

Parameters:

Name Type Description Default
elements Any

library elements

required

add_pythonpart_view_2d(elements, view_data=PythonPartViewData())

add the elements to a 2D view for the next PythonPart

Parameters:

Name Type Description Default
elements ModelElement2D | ModelElement3D | Any

elements

required
view_data PythonPartViewData

view data

PythonPartViewData()

add_pythonpart_view_2d3d(elements, view_data=PythonPartViewData())

add the elements to a 2D3D view for the next PythonPart

Parameters:

Name Type Description Default
elements ModelElement2D | ModelElement3D | Any

elements

required
view_data PythonPartViewData

view data

PythonPartViewData()

add_pythonpart_view_3d(elements, view_data=PythonPartViewData())

add the elements to a 3D view for the next PythonPart

Parameters:

Name Type Description Default
elements ModelElement2D | ModelElement3D | Any

elements

required
view_data PythonPartViewData

view data

PythonPartViewData()

add_reinforcement_elements(elements)

add the reinforcement elements to the PythonPart

Parameters:

Name Type Description Default
elements Any

reinforcement elements

required

add_view(elements)

add a view for the next PythonPart

Parameters:

Name Type Description Default
elements View | list[View]

elements

required

create_pythonpart(build_ele, local_placement_matrix=Matrix3D(), placement_matrix=Matrix3D())

create a PythonPart with the current views

Parameters:

Name Type Description Default
build_ele BuildingElement | list[BuildingElement]

building element with the parameter properties

required
local_placement_matrix Matrix3D

local placement matrix of the PythonPart, used for the local geometry transformation

Matrix3D()
placement_matrix Matrix3D

placement matrix of the PythonPart (model placement)

Matrix3D()

Returns:

Type Description
list[Any]

list with the created PythonPart elements

set_view_data(view, view_data) staticmethod

set the view data

Parameters:

Name Type Description Default
view View

view

required
view_data PythonPartViewData

view data

required