Skip to content

BaseSmtScriptObject

implementation of the base script object for converted SmartParts

BaseSmtScriptObject

Canonical path: Utils.ScriptObjects.BaseSmtScriptObject.BaseSmtScriptObject

Bases: BaseScriptObject

base script object for converted SmartParts

is_called_from_part_3d property writable

is_called_from_part_3d: bool

check if the script is called from a 3D part

Returns:

  • bool

    True if called from a 3D part, otherwise False

trans_stack property

trans_stack: TransformationStack

get the transformation stack

Returns:

unit_matrix_2d property

unit_matrix_2d: Matrix2D

get the unit matrix for 2D Returns: unit matrix for 2D

unit_matrix_3d property

unit_matrix_3d: Matrix3D

get the unit matrix for 3D Returns: unit matrix for 3D

__init__

__init__(
    build_ele: T,
    script_object_data: BaseScriptObjectData,
    length_unit: LengthUnit,
)

Initialization

Parameters:

  • build_ele (T) –

    building element with the parameter properties

  • script_object_data (BaseScriptObjectData) –

    script object data

  • length_unit (LengthUnit) –

    length unit for the transformation stack

create_element_result

create_element_result() -> CreateElementResult

create element result

Returns:

modify_element_property

modify_element_property(name: str, value: Any)

Modify property of element

Parameters:

  • name (str) –

    the name of the property.

  • value (Any) –

    new value for property.

move_handle

move_handle(handle_prop: HandleProperties, input_pnt: Point3D)

Modify the element geometry by handles

Parameters:

on_control_event

on_control_event(event_id: int) -> bool

On control event

Parameters:

  • event_id (int) –

    event id of the clicked button control

Returns:

  • bool

    executed state of the event

Placeholder