Skip to content

PointInteractor

Canonical path: ScriptObjectInteractors.PointInteractor.PointInteractor

Bases: BaseScriptObjectInteractor

implementation of the interactor for the point input

Methods:

__init__

__init__(
    interactor_result: PointInteractorResult,
    is_first_input: bool,
    request_text: str,
    preview_function: Callable[[], None] | None = None,
    default_input_value: float | None = None,
    abscissa_element: CURVES = None,
    uvs_to_world: bool = False,
    z_coord_input: bool = False,
    start_point: Point3D = Point3D(),
)

initialize

Parameters:

  • interactor_result (PointInteractorResult) –

    result of the interactor

  • is_first_input (bool) –

    first input in a input sequence state

  • request_text (str) –

    request text

  • preview_function (Callable[[], None] | None, default: None ) –

    preview function

  • default_input_value (float | None, default: None ) –

    default input value if value input is activated

  • abscissa_element (CURVES, default: None ) –

    abscissa element for the point projection

  • uvs_to_world (bool, default: False ) –

    when True and point is input in an UVS, the resulting point will be

  • z_coord_input (bool, default: False ) –

    allow

  • start_point (Point3D, default: Point3D() ) –

    start point for the distance input by the x/y/z delta values

on_mouse_leave

on_mouse_leave()

Handles the mouse leave event

on_preview_draw

on_preview_draw()

Handles the preview draw event

process_mouse_msg

process_mouse_msg(mouse_msg: int, pnt: Point2D, msg_info: AddMsgInfo) -> bool

Handles the process mouse message event

Parameters:

  • mouse_msg (int) –

    mouse message ID

  • pnt (Point2D) –

    input point in Allplan view coordinates

  • msg_info (AddMsgInfo) –

    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

uvs_to_world_transform

uvs_to_world_transform(pnt: Point3D) -> Point3D

Transforms the point from the UVS to the world coordinate system

Parameters:

  • pnt (Point3D) –

    point in the UVS

Returns:

  • Point3D

    point in the world coordinate system

Placeholder