Skip to content

Python Part

Class full path: PythonPart.PythonPart

Definition of class PythonPart

Attributes

views: List[View] property

Get the views

Functions

__init__(name, parameter_list, hash_value, python_file, views=None, matrix=Matrix3D(), common_props=None, reinforcement=None, attribute_list=None, library_elements=None, architecture_elements=None, label_elements=None, fixture_elements=None, placement_matrix=None)

Initialization of class PythonPart

Parameters:

Name Type Description Default
name str

Name of PythonPart

required
hash_value str

Hash value of the parameter

required
python_file str

File name of the pyp file

required
views

Views for PythonPart

None
matrix

Local matrix of PythonPart, used for the local geometry transformation

Matrix3D()
common_props

Common properties of PythonPart

None

__repr__()

create the element string

Returns:

Type Description
str

element string

add(view)

Add one view

Parameters:

Name Type Description Default
view View

view

required

create()

create the PythonPart

Returns:

Type Description
List[Any]

created elements for the PythonPart

distortion_state(state)

Set distortion state

Parameters:

Name Type Description Default
state bool

distortion state

required

leading_macro(makro_leading)

Set Leading Macro

reset(views)

Reset views

Parameters:

Name Type Description Default
views List[View]

views

required