Handle properties¶
To create a handle, the HandleProperties class must be used. Besides the constructor that performs the creation of the HandleProperties object with the basic handle properties, there are some property members for assigning special handle properties.
-
class HandleProperties.HandleProperties(handle_id: Union[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: Optional[Plane3D] = None,
                                         dir_vector: Optional[Vector3D] = None,
                                         info_text: str = '',
                                         angle_placement: Optional[AxisPlacement3D] = None,
                                         show_handles: bool = True)¶ Bases:
object
Implementation of the handle properties class
-
__init__(handle_id: Union[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: Optional[Plane3D] = None,
         dir_vector: Optional[Vector3D] = None,
         info_text: str = '',
         angle_placement: Optional[AxisPlacement3D] = None,
         show_handles: bool = True)¶ Set the properties of a handle
- Parameters
handle_id – Unique handle ID, e.g. the name of the handle
handle_point – Handle point which will be moved
ref_point – Reference point for the distance calculation
handle_param_data – List with the parameter data. The parameter data are used for recalculation of the parameter property assigned to the handle. The calculation is performed depending on the defined parameter type.
handle_move_dir – Allowed move direction for the handle
abs_value – Use the absolute value from the calculation: True/False
distance_factor – 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.
plane – Input plane for the handle_point movement
dir_vector – Direction vector for the handle point movement
info_text – Information text of the tooltip
angle_placement – Placement for the 3D angle input
show_handles – Show handles state. This offers the possibility to use only the input by the edit fields
- __repr__() str ¶
Create class information as string
- get_min_max_values(name: str) Tuple[Union[int, float], Union[int, float], str, str] ¶
Get the min/max values of the handle property
- Parameters
name – name of the property
- Returns
tuple(min value, max value, value list, interval value)
- set_min_max_values(control_props: List[List[ControlProperties]])¶
Set the min/max values of the handle property
- Parameters
control_props – control properties
- transform(transformation_matrix: Matrix3D)¶
Transform the handle
- Parameters
trans_mat – transformation matrix
- __module__ = 'HandleProperties'¶
- property abs_value: bool¶
Get the absolute value state of the properties
- property angle_placement: Optional[AxisPlacement3D]¶
Get the placement for the 3D angle input
- property build_ele_index_list: List[int]¶
Get the index list of the building elements
- property click_state: bool¶
Get the click state:
False: Handle can be moved
True: Handle can be clicked, used like a button
- property 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.
- property ele_prop_list: List[Tuple[str, HandleDirection, bool]]¶
Get the parameter data as list of tuples
- property handle_id: Union[str, Tuple[int, str]]¶
Get the handle id
- property handle_move_dir: HandleDirection¶
Get the allowed move direction for the handle
- property handle_type: ElementHandleType¶
Handle type
- Getter
Get the handle type
- Setter
Set the handle type
- property info_text: str¶
Info text of the tooltip
- Getter
Get the info text of the tooltip
- Setter
Set the info text of the tooltip
- property parameter_data: List[HandleParameterData]¶
Get tbe list with the parameter data of the handle
- property plane: Optional[Plane3D]¶
Get the Input plane for the handle_point movement
- property show_handles: bool¶
Get the show handles state
-
__init__(handle_id: Union[str, Tuple[int, str]],