Skip to content

FaceSelectInteractor

Canonical path: ScriptObjectInteractors.FaceSelectInteractor.FaceSelectInteractor

Bases: BaseScriptObjectInteractor

implementation of the interactor handling the face selection on a polyhedron element

This interactor handles the interaction, where the user selects a face of any model element. The element geometry must be a polyhedron with closed faces. It is possible to allow the user to select faces inside a UVS.

Methods:

__init__

__init__(
    interactor_result: FaceSelectResult,
    ele_filter: list[GUID] | BaseFilterObject | SelectionQuery | None = None,
    prompt_msg: str = "Select the face",
    allow_uvs: bool = False,
    preview_function: Callable[[], None] | None = None,
)

initialize

Parameters:

  • interactor_result (FaceSelectResult) –

    data class for saving the result of the interaction

  • ele_filter (list[GUID] | BaseFilterObject | SelectionQuery | None, default: None ) –

    element filter as a list of accepted element type GUIDs or a callable or a selection query returning True, when the element is valid for selection

  • prompt_msg (str, default: 'Select the face' ) –

    prompt message shown to the user in the dialog line

  • allow_uvs (bool, default: False ) –

    whether to allow the selection inside a UVS

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

    function for drawing a preview, called with each mouse move event during the selection

is_face_polyhedron staticmethod

is_face_polyhedron(ele: BaseElementAdapter) -> bool

Checks, if the base element adapter has a polyhedron geometry with faces

Parameters:

Returns:

  • bool

    True, if the given element adapter has a polyhedron type geometry with faces

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

Placeholder