PolygonInteractor
Canonical path: ScriptObjectInteractors.PolygonInteractor.PolygonInteractor
Bases: BaseScriptObjectInteractor
implementation of the interactor for the polygon input
__init__
__init__(
interactor_result: PolygonInteractorResult,
common_prop: CommonProperties = AllplanSettings.AllplanGlobalSettings.GetCurrentCommonProperties(),
z_coord_input: bool = True,
multi_polygon_input: bool = True,
preview_function: Callable[[Polygon3D], list] | None = None,
)
Create the interactor
Parameters:
-
interactor_result
(PolygonInteractorResult
) –result of the interactor
-
common_prop
(CommonProperties
, default:GetCurrentCommonProperties()
) –common properties for the polygon preview
-
z_coord_input
(bool
, default:True
) –allow input of a 3d polygon
-
multi_polygon_input
(bool
, default:True
) –multi polygon input
-
preview_function
(Callable[[Polygon3D], list] | None
, default:None
) –function for generating preview elements during the input
draw_preview
draw_preview(polygon: Polygon3D)
flatten_polygon
staticmethod
on_cancel_function
on_cancel_function() -> OnCancelFunctionResult
Handles the cancel function event (triggered e.g. by hitting ESC, ...)
Returns:
-
OnCancelFunctionResult
–True/False for success.
process_mouse_msg
process_mouse_msg(mouse_msg: int, pnt: Point2D, msg_info: Any) -> bool
Process the mouse message event
Parameters:
-
mouse_msg
(int
) –mouse message ID
-
pnt
(Point2D
) –input point in Allplan view coordinates
-
msg_info
(Any
) –additional mouse message info
Returns:
-
bool
–True/False for success.
start_input
start_input(coord_input: CoordinateInput)
start the input
Parameters:
-
coord_input
(CoordinateInput
) –API object for the coordinate input, element selection, ... in the Allplan view
Placeholder