Skip to content

HandleProperties

Implementation of the handle properties class

HandleProperties

Canonical path: HandleProperties.HandleProperties

Implementation of the handle properties class

abs_value property

abs_value: bool

Get the absolute value state of the properties

Returns:

  • bool

    absolute value

angle_placement property writable

angle_placement: AxisPlacement3D | None

Get the placement for the 3D angle input

Returns:

build_ele_index_list property writable

build_ele_index_list: list[int]

Get the index list of the building elements

Returns:

  • list[int]

    index list

center_point property writable

center_point: Point3D | None

Get the center point

Returns:

click_state property

click_state: bool

Get the click state:

- False: Handle can be moved
- True:  Handle can be clicked, used like a button

Returns:

  • bool

    click state

dir_vector property writable

dir_vector: Vector3D | None

Get the direction vector of the handle point movement

Returns:

distance_factor property writable

distance_factor: float

Get the factor for property calculation:

-1=show negative value in the input control. Multiply the distance between reference and handle point with the factor to get the property value, e.g. 2.0 if the ref_point is a center point.

Returns:

  • float

    distance factor

ele_prop_list property

ele_prop_list: list[
    tuple[
        str,
        HandleParameterType,
        bool,
        bool,
        bool,
        Any,
        int | list[int] | None,
        bool,
    ]
]

Get the parameter data as list of tuples (called from C++)

Returns:

  • list[tuple[str, HandleParameterType, bool, bool, bool, Any, int | list[int] | None, bool]]

    parameter data as list of tuples

handle_angle property writable

handle_angle: Angle

Handle angle

Returns:

handle_id property

handle_id: str | tuple[int, str]

Get the handle id

Returns:

  • str | tuple[int, str]

    handle id

handle_move_dir property

handle_move_dir: HandleDirection

Get the allowed move direction for the handle

Returns:

handle_point property writable

handle_point: Point3D

Get the handle point

Returns:

handle_type property writable

handle_type: ElementHandleType

Handle type

Returns:

info_text property writable

info_text: str

Info text of the tooltip

Returns:

  • str

    into text

parameter_data property

parameter_data: list[HandleParameterData]

Get tbe list with the parameter data of the handle

Returns:

plane property

plane: Plane3D | None

Get the input plane for the handle_point movement

Returns:

ref_point property writable

ref_point: Point3D

Get the reference point

Returns:

show_handles property writable

show_handles: bool

Get the show handles state

Returns:

  • bool

    show handles state

__init__

__init__(
    handle_id: str | tuple[int, str],
    handle_point: Point3D,
    ref_point: Point3D,
    handle_param_data: list[HandleParameterData],
    handle_move_dir: HandleDirection,
    abs_value: bool = True,
    distance_factor: float = 1.0,
    plane: Plane3D | None = None,
    dir_vector: Vector3D | None = None,
    info_text: str = "",
    angle_placement: AxisPlacement3D | None = None,
    show_handles: bool = True,
    center_point: Point3D | None = None,
)

Set the properties of a handle

Parameters:

  • handle_id (str | tuple[int, str]) –

    Unique handle ID, e.g. the name of the handle

  • handle_point (Point3D) –

    Handle point which will be moved

  • ref_point (Point3D) –

    Reference point for the distance calculation

  • handle_param_data (list[HandleParameterData]) –

    List with the parameter data. The parameter data are used for recalculation

  • handle_move_dir (HandleDirection) –

    Allowed move direction for the handle

  • abs_value (bool, default: True ) –

    Use the absolute value from the calculation: True/False

  • distance_factor (float, default: 1.0 ) –

    Factor for property calculation. -1=show negative value in the input control.

  • plane (Plane3D | None, default: None ) –

    Input plane for the handle_point movement

  • dir_vector (Vector3D | None, default: None ) –

    Direction vector for the handle point movement

  • info_text (str, default: '' ) –

    Information text of the tooltip

  • angle_placement (AxisPlacement3D | None, default: None ) –

    Placement for the 3D angle input

  • show_handles (bool, default: True ) –

    Show handles state. This offers the possibility to use only the input by the edit fields

  • center_point (Point3D | None, default: None ) –

    Center point for arc handles

__repr__

__repr__() -> str

Create class information as string

Returns:

  • str

    created data string

get_min_max_values

get_min_max_values(name: str) -> tuple[int | float, int | float, str, str]

Get the min/max values of the handle property

Parameters:

  • name (str) –

    name of the property

Returns:

  • tuple[int | float, int | float, str, str]

    tuple(min value, max value, value list, interval value)

get_parameter_names

get_parameter_names() -> list[str]

get the names of the parameters

Returns:

  • list[str]

    names of the parameters

set_min_max_values

set_min_max_values(control_props: list[BuildingElementControlProperties])

Set the min/max values of the handle property

Parameters:

transform

transform(transformation_matrix: Matrix3D)

Transform the handle

Parameters:

  • transformation_matrix (Matrix3D) –

    transformation matrix