HandleProperties
Implementation of the handle properties class
HandleProperties
Canonical path: HandleProperties.HandleProperties
Implementation of the handle properties class
abs_value
property
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:
-
AxisPlacement3D | None
–placement for the 3D angle input
build_ele_index_list
property
writable
Get the index list of the building elements
Returns:
-
list[int]
–index list
center_point
property
writable
center_point: Point3D | None
click_state
property
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
distance_factor
property
writable
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,
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, bool]]
–parameter data as list of tuples
handle_id
property
handle_id: str | tuple[int, str]
handle_move_dir
property
handle_move_dir: HandleDirection
handle_point
property
writable
handle_point: Point3D
handle_type
property
writable
handle_type: ElementHandleType
parameter_data
property
parameter_data: list[HandleParameterData]
Get tbe list with the parameter data of the handle
Returns:
-
list[HandleParameterData]
–parameter data
plane
property
plane: Plane3D | None
ref_point
property
writable
ref_point: Point3D
show_handles
property
writable
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
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 the names of the parameters
Returns:
-
list[str]
–names of the parameters
set_min_max_values
set_min_max_values(
control_props: list[BuildingElementControlProperties],
build_ele_list: list[BuildingElement] | None = None,
)
Set the min/max values of the handle property
Parameters:
-
control_props
(list[BuildingElementControlProperties]
) –control properties
-
build_ele_list
(list[BuildingElement] | None
, default:None
) –list with the building elements