HandleCreator
implementation of the handle creator
HandleCreator
Canonical path: Utils.HandleCreator.HandleCreator.HandleCreator
implementation of the handle creator
angle
staticmethod
angle(
handle_list: HandleList,
name: str,
handle_point: Point3D,
ref_point: Point3D,
angle_placement: AxisPlacement3D,
center_point: Point3D | None = None,
info_text: str = "",
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create an angle handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
angle_placement(AxisPlacement3D) –angle placement
-
center_point(Point3D | None, default:None) –center point for arc angle handle
-
info_text(str, default:'') –info text
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
checkbox
staticmethod
checkbox(
handle_list: HandleList,
name: str,
handle_point: Point3D,
check_box_state: bool,
info_text_checked: str = "",
info_text_uncheck: str = "",
disable_transform: bool = False,
)
create a checkbox handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
check_box_state(bool) –check box state
-
info_text_checked(str, default:'') –info text checked
-
info_text_uncheck(str, default:'') –info text unchecked
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
click
staticmethod
click(
handle_list: HandleList,
name: str,
handle_point: Point3D,
handle_type: ElementHandleType,
info_text: str = "",
handle_angle: Angle = Angle(),
disable_transform: bool = False,
)
create a click handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
handle_type(ElementHandleType) –handle type
-
info_text(str, default:'') –info text
-
handle_angle(Angle, default:Angle()) –handle angle
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
decrement
staticmethod
decrement(
handle_list: HandleList,
name: str,
handle_point: Point3D,
decrement_value: Any,
info_text: str = "",
disable_transform: bool = False,
)
create a decrement handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
decrement_value(Any) –decrement value
-
info_text(str, default:'') –info text
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
increment
staticmethod
increment(
handle_list: HandleList,
name: str,
handle_point: Point3D,
increment_value: Any,
info_text: str = "",
disable_transform: bool = False,
)
create a increment handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
increment_value(Any) –increment value
-
info_text(str, default:'') –info text
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
move
staticmethod
move(
handle_list: HandleList,
name: str,
placement_point: Point3D,
info_text: str = "",
move_by_click: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a handle for a move with a blue square
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
placement_point(Point3D) –placement move handle
-
info_text(str, default:'') –info text
-
move_by_click(bool, default:False) –execute the move only by click state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
move_in_direction
staticmethod
move_in_direction(
handle_list: HandleList,
name: str,
placement_point: Point3D,
angle: Angle,
info_text: str = "",
move_by_click: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a handle for a move in the arrow direction
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
placement_point(Point3D) –placement move handle
-
angle(Angle) –handle angle
-
info_text(str, default:'') –info text
-
move_by_click(bool, default:False) –execute the move only by click state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
point
staticmethod
point(
handle_list: HandleList,
name: str,
handle_point: Point3D,
index: int | None = None,
info_text: str = "",
delete_point: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
handle_type: ElementHandleType = HANDLE_CIRCLE,
handle_angle: Angle = Angle(),
disable_transform: bool = False,
plane: Plane3D | None = None,
)
create a point move handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
index(int | None, default:None) –point index
-
info_text(str, default:'') –info text
-
delete_point(bool, default:False) –enable delete point state for list items
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
handle_type(ElementHandleType, default:HANDLE_CIRCLE) –handle type
-
handle_angle(Angle, default:Angle()) –handle angle
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
-
plane(Plane3D | None, default:None) –input plane for the handle_point movement
point_distance
staticmethod
point_distance(
handle_list: HandleList,
name: str,
handle_point: Point3D,
ref_point: Point3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
center_point: Point3D | None = None,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a point distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
center_point(Point3D | None, default:None) –center point for arc
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
point_list_2d
staticmethod
point_list_2d(
handle_list: HandleList,
name: str,
handle_points: list[Point2D],
info_text: str = "",
info_text_template: Template = Template(""),
index_offset: int = 0,
)
create 2d point move handles
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_points(list[Point2D]) –handle points
-
info_text(str, default:'') –info text
-
info_text_template(Template, default:Template('')) –info text template
-
index_offset(int, default:0) –index offset for the info text
split_point
staticmethod
split_point(
handle_list: HandleList,
name: str,
handle_point: Point3D,
handle_angle: Angle,
index: int,
info_text: str = "",
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
plane: Plane3D | None = None,
)
create a split point handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
handle_angle(Angle) –handle angle
-
index(int) –point index
-
info_text(str, default:'') –info text
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
-
plane(Plane3D | None, default:None) –input plane for the handle_point movement
vector_distance
staticmethod
vector_distance(
handle_list: HandleList,
dir_name: str,
handle_point: Point3D,
ref_point: Point3D,
dir_vector: Vector3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create vector distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
dir_name(str) –direction name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
dir_vector(Vector3D) –direction vector
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
vector_distances
staticmethod
vector_distances(
handle_list: HandleList,
dir_names: list[str],
handle_point: Point3D,
ref_point: Point3D,
dir_vectors: list[Vector3D],
has_input_fields: list[bool],
input_fields_above: list[bool],
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create vector distance handles
Parameters:
-
handle_list(HandleList) –handle list
-
dir_names(list[str]) –direction names
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
dir_vectors(list[Vector3D]) –direction vectors
-
has_input_fields(list[bool]) –has input field state
-
input_fields_above(list[bool]) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
x_distance
staticmethod
x_distance(
handle_list: HandleList,
name: str,
handle_point: Point3D,
ref_point: Point3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a x distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
xy_distance
staticmethod
xy_distance(
handle_list: HandleList,
x_name: str,
y_name: str,
handle_point: Point3D | Point2D,
ref_point: Point3D | Point2D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a x/y distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
x_name(str) –handle parameter name for x distance
-
y_name(str) –handle parameter name for y distance
-
handle_point(Point3D | Point2D) –handle point
-
ref_point(Point3D | Point2D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
xyz_distance
staticmethod
xyz_distance(
handle_list: HandleList,
x_name: str,
y_name: str,
z_name: str,
handle_point: Point3D,
ref_point: Point3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a x/y/z distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
x_name(str) –handle parameter name for x distance
-
y_name(str) –handle parameter name for y distance
-
z_name(str) –handle parameter name for z distance
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
y_distance
staticmethod
y_distance(
handle_list: HandleList,
name: str,
handle_point: Point3D,
ref_point: Point3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a y distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list
z_distance
staticmethod
z_distance(
handle_list: HandleList,
name: str,
handle_point: Point3D,
ref_point: Point3D,
has_input_field: bool = True,
input_field_above: bool = True,
show_handles: bool = True,
list_index: int | None = None,
distance_factor: float = 1.0,
info_text: str = "",
show_input_field_always: bool = False,
owner_element: BaseElementAdapter = BaseElementAdapter(),
disable_transform: bool = False,
)
create a z distance handle
Parameters:
-
handle_list(HandleList) –handle list
-
name(str) –handle parameter name
-
handle_point(Point3D) –handle point
-
ref_point(Point3D) –reference point
-
has_input_field(bool, default:True) –has input field state
-
input_field_above(bool, default:True) –input field above the dimension line state
-
show_handles(bool, default:True) –show the handles state
-
list_index(int | None, default:None) –list index
-
distance_factor(float, default:1.0) –distance factor
-
info_text(str, default:'') –info text
-
show_input_field_always(bool, default:False) –show the input field always state
-
owner_element(BaseElementAdapter, default:BaseElementAdapter()) –owner element of the handle (in element modification mode)
-
disable_transform(bool, default:False) –disable handle transformation with the matrix from the handle list