OCC.Core.SelectMgr module

SelectMgr module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_selectmgr.html

class SelectMgr_AndFilter(*args)

Bases: OCC.Core.SelectMgr.SelectMgr_CompositionFilter

  • Constructs an empty selection filter object for two or more types of entity.
    rtype

    None

static DownCast(t)
property thisown

The membership flag

class SelectMgr_CompositionFilter(*args, **kwargs)

Bases: OCC.Core.SelectMgr.SelectMgr_Filter

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Add()
  • Adds the filter afilter to a filter object created by a filter class inheriting this framework.
    param afilter

    type afilter

    SelectMgr_Filter

    rtype

    None

Clear()
  • Clears the filters used in this framework.
    rtype

    None

static DownCast(t)
IsEmpty()
  • Returns true if this framework is empty.
    rtype

    bool

IsIn()
  • Returns true if the filter aFilter is in this framework.
    param aFilter

    type aFilter

    SelectMgr_Filter

    rtype

    bool

Remove()
  • Removes the filter aFilter from this framework.
    param aFilter

    type aFilter

    SelectMgr_Filter

    rtype

    None

StoredFilters()
  • Returns the list of stored filters from this framework.
    rtype

    SelectMgr_ListOfFilter

property thisown

The membership flag

class SelectMgr_EntityOwner(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • Initializes the selection priority aPriority.
    param aPriority

    default value is 0

    type aPriority

    int

    rtype

    None* Constructs a framework with the selectable object anSO being attributed the selection priority aPriority.

    param aSO

    type aSO

    SelectMgr_SelectableObject

    param aPriority

    default value is 0

    type aPriority

    int

    rtype

    None* Constructs a framework from existing one anSO being attributed the selection priority aPriority.

    param theOwner

    type theOwner

    SelectMgr_EntityOwner

    param aPriority

    default value is 0

    type aPriority

    int

    rtype

    None

Clear()
  • Clears the owners matching the value of the selection mode aMode from the presentation manager object aPM. /// TODO
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    param theMode

    default value is 0

    type theMode

    int

    rtype

    None

ComesFromDecomposition()
  • Returns True if this owner points to a part of object and False for entire object.
    rtype

    bool

static DownCast(t)
DumpJsonToString(SelectMgr_EntityOwner self, int depth=-1) → std::string
HandleMouseClick()
  • Handle mouse button click event. Does nothing by default and returns False. @param thePoint mouse cursor position @param theButton clicked button @param theModifiers key modifiers @param theIsDoubleClick flag indicating double mouse click returns True if object handled click
    param thePoint

    type thePoint

    Graphic3d_Vec2i

    param theButton

    type theButton

    Aspect_VKeyMouse

    param theModifiers

    type theModifiers

    Aspect_VKeyFlags

    param theIsDoubleClick

    type theIsDoubleClick

    bool

    rtype

    bool

HasLocation()
  • Returns True if selectable has transformation.
    rtype

    bool

HasSelectable()
  • Returns true if there is a selectable object to serve as an owner.
    rtype

    bool

HilightWithColor()
  • Highlights selectable object’s presentation with display mode in presentation manager with given highlight style. Also a check for auto-highlight is performed - if selectable object manages highlighting on its own, execution will be passed to SelectMgr_SelectableObject::HilightOwnerWithColor method.
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    param theStyle

    type theStyle

    Prs3d_Drawer

    param theMode

    default value is 0

    type theMode

    int

    rtype

    void

IsAutoHilight()
  • if owner is not auto hilighted, for group contains many such owners will be called one method HilightSelected of SelectableObject
    rtype

    bool

IsForcedHilight()
  • if this method returns True the owner will always call method Hilight for SelectableObject when the owner is detected. By default it always return False.
    rtype

    bool

IsHilighted()
  • Returns true if the presentation manager highlights selections corresponding to the selection mode.
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    param theMode

    default value is 0

    type theMode

    int

    rtype

    bool

IsSameSelectable()
  • Returns true if pointer to selectable object of this owner is equal to the given one
    param theOther

    type theOther

    SelectMgr_SelectableObject

    rtype

    bool

IsSelected()
  • returns Standard_True if the owner is selected.
    rtype

    bool

Location()
  • Returns transformation of selectable.
    rtype

    TopLoc_Location

Priority()
  • Return selection priority (within range [0-9]) for results with the same depth; 0 by default. Example - selection of shapes: the owners are selectable objects (presentations) a user can give vertex priority [3], edges [2] faces [1] shape [0], so that if during selection one vertex one edge and one face are simultaneously detected, the vertex will only be hilighted.
    rtype

    int

Selectable()
  • Returns a selectable object detected in the working context.
    rtype

    opencascade::handle<SelectMgr_SelectableObject>

Set()
  • Sets the selectable object.
    param theSelObj

    type theSelObj

    SelectMgr_SelectableObject

    rtype

    None* sets the selectable priority of the owner

    param thePriority

    type thePriority

    int

    rtype

    None

SetComesFromDecomposition()
  • Sets flag indicating this owner points to a part of object (True) or to entire object (False).
    param theIsFromDecomposition

    type theIsFromDecomposition

    bool

    rtype

    None

SetLocation()
  • Change owner location (callback for handling change of location of selectable object).
    param theLocation

    type theLocation

    TopLoc_Location

    rtype

    None

SetPriority()
  • Sets the selectable priority of the owner within range [0-9].
    param thePriority

    type thePriority

    int

    rtype

    None

SetSelectable()
  • Sets the selectable object.
    param theSelObj

    type theSelObj

    SelectMgr_SelectableObject

    rtype

    None

SetSelected()
  • Set the state of the owner. @param theIsSelected [in] shows if owner is selected.
    param theIsSelected

    type theIsSelected

    bool

    rtype

    None

SetZLayer()
  • Set Z layer ID and update all presentations.
    param theLayerId

    type theLayerId

    int

    rtype

    None

State()
  • Returns selection state.
    rtype

    int* Set the state of the owner. The method is deprecated. Use SetSelected() instead.

    param theStatus

    type theStatus

    int

    rtype

    None

Unhilight()
  • Removes highlighting from the owner of a detected selectable object in the presentation manager. This object could be the owner of a sensitive primitive. @param thePrsMgr presentation manager @param theMode obsolete argument for compatibility, should be ignored by implementations
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    param theMode

    default value is 0

    type theMode

    int

    rtype

    None

UpdateHighlightTrsf()
  • Implements immediate application of location transformation of parent object to dynamic highlight structure
    param theViewer

    type theViewer

    V3d_Viewer

    param theManager

    type theManager

    PrsMgr_PresentationManager

    param theDispMode

    type theDispMode

    int

    rtype

    None

property thisown

The membership flag

class SelectMgr_Filter(*args, **kwargs)

Bases: OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

ActsOn()
  • Returns true in an AIS local context, if this filter operates on a type of subshape defined in a filter class inheriting this framework. This function completes IsOk in an AIS local context.
    param aStandardMode

    type aStandardMode

    TopAbs_ShapeEnum

    rtype

    bool

static DownCast(t)
IsOk()
  • Indicates that the selected Interactive Object passes the filter. The owner, anObj, can be either direct or user. A direct owner is the corresponding construction element, whereas a user is the compound shape of which the entity forms a part. When an object is detected by the mouse - in AIS, this is done through a context selector - its owner is passed to the filter as an argument. If the object returns Standard_True, it is kept; if not, it is rejected. If you are creating a filter class inheriting this framework, and the daughter class is to be used in an AIS local context, you will need to implement the virtual function ActsOn.
    param anObj

    type anObj

    SelectMgr_EntityOwner

    rtype

    bool

property thisown

The membership flag

class SelectMgr_FrustumCache(*args)

Bases: object

Assign()
Bind()
Bound()
ChangeFind()
ChangeSeek()
Clear()
Exchange()
Find()
IsBound()
Keys()
ReSize()
Seek()
Set()
Size()
UnBind()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class SelectMgr_IndexedDataMapOfOwnerCriterion(*args)

Bases: object

Add()
Assign()
ChangeFromIndex()
ChangeFromKey()
ChangeSeek()
Clear()
Contains()
Exchange()
FindFromIndex()
FindFromKey()
FindIndex()
FindKey()
ReSize()
RemoveFromIndex()
RemoveKey()
RemoveLast()
Seek()
Set()
Size()
Substitute()
Swap()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class SelectMgr_IndexedMapOfHSensitive(*args)

Bases: object

Add()
Assign()
Clear()
Contains()
Exchange()
FindIndex()
FindKey()
ReSize()
RemoveFromIndex()
RemoveKey()
RemoveLast()
Set()
Size()
Substitute()
Swap()
cbegin()
cend()
property thisown

The membership flag

class SelectMgr_ListIteratorOfListOfFilter(*args)

Bases: object

ChangeValue()
More()
Next()
Value()
property thisown

The membership flag

class SelectMgr_ListOfFilter(*args)

Bases: object

Append()
Assign()
Clear()
First()
InsertAfter()
InsertBefore()
Last()
Prepend()
Remove()
RemoveFirst()
Reverse()
Set()
Size()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class SelectMgr_Mat4

Bases: object

ChangeData()
ChangeValue()
static Cols()
GetColumn()
GetData()
GetDiagonal()
GetRow()
GetValue()
InitIdentity()
Inverted()
IsEqual()
IsIdentity()
static Map()
Multiplied()
Multiply()
static Rows()
SetColumn()
SetDiagonal()
SetRow()
SetValue()
Translate()
Transpose()
Transposed()
property thisown

The membership flag

class SelectMgr_OrFilter(*args)

Bases: OCC.Core.SelectMgr.SelectMgr_CompositionFilter

  • Constructs an empty or selection filter.
    rtype

    None

static DownCast(t)
SetDisabledObjects()
  • Disable selection of specified objects.
    param theObjects

    type theObjects

    Graphic3d_NMapOfTransient

    rtype

    None

property thisown

The membership flag

class SelectMgr_SelectableObject(*args, **kwargs)

Bases: OCC.Core.PrsMgr.PrsMgr_PresentableObject

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

AcceptShapeDecomposition()
  • Informs the graphic context that the interactive Object may be decomposed into sub-shapes for dynamic selection. The most used Interactive Object is AIS_Shape.
    rtype

    bool

AddSelection()
  • Adds the selection aSelection with the selection mode index aMode to this framework.
    param aSelection

    type aSelection

    SelectMgr_Selection

    param aMode

    type aMode

    int

    rtype

    None

ClearDynamicHighlight()
  • Method that needs to be implemented when the object manages selection and dynamic highlighting on its own. Clears or invalidates dynamic highlight presentation. By default it clears immediate draw of given presentation manager.
    param theMgr

    type theMgr

    PrsMgr_PresentationManager

    rtype

    void

ClearSelected()
  • Method which clear all selected owners belonging to this selectable object ( for fast presentation draw )
    rtype

    void

ClearSelections()
  • Empties all the selections in the SelectableObject <update> parameter defines whether all object’s selections should be flagged for further update or not. This improved method can be used to recompute an object’s selection (without redisplaying the object completely) when some selection mode is activated not for the first time.
    param update

    default value is Standard_False

    type update

    bool

    rtype

    None

ComputeSelection()
  • Computes sensitive primitives for the given selection mode - key interface method of Selectable Object. @param theSelection selection to fill @param theMode selection mode to create sensitive primitives
    param theSelection

    type theSelection

    SelectMgr_Selection

    param theMode

    type theMode

    int

    rtype

    None

CurrentSelection()
  • Returns the current selection in this framework.
    rtype

    opencascade::handle<SelectMgr_Selection>

static DownCast(t)
DumpJsonToString(SelectMgr_SelectableObject self, int depth=-1) → std::string
ErasePresentations()
  • Removes presentations returned by GetHilightPresentation() and GetSelectPresentation().
    param theToRemove

    type theToRemove

    bool

    rtype

    void

GetAssemblyOwner()
  • Returns common entity owner if the object is an assembly
    rtype

    opencascade::handle<SelectMgr_EntityOwner>

GetHilightPresentation()
  • Creates or returns existing presentation for highlighting detected object. @param thePrsMgr presentation manager to create new presentation returns existing or newly created presentation (when thePrsMgr is not NULL)
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    rtype

    opencascade::handle<Prs3d_Presentation>

GetSelectPresentation()
  • Creates or returns existing presentation for highlighting selected object. @param thePrsMgr presentation manager to create new presentation returns existing or newly created presentation (when thePrsMgr is not NULL)
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    rtype

    opencascade::handle<Prs3d_Presentation>

GlobalSelOwner()
  • Returns the owner of mode for selection of object as a whole
    rtype

    opencascade::handle<SelectMgr_EntityOwner>

GlobalSelectionMode()
  • Returns the mode for selection of object as a whole; 0 by default.
    rtype

    int

HasSelection()
  • Returns true if a selection corresponding to the selection mode theMode was computed for this object.
    param theMode

    type theMode

    int

    rtype

    bool

HilightOwnerWithColor()
  • Method which hilight an owner belonging to this selectable object ( for fast presentation draw )
    param thePM

    type thePM

    PrsMgr_PresentationManager

    param theStyle

    type theStyle

    Prs3d_Drawer

    param theOwner

    type theOwner

    SelectMgr_EntityOwner

    rtype

    void

HilightSelected()
  • Method which draws selected owners ( for fast presentation draw )
    param thePrsMgr

    type thePrsMgr

    PrsMgr_PresentationManager

    param theSeq

    type theSeq

    SelectMgr_SequenceOfOwner

    rtype

    void

Init()
  • Begins the iteration scanning for sensitive primitives.
    rtype

    None

IsAutoHilight()
  • If returns True, the old mechanism for highlighting selected objects is used (HilightSelected Method may be empty). If returns False, the HilightSelected method will be fully responsible for highlighting selected entity owners belonging to this selectable object.
    rtype

    bool

More()
  • Continues the iteration scanning for sensitive primitives.
    rtype

    bool

Next()
  • Continues the iteration scanning for sensitive primitives.
    rtype

    None

RecomputePrimitives()
  • Re-computes the sensitive primitives for all modes. IMPORTANT: Do not use this method to update selection primitives except implementing custom selection manager! This method does not take into account necessary BVH updates, but may invalidate the pointers it refers to. TO UPDATE SELECTION properly from outside classes, use method UpdateSelection.
    rtype

    None* Re-computes the sensitive primitives which correspond to the <theMode>th selection mode. IMPORTANT: Do not use this method to update selection primitives except implementing custom selection manager! selection manager! This method does not take into account necessary BVH updates, but may invalidate the pointers it refers to. TO UPDATE SELECTION properly from outside classes, use method UpdateSelection.

    param theMode

    type theMode

    int

    rtype

    None

Selection()
  • Returns the selection having specified selection mode or NULL.
    param theMode

    type theMode

    int

    rtype

    opencascade::handle<SelectMgr_Selection>

Selections()
  • Return the sequence of selections.
    rtype

    SelectMgr_SequenceOfSelection

SetAssemblyOwner()
  • Sets common entity owner for assembly sensitive object entities
    param theOwner

    type theOwner

    SelectMgr_EntityOwner

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

SetAutoHilight()
  • Set AutoHilight property to true or false.
    param theAutoHilight

    type theAutoHilight

    bool

    rtype

    None

UpdateSelection()
  • Sets update status FULL to selections of the object. Must be used as the only method of UpdateSelection from outer classes to prevent BVH structures from being outdated.
    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

UpdateTransformations()
  • Updates locations in all sensitive entities from <aSelection> and in corresponding entity owners.
    param aSelection

    type aSelection

    SelectMgr_Selection

    rtype

    void

property thisown

The membership flag

class SelectMgr_SelectableObjectSet(*args)

Bases: object

  • Creates new empty objects set and initializes BVH tree builders for each subset.
    rtype

    None

Append()
  • Adds the new selectable object to the set. The selectable object is placed into one of the predefined subsets depending on its persistence type. After adding an object, this method marks the corresponding BVH tree for rebuild. returns true if selectable object is added, otherwise returns false (selectable object is already in the set).
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    bool

BVH()
  • Returns computed BVH for the theSubset given.
    param theSubset

    type theSubset

    BVHSubset

    rtype

    opencascade::handle<BVH_Tree<float, 3> >

BVHSubsetNb = 3
BVHSubset_2dPersistent = 2
BVHSubset_3d = 0
BVHSubset_3dPersistent = 1
ChangeSubset()
  • Performs necessary updates when object’s persistence types changes. This method should be called right after changing transformation persistence flags of the objects and before updating BVH tree - to provide up-to-date state of the object set.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    None

Contains()
  • Returns true if this objects set contains theObject given.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    bool

GetObjectById()
  • Returns object from subset theSubset by theIndex given. The method allows to get selectable object referred by the index of an element of the subset’s BVH tree.
    param theSubset

    type theSubset

    BVHSubset

    param theIndex

    type theIndex

    int

    rtype

    opencascade::handle<SelectMgr_SelectableObject>

IsEmpty()
  • Returns true if the object set does not contain any selectable objects.
    rtype

    bool* Returns true if the specified object subset is empty.

    param theSubset

    type theSubset

    BVHSubset

    rtype

    bool

MarkDirty()
  • Marks every BVH subset for update.
    rtype

    None

Remove()
  • Removes the selectable object from the set. The selectable object is removed from the subset it has been placed into. After removing an object, this method marks the corresponding BVH tree for rebuild. returns true if selectable object is removed, otherwise returns false (selectable object is not in the set).
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    bool

UpdateBVH()
  • Updates outdated BVH trees and remembers the last state of the camera view-projection matrices and viewport (window) dimensions.
    param theCamera

    type theCamera

    Graphic3d_Camera

    param theProjectionMat

    type theProjectionMat

    Graphic3d_Mat4d

    param theWorldViewMat

    type theWorldViewMat

    Graphic3d_Mat4d

    param theViewState

    type theViewState

    Graphic3d_WorldViewProjState

    param theViewportWidth

    type theViewportWidth

    int

    param theViewportHeight

    type theViewportHeight

    int

    rtype

    None

property thisown

The membership flag

class SelectMgr_SelectingVolumeManager(*args)

Bases: OCC.Core.SelectBasics.SelectBasics_SelectingVolumeManager

  • Creates instances of all available selecting volume types
    param theToAllocateFrustums

    default value is Standard_True

    type theToAllocateFrustums

    bool

    rtype

    None

AllowOverlapDetection()
  • Is used for rectangular selection only If theIsToAllow is false, only fully included sensitives will be detected, otherwise the algorithm will mark both included and overlapped entities as matched
    param theIsToAllow

    type theIsToAllow

    bool

    rtype

    void

BuildSelectingVolume()
  • Builds rectangular selecting frustum for point selection
    param thePoint

    type thePoint

    gp_Pnt2d

    rtype

    None* Builds rectangular selecting frustum for box selection

    param theMinPt

    type theMinPt

    gp_Pnt2d

    param theMaxPt

    type theMaxPt

    gp_Pnt2d

    rtype

    None* Builds set of triangular selecting frustums for polyline selection

    param thePoints

    type thePoints

    TColgp_Array1OfPnt2d

    rtype

    None

Camera()
  • Returns current camera definition.
    rtype

    opencascade::handle<Graphic3d_Camera>

DetectedPoint()
  • Calculates the point on a view ray that was detected during the run of selection algo by given depth. Throws exception if active selection type is not Point.
    param theDepth

    type theDepth

    float

    rtype

    gp_Pnt

DistToGeometryCenter()
  • Measures distance between 3d projection of user-picked screen point and given point theCOG
    param theCOG

    type theCOG

    gp_Pnt

    rtype

    float

GetActiveSelectionType()
Return type

int

GetFarPickedPnt()
  • Valid only for point and rectangular selection. Returns projection of 2d mouse picked point or projection of center of 2d rectangle (for point and rectangular selection correspondingly) onto far view frustum plane
    rtype

    gp_Pnt

GetMousePosition()
  • Return mouse coordinates for Point selection mode.
    rtype

    gp_Pnt2d

GetNearPickedPnt()
  • Valid only for point and rectangular selection. Returns projection of 2d mouse picked point or projection of center of 2d rectangle (for point and rectangular selection correspondingly) onto near view frustum plane
    rtype

    gp_Pnt

GetPlanes()
  • Stores plane equation coefficients (in the following form: Ax + By + Cz + D = 0) to the given vector
    param thePlaneEquations

    type thePlaneEquations

    NCollection_Vector<SelectMgr_Vec4>

    rtype

    None

GetVertices()
  • A set of helper functions that return rectangular selecting frustum data
    rtype

    gp_Pnt *

IsOverlapAllowed()
Return type

bool

ObjectClipping()
  • Return object clipping planes.
    rtype

    opencascade::handle<Graphic3d_SequenceOfHClipPlane>

Overlaps()
  • SAT intersection test between defined volume and given axis-aligned box
    param theBoxMin

    type theBoxMin

    SelectMgr_Vec3

    param theBoxMax

    type theBoxMax

    SelectMgr_Vec3

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool* Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum corner at point theMinPt and maximum at point theMaxPt

    param theBoxMin

    type theBoxMin

    SelectMgr_Vec3

    param theBoxMax

    type theBoxMax

    SelectMgr_Vec3

    param theInside

    default value is NULL

    type theInside

    bool *

    rtype

    bool* Intersection test between defined volume and given point

    param thePnt

    type thePnt

    gp_Pnt

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool* Intersection test between defined volume and given point

    param thePnt

    type thePnt

    gp_Pnt

    rtype

    bool* SAT intersection test between defined volume and given ordered set of points, representing line segments. The test may be considered of interior part or boundary line defined by segments depending on given sensitivity type

    param theArrayOfPts

    type theArrayOfPts

    TColgp_HArray1OfPnt

    param theSensType

    type theSensType

    int

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool* SAT intersection test between defined volume and given ordered set of points, representing line segments. The test may be considered of interior part or boundary line defined by segments depending on given sensitivity type

    param theArrayOfPts

    type theArrayOfPts

    TColgp_Array1OfPnt

    param theSensType

    type theSensType

    int

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool* Checks if line segment overlaps selecting frustum

    param thePnt1

    type thePnt1

    gp_Pnt

    param thePnt2

    type thePnt2

    gp_Pnt

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool* SAT intersection test between defined volume and given triangle. The test may be considered of interior part or boundary line defined by triangle vertices depending on given sensitivity type

    param thePnt1

    type thePnt1

    gp_Pnt

    param thePnt2

    type thePnt2

    gp_Pnt

    param thePnt3

    type thePnt3

    gp_Pnt

    param theSensType

    type theSensType

    int

    param thePickResult

    type thePickResult

    SelectBasics_PickResult

    rtype

    bool

ProjectionMatrix()
  • returns current projection transformation common for all selecting volumes
    rtype

    Graphic3d_Mat4d

ScaleAndTransform()
  • IMPORTANT: Scaling makes sense only for frustum built on a single point! Note that this method does not perform any checks on type of the frustum. //! Returns a copy of the frustum resized according to the scale factor given and transforms it using the matrix given. There are no default parameters, but in case if: - transformation only is needed: @theScaleFactor must be initialized as any negative value; - scale only is needed: @theTrsf must be set to gp_Identity. Builder is an optional argument that represents corresponding settings for re-constructing transformed frustum from scratch. Can be null if reconstruction is not expected furthermore.
    param theScaleFactor

    type theScaleFactor

    int

    param theTrsf

    type theTrsf

    gp_GTrsf

    param theBuilder

    default value is NULL

    type theBuilder

    SelectMgr_FrustumBuilder

    rtype

    SelectMgr_SelectingVolumeManager

SetActiveSelectionType()
Parameters

theType

type theType

SelectionType

rtype

None

SetCamera()
  • Updates camera projection and orientation matrices in all selecting volumes
    param theCamera

    type theCamera

    Graphic3d_Camera

    rtype

    None* Updates camera projection and orientation matrices in all selecting volumes

    param theProjection

    type theProjection

    Graphic3d_Mat4d

    param theWorldView

    type theWorldView

    Graphic3d_Mat4d

    param theIsOrthographic

    type theIsOrthographic

    bool

    param theWVPState

    default value is Graphic3d_WorldViewProjState()

    type theWVPState

    Graphic3d_WorldViewProjState

    rtype

    None

SetPixelTolerance()
  • Updates pixel tolerance in all selecting volumes
    param theTolerance

    type theTolerance

    int

    rtype

    None

SetViewClipRanges()
  • Set clipping range.
    param theRange

    type theRange

    SelectMgr_ViewClipRange

    rtype

    None

SetViewClipping()
  • Valid for point selection only! Computes depth range for clipping planes. @param theViewPlanes global view planes @param theObjPlanes object planes
    param theViewPlanes

    type theViewPlanes

    Graphic3d_SequenceOfHClipPlane

    param theObjPlanes

    type theObjPlanes

    Graphic3d_SequenceOfHClipPlane

    rtype

    None* Copy clipping planes from another volume manager.

    param theOther

    type theOther

    SelectMgr_SelectingVolumeManager

    rtype

    None

SetViewport()
  • Updates viewport in all selecting volumes
    param theX

    type theX

    float

    param theY

    type theY

    float

    param theWidth

    type theWidth

    float

    param theHeight

    type theHeight

    float

    rtype

    None

SetWindowSize()
  • Updates window size in all selecting volumes
    param theWidth

    type theWidth

    int

    param theHeight

    type theHeight

    int

    rtype

    None

ViewClipRanges()
  • Return clipping range.
    rtype

    SelectMgr_ViewClipRange

ViewClipping()
  • Return view clipping planes.
    rtype

    opencascade::handle<Graphic3d_SequenceOfHClipPlane>

WindowSize()
Parameters

theWidth

type theWidth

int

param theHeight

type theHeight

int

rtype

None

WorldViewMatrix()
  • returns current world view transformation common for all selecting volumes
    rtype

    Graphic3d_Mat4d

WorldViewProjState()
  • returns current camera world view projection transformation state common for all selecting volumes
    rtype

    Graphic3d_WorldViewProjState

property thisown

The membership flag

class SelectMgr_Selection(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • Constructs a selection object defined by the selection mode IdMode. The default setting 0 is the selection mode for a shape in its entirety.
    param theModeIdx

    default value is 0

    type theModeIdx

    int

    rtype

    None

Add()
  • Adds the sensitive primitive to the list of stored entities in this object. Raises NullObject if the primitive is a null handle.
    param theSensitive

    type theSensitive

    Select3D_SensitiveEntity

    rtype

    None

BVHUpdateStatus()
Return type

SelectMgr_TypeOfBVHUpdate

ChangeEntities()
  • Return entities.
    rtype

    NCollection_Vector<opencascade::handle<SelectMgr_SensitiveEntity> >

Clear()
  • empties the selection from all the stored entities
    rtype

    None

Destroy()
Return type

None

static DownCast(t)
Entities()
  • Return entities.
    rtype

    NCollection_Vector<opencascade::handle<SelectMgr_SensitiveEntity> >

GetSelectionState()
  • Returns status of selection
    rtype

    SelectMgr_StateOfSelection

Init()
  • Begins an iteration scanning for sensitive primitives.
    rtype

    None

IsEmpty()
  • returns true if no sensitive entity is stored.
    rtype

    bool

Mode()
  • returns the selection mode represented by this selection
    rtype

    int

More()
  • Continues the iteration scanning for sensitive primitives with the mode defined in this framework.
    rtype

    bool

Next()
  • Returns the next sensitive primitive found in the iteration. This is a scan for entities with the mode defined in this framework.
    rtype

    None

Sensitive()
  • Returns any sensitive primitive in this framework.
    rtype

    opencascade::handle<SelectMgr_SensitiveEntity>

Sensitivity()
  • Returns sensitivity of the selection
    rtype

    int

SetSelectionState()
  • Sets status of selection
    param theState

    type theState

    SelectMgr_StateOfSelection

    rtype

    None

SetSensitivity()
  • Changes sensitivity of the selection and all its entities to the given value. IMPORTANT: This method does not update any outer selection structures, so for proper updates use SelectMgr_SelectionManager::SetSelectionSensitivity method.
    param theNewSens

    type theNewSens

    int

    rtype

    None

UpdateBVHStatus()
Parameters

theStatus

type theStatus

SelectMgr_TypeOfBVHUpdate

rtype

None

UpdateStatus()
  • Returns the flag UpdateFlag. This flage gives the update status of this framework in a ViewerSelector object: - full - partial, or - none.
    rtype

    SelectMgr_TypeOfUpdate:param theStatus:

    type theStatus

    SelectMgr_TypeOfUpdate

    rtype

    None

property thisown

The membership flag

class SelectMgr_SelectionManager(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • Constructs an empty selection manager object.
    param theSelector

    type theSelector

    SelectMgr_ViewerSelector

    rtype

    None

Activate()
  • Activates the selection mode theMode in the selector theSelector for the selectable object anObject. By default, theMode is equal to 0. If theSelector is set to default (NULL), the selection with the mode theMode will be activated in all the viewers available.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    default value is 0

    type theMode

    int

    rtype

    None

ClearSelectionStructures()
  • Removes sensitive entities from all viewer selectors after method Clear() was called to the selection they belonged to or it was recomputed somehow.
    param theObj

    type theObj

    SelectMgr_SelectableObject

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

Contains()
  • Returns true if the manager contains the selectable object theObject.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    bool

Deactivate()
  • Deactivates mode theMode of theObject in theSelector. If theMode value is set to default (-1), all active selection modes will be deactivated. Likewise, if theSelector value is set to default (NULL), theMode will be deactivated in all viewer selectors.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

static DownCast(t)
IsActivated()
  • Returns true if the selection with theMode is active for the selectable object theObject and selector theSelector. If all parameters are set to default values, it returns it there is any active selection in any known viewer selector for object theObject.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    default value is -1

    type theMode

    int

    rtype

    bool

Load()
  • Loads and computes selection mode theMode (if it is not equal to -1) in global context and adds selectable object to BVH tree. If the object theObject has an already calculated selection with mode theMode and it was removed, the selection will be recalculated.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

RecomputeSelection()
  • Recomputes activated selections of theObject for all known viewer selectors according to theMode specified. If theMode is set to default (-1), then all activated selections will be recomputed. If theIsForce is set to true, then selection mode theMode for object theObject will be recomputed regardless of its activation status.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theIsForce

    default value is Standard_False

    type theIsForce

    bool

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

Remove()
  • Removes selectable object theObject from all viewer selectors it was added to previously, removes it from all contexts and clears all computed selections of theObject.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    rtype

    None

RestoreSelectionStructures()
  • Re-adds newly calculated sensitive entities of recomputed selection defined by mode theMode to all viewer selectors contained that selection.
    param theObj

    type theObj

    SelectMgr_SelectableObject

    param theMode

    default value is -1

    type theMode

    int

    rtype

    None

Selector()
  • Return the Selector.
    rtype

    opencascade::handle<SelectMgr_ViewerSelector>

SetSelectionSensitivity()
  • Allows to manage sensitivity of a particular selection of interactive object theObject and changes previous sensitivity value of all sensitive entities in selection with theMode to the given theNewSensitivity.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    type theMode

    int

    param theNewSens

    type theNewSens

    int

    rtype

    None

SetUpdateMode()
  • Sets type of update of all selections of theObject to the given theType.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theType

    type theType

    SelectMgr_TypeOfUpdate

    rtype

    None* Sets type of update of selection with theMode of theObject to the given theType.

    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theMode

    type theMode

    int

    param theType

    type theType

    SelectMgr_TypeOfUpdate

    rtype

    None

Update()
  • Updates all selections of theObject in all viewer selectors according to its current update status. If theIsForce is set to true, the call is equal to recomputation.
    param theObject

    type theObject

    SelectMgr_SelectableObject

    param theIsForce

    default value is Standard_True

    type theIsForce

    bool

    rtype

    None

UpdateSelection()
  • Re-adds selectable object in BVHs in all viewer selectors.
    param theObj

    type theObj

    SelectMgr_SelectableObject

    rtype

    None

property thisown

The membership flag

class SelectMgr_SensitiveEntity(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • Creates new inactive for selection object with base entity theEntity
    param theEntity

    type theEntity

    Select3D_SensitiveEntity

    rtype

    None

BaseSensitive()
  • Returns related instance of SelectBasics class
    rtype

    opencascade::handle<Select3D_SensitiveEntity>

Clear()
  • Clears up all resources and memory
    rtype

    None

static DownCast(t)
IsActiveForSelection()
  • Returns true if this entity belongs to the active selection mode of parent object
    rtype

    bool

ResetSelectionActiveStatus()
  • Marks entity as inactive for selection
    rtype

    None

SetActiveForSelection()
  • Marks entity as active for selection
    rtype

    None

property thisown

The membership flag

class SelectMgr_SequenceOfFilter(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class SelectMgr_SequenceOfOwner(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class SelectMgr_SequenceOfSelection(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class SelectMgr_SortCriterion(*args)

Bases: object

  • //!< whether closest object is preferred even if has less priority Empty constructor.
    rtype

    None

property Depth
property Entity
IsGreater()
  • Compare with another item.
    param theOther

    type theOther

    SelectMgr_SortCriterion

    rtype

    bool

IsLower()
  • Compare with another item.
    param theOther

    type theOther

    SelectMgr_SortCriterion

    rtype

    bool

property MinDist
property NbOwnerMatches
property Point
property Priority
property ToPreferClosest
property Tolerance
property ZLayerPosition
property thisown

The membership flag

class SelectMgr_Vec3(*args)

Bases: object

ChangeData()
static Cross()
static DX()
static DY()
static DZ()
Dot()
GetData()
static GetLERP()
IsEqual()
static Length()
Modulus()
Multiplied()
Multiply()
Normalize()
Normalized()
SetValues()
SquareModulus()
b()
cwiseAbs()
cwiseMax()
cwiseMin()
g()
maxComp()
minComp()
r()
property thisown

The membership flag

x()
xy()
xyz()
xz()
xzy()
y()
yx()
yxz()
yz()
yzx()
z()
zx()
zxy()
zy()
zyx()
class SelectMgr_Vec4(*args)

Bases: object

ChangeData()
Dot()
GetData()
IsEqual()
static Length()
Multiplied()
Multiply()
SetValues()
a()
b()
bgr()
brg()
cwiseAbs()
cwiseMax()
cwiseMin()
g()
gbr()
grb()
maxComp()
minComp()
r()
rbg()
rgb()
property thisown

The membership flag

w()
wx()
wxy()
wxz()
wy()
wyx()
wyz()
wz()
wzx()
wzy()
x()
xw()
xwy()
xwz()
xy()
xyw()
xyz()
xz()
xzw()
xzy()
y()
yw()
ywx()
ywz()
yx()
yxw()
yxz()
yz()
yzw()
yzx()
z()
zw()
zwx()
zwy()
zx()
zxw()
zxy()
zy()
zyw()
zyx()
class SelectMgr_ViewClipRange(*args)

Bases: object

  • Creates an empty clip range.
    rtype

    None

AddClipSubRange()
  • Adds a clipping sub-range (for clipping chains).
    param theRange

    type theRange

    Bnd_Range

    rtype

    None

AddClippingPlanes()
  • Add clipping planes. Planes and picking ray should be defined in the same coordinate system.
    param thePlanes

    type thePlanes

    Graphic3d_SequenceOfHClipPlane

    param thePickRay

    type thePickRay

    gp_Ax1

    rtype

    None

ChangeUnclipRange()
  • Returns the main unclipped range; [-inf, inf] by default.
    rtype

    Bnd_Range

DumpJsonToString(SelectMgr_ViewClipRange self, int depth=-1) → std::string
GetNearestDepth()
  • Calculates the min not clipped value from the range. Returns False if the whole range is clipped.
    param theRange

    type theRange

    Bnd_Range

    param theDepth

    type theDepth

    float

    rtype

    bool

IsClipped()
  • Check if the given depth is not within clipping range(s), e.g. True means depth is clipped.
    param theDepth

    type theDepth

    float

    rtype

    bool

SetVoid()
  • Clears clipping range.
    rtype

    None

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()