OCC.SelectMgr module

SelectMgr manages the process of dynamicselection through the following services:- activating and deactivating selection modes for Interactive Objects- adding and removing viewer selectors- definitions of abstract filter classesThe principle of graphic selection consists inrepresenting the objects which you want to selectby a bounding box in the selection view. The objectis selected when you use the mouse to designatethe zone produced by the object.To realize this, the application creates a selectionstructure which is independent of the point of view.This structure is made up of sensitive primitiveswhich have one owner object associated to each ofthem. The role of the sensitive primitive is to replyto the requests of the selection algorithm whereasthe owner’s purpose is to make the link betweenthe sensitive primitive and the object to be selected.Each selection structure corresponds to a selectionmode which defines the elements that can be selected.For example, to select a complete geometric model,the application can create a sensitive primitive foreach face of the interactive object representing thegeometric model. In this case, all the primitivesshare the same owner. On the other hand, to selectan edge in a model, the application must createone sensitive primitive per edge.ExamplevoidInteractiveBox::ComputeSelection(const Handle(SelectMgr_Selection)& Sel,const Standard_Integer Mode){ switch(Mode){ case 0:// locating the whole box by making its faces sensitive …{Handle(SelectMgr_EntityOwner)Ownr = newSelectMgr_EntityOwner(this,5);for(Standard_IntegerI=1;I<=Nbfaces;I++){Sel->Add(new Select3D_SensitiveFace(Ownr,[array of the vertices] face I);break;}case 1: // locates the edges{for(Standard_Integeri=1;i<=12;i++){// 1 owner per edge…Handle(mypk_EdgeOwner)Ownr = newmypk_EdgeOwner(this,i,6);// 6->prioritySel->Add(newSelect3D_SensitiveSegment(Ownr,firstpt(i),lastpt(i));}}}The algorithms for creating selection structuresstore the sensitive primitives in aSelectMgr_Selection object. To do this, a set ofready-made sensitive primitives is supplied in theSelect2D and Select3D packages. New sensitiveprimitives can be defined through inheritancefrom SensitiveEntity. For the application to makeits own objects selectable, it must define ownerclasses inheriting SelectMgr_EntityOwner.For any object inheriting fromAIS_InteractiveObject, you redefine itsComputeSelection functions. In the example belowthere are different modes of selection on thetopological shape contained within the interactiveobject -selection of the shape itself, the vertices,the edges, the wires, the faces.ExamplevoidMyPack_MyClass::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode){switch(aMode){case 0:StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_SHAPE);break;}case 1:StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_VERTEX);break;}case 2:StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_EDGE);break;}case 3:StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_WIRE);break;}case 4:StdSelect_BRepSelectionTool::Load(aSelection,this,myShape,TopAbs_FACE);break;}}The StdSelect_BRepSelectionTool objectprovides a high level service which will make theshape ‘myShape’ selectable when theAIS_InteractiveContext is asked to display your object.Note: The traditional way of highlighting selected entityowners adopted by the Open CASCADE library assumes thateach entity owner highlights itself on its own. This approachhas two drawbacks:- each entity owner has to maintain its ownPrs3d_Presentation object, that results inlarge memory overhead for thousands of owners;- drawing selected owners one by one is notefficient from the OpenGL usage viewpoint.That is why a different method has been introduced. On the basis ofSelectMgr_EntityOwner::IsAutoHilight() return value an AIS_LocalContextobject either uses the traditional way of highlighting(IsAutoHilight() returned true) or groups such owners accordingto their Selectable Objects and finally callsSelectMgr_SelectableObject::HilightSelected()or ClearSelected(), passing a group of owners as an argument.Hence, an application can derive its own interactive object andredefine HilightSelected(), ClearSelected() andHilightOwnerWithColor() virtual methods to take advantage ofsuch OpenGL technique as arrays of primitives. In any case,these methods should at least have empty implementation.The AIS_LocalContext::UpdateSelected(const Handle(AIS_InteratciveObject)&,Standard_Boolean) method can be used for efficient redrawing aselection presentation for a given interactive object from anapplication code.Additionally, the SelectMgr_SelectableObject::ClearSelections()method now accepts an optional boolean argument. This parameterdefines whether all object selections should be flagged forfurther update or not. This improved method can be used tore-compute an object selection (without redisplaying the objectcompletely) when some selection mode is activated not for the first time.

class Handle_SelectMgr_AndFilter(*args)

Bases: OCC.SelectMgr.Handle_SelectMgr_CompositionFilter

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_CompositionFilter(*args)

Bases: OCC.SelectMgr.Handle_SelectMgr_Filter

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_DataMapNodeOfDataMapOfObjectSelectors(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_EntityOwner(*args)

Bases: OCC.SelectBasics.Handle_SelectBasics_EntityOwner

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_Filter(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_ListNodeOfListOfFilter(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_OrFilter(*args)

Bases: OCC.SelectMgr.Handle_SelectMgr_CompositionFilter

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SelectableObject(*args)

Bases: OCC.PrsMgr.Handle_PrsMgr_PresentableObject

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_Selection(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SelectionManager(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SensitiveEntity(*args)

Bases: OCC.Standard.Handle_Standard_Transient

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SequenceNodeOfSequenceOfFilter(*args)

Bases: OCC.TCollection.Handle_TCollection_SeqNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SequenceNodeOfSequenceOfOwner(*args)

Bases: OCC.TCollection.Handle_TCollection_SeqNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_SequenceNodeOfSequenceOfSelector(*args)

Bases: OCC.TCollection.Handle_TCollection_SeqNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class Handle_SelectMgr_ViewerSelector(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class SelectMgr_AndFilter(*args)

Bases: OCC.SelectMgr.SelectMgr_CompositionFilter

  • Constructs an empty selection filter object for two or more types of entity.
Return type:None
GetHandle()
thisown

The membership flag

class SelectMgr_CompositionFilter(*args, **kwargs)

Bases: OCC.SelectMgr.SelectMgr_Filter

Add()
  • Adds the filter afilter to a filter object created by a filter class inheriting this framework.
Parameters:afilter (Handle_SelectMgr_Filter &) –
Return type:None
Clear()
  • Clears the filters used in this framework.
Return type:None
GetHandle()
IsEmpty()
  • Returns true if this framework is empty.
Return type:bool
IsIn()
  • Returns true if the filter aFilter is in this framework.
Parameters:aFilter (Handle_SelectMgr_Filter &) –
Return type:bool
Remove()
  • Removes the filter aFilter from this framework.
Parameters:aFilter (Handle_SelectMgr_Filter &) –
Return type:None
StoredFilters()
  • Returns the list of stored filters from this framework.
Return type:SelectMgr_ListOfFilter
thisown

The membership flag

class SelectMgr_DataMapIteratorOfDataMapOfObjectSelectors(*args)

Bases: OCC.TCollection.TCollection_BasicMapIterator

Return type:None
Parameters:aMap (SelectMgr_DataMapOfObjectSelectors &) –
Return type:None
Initialize()
Parameters:aMap (SelectMgr_DataMapOfObjectSelectors &) –
Return type:None
Key()
Return type:Handle_SelectMgr_SelectableObject
Value()
Return type:SelectMgr_SequenceOfSelector
thisown

The membership flag

class SelectMgr_DataMapNodeOfDataMapOfObjectSelectors(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • K (Handle_SelectMgr_SelectableObject &) –
  • I (SelectMgr_SequenceOfSelector &) –
  • n (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
Key()
Return type:Handle_SelectMgr_SelectableObject
Value()
Return type:SelectMgr_SequenceOfSelector
thisown

The membership flag

class SelectMgr_DataMapOfObjectSelectors(*args)

Bases: OCC.TCollection.TCollection_BasicMap

Parameters:NbBuckets (int) – default value is 1
Return type:None
Assign()
Parameters:Other (SelectMgr_DataMapOfObjectSelectors &) –
Return type:SelectMgr_DataMapOfObjectSelectors
Bind()
Parameters:
  • K (Handle_SelectMgr_SelectableObject &) –
  • I (SelectMgr_SequenceOfSelector &) –
Return type:

bool

ChangeFind()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:SelectMgr_SequenceOfSelector
ChangeFind1()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:Standard_Address
Clear()
Return type:None
Find()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:SelectMgr_SequenceOfSelector
Find1()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:Standard_Address
IsBound()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:bool
ReSize()
Parameters:NbBuckets (int) –
Return type:None
Set()
Parameters:Other (SelectMgr_DataMapOfObjectSelectors &) –
Return type:SelectMgr_DataMapOfObjectSelectors
UnBind()
Parameters:K (Handle_SelectMgr_SelectableObject &) –
Return type:bool
thisown

The membership flag

class SelectMgr_EntityOwner(*args)

Bases: OCC.SelectBasics.SelectBasics_EntityOwner

  • Initializes the selection priority aPriority.
Parameters:aPriority (int) – default value is 0
Return type:None
  • Constructs a framework with the selectable object anSO being attributed the selection priority aPriority.
Parameters:
  • aSO (Handle_SelectMgr_SelectableObject &) –
  • aPriority (int) – default value is 0
Return type:

None

  • Constructs a framework from existing one anSO being attributed the selection priority aPriority.
Parameters:
  • theOwner (Handle_SelectMgr_EntityOwner &) –
  • aPriority (int) – default value is 0
Return type:

None

Clear()
  • Clears the owners matching the value of the selection mode aMode from the presentation manager object aPM.
Parameters:
  • aPM (Handle_PrsMgr_PresentationManager &) –
  • aMode (int) – default value is 0
Return type:

void

GetHandle()
HasSelectable()
  • Returns true if there is a selectable object to serve as an owner.
Return type:bool
Hilight()
  • Provides a framework to highlight any selectable object found subsequently which can serve as an owner of a sensitive primitive.
Return type:void
  • Highlights the owner of a detected selectable object in the presentation manager aPM. This object could be the owner of a sensitive primitive. The display mode for the highlight is aMode; this has the default value of 0, that is, wireframe mode.
Parameters:
  • aPM (Handle_PrsMgr_PresentationManager &) –
  • aMode (int) – default value is 0
Return type:

void

HilightWithColor()
Parameters:
  • aPM (Handle_PrsMgr_PresentationManager3d &) –
  • aColor (Quantity_NameOfColor) –
  • aMode (int) – default value is 0
Return type:

void

IsAutoHilight()
  • if owner is not auto hilighted, for group contains many such owners will be called one method HilightSelected of SelectableObject
Return type:bool
IsForcedHilight()
  • if this method returns True the owner will allways call method Hilight for SelectableObject when the owner is detected. By default it always return False.
Return type:bool
IsHilighted()
  • Returns true if the presentation manager aPM highlights selections corresponding to the selection mode aMode.
Parameters:
  • aPM (Handle_PrsMgr_PresentationManager &) –
  • aMode (int) – default value is 0
Return type:

bool

IsSelected()
  • returns Standard_True if the owner is selected.
Return type:bool
Selectable()
  • Returns a selectable object detected in the working context.
Return type:Handle_SelectMgr_SelectableObject
Set()
  • Sets the selectable object anSO to be used by the second constructor above.
Parameters:aSO (Handle_SelectMgr_SelectableObject &) –
Return type:None
SetSelected()
  • Set the state of the owner. @param theIsSelected [in] shows if owner is selected.
Parameters:theIsSelected (bool) –
Return type:None
SetZLayer()
  • Set Z layer ID and update all presentations.
Parameters:theLayerId (Graphic3d_ZLayerId) –
Return type:void
State()
  • Set the state of the owner. The method is deprecated. Use SetSelected() instead.
Parameters:aStatus (int) –
Return type:None
Return type:int
Unhilight()
  • Removes highlighting from the owner of a detected selectable object in the presentation manager aPM. This object could be the owner of a sensitive primitive. The display mode for the highlight is aMode; this has the default value of 0, that is, wireframe mode.
Parameters:
  • aPM (Handle_PrsMgr_PresentationManager &) –
  • aMode (int) – default value is 0
Return type:

void

thisown

The membership flag

class SelectMgr_Filter(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

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.
Parameters:aStandardMode (TopAbs_ShapeEnum) –
Return type:bool
GetHandle()
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.
Parameters:anObj (Handle_SelectMgr_EntityOwner &) –
Return type:bool
thisown

The membership flag

class SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • K1 (Handle_SelectBasics_EntityOwner &) –
  • K2 (int) –
  • I (SelectMgr_SortCriterion &) –
  • n1 (TCollection_MapNodePtr &) –
  • n2 (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
GetKey2()

SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion_GetKey2(SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion self) -> Standard_Integer

Key1()
Return type:Handle_SelectBasics_EntityOwner
Next2()
Return type:TCollection_MapNodePtr
SetKey2()

SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion_SetKey2(SelectMgr_IndexedDataMapNodeOfIndexedDataMapOfOwnerCriterion self, Standard_Integer value)

Value()
Return type:SelectMgr_SortCriterion
thisown

The membership flag

class SelectMgr_IndexedDataMapOfOwnerCriterion(*args)

Bases: OCC.TCollection.TCollection_BasicMap

Parameters:NbBuckets (int) – default value is 1
Return type:None
Add()
Parameters:
  • K (Handle_SelectBasics_EntityOwner &) –
  • I (SelectMgr_SortCriterion &) –
Return type:

int

Assign()
Parameters:Other (SelectMgr_IndexedDataMapOfOwnerCriterion &) –
Return type:SelectMgr_IndexedDataMapOfOwnerCriterion
ChangeFromIndex()
Parameters:I (int) –
Return type:SelectMgr_SortCriterion
ChangeFromKey()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:SelectMgr_SortCriterion
ChangeFromKey1()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:Standard_Address
Clear()
Return type:None
Contains()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:bool
FindFromIndex()
Parameters:I (int) –
Return type:SelectMgr_SortCriterion
FindFromKey()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:SelectMgr_SortCriterion
FindFromKey1()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:Standard_Address
FindIndex()
Parameters:K (Handle_SelectBasics_EntityOwner &) –
Return type:int
FindKey()
Parameters:I (int) –
Return type:Handle_SelectBasics_EntityOwner
ReSize()
Parameters:NbBuckets (int) –
Return type:None
RemoveLast()
Return type:None
Set()
Parameters:Other (SelectMgr_IndexedDataMapOfOwnerCriterion &) –
Return type:SelectMgr_IndexedDataMapOfOwnerCriterion
Substitute()
Parameters:
  • I (int) –
  • K (Handle_SelectBasics_EntityOwner &) –
  • T (SelectMgr_SortCriterion &) –
Return type:

None

thisown

The membership flag

class SelectMgr_ListIteratorOfListOfFilter(*args)

Bases: object

Return type:None
Parameters:L (SelectMgr_ListOfFilter &) –
Return type:None
Initialize()
Parameters:L (SelectMgr_ListOfFilter &) –
Return type:None
More()
Return type:bool
Next()
Return type:None
Value()
Return type:Handle_SelectMgr_Filter
thisown

The membership flag

class SelectMgr_ListNodeOfListOfFilter(*args)

Bases: OCC.TCollection.TCollection_MapNode

Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • n (TCollection_MapNodePtr &) –
Return type:

None

GetHandle()
Value()
Return type:Handle_SelectMgr_Filter
thisown

The membership flag

class SelectMgr_ListOfFilter(*args)

Bases: object

Return type:None
Parameters:Other (SelectMgr_ListOfFilter &) –
Return type:None
Append()
Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • I
  • theIt (SelectMgr_ListIteratorOfListOfFilter &) –
  • Other (SelectMgr_ListOfFilter &) –
Return type:

None

Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectMgr_ListOfFilter &) –
Return type:None
Clear()
Return type:None
Extent()
Return type:int
First()
Return type:Handle_SelectMgr_Filter
InsertAfter()
Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • It (SelectMgr_ListIteratorOfListOfFilter &) –
  • Other (SelectMgr_ListOfFilter &) –
  • It
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • It (SelectMgr_ListIteratorOfListOfFilter &) –
  • Other (SelectMgr_ListOfFilter &) –
  • It
Return type:

None

Return type:

None

IsEmpty()
Return type:bool
Last()
Return type:Handle_SelectMgr_Filter
Prepend()
Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • I
  • theIt (SelectMgr_ListIteratorOfListOfFilter &) –
  • Other (SelectMgr_ListOfFilter &) –
Return type:

None

Return type:

None

Return type:

None

Remove()
Parameters:It (SelectMgr_ListIteratorOfListOfFilter &) –
Return type:None
RemoveFirst()
Return type:None
Set()
Parameters:Other (SelectMgr_ListOfFilter &) –
Return type:None
thisown

The membership flag

class SelectMgr_OrFilter(*args)

Bases: OCC.SelectMgr.SelectMgr_CompositionFilter

  • Constructs an empty or selection filter.
Return type:None
GetHandle()
SetDisabledObjects()
  • Disable selection of specified objects.
Parameters:theObjects (Handle_Graphic3d_NMapOfTransient &) –
Return type:None
thisown

The membership flag

class SelectMgr_SelectableObject(*args, **kwargs)

Bases: OCC.PrsMgr.PrsMgr_PresentableObject

AddSelection()
  • Adds the selection aSelection with the selection mode index aMode to this framework.
Parameters:
  • aSelection (Handle_SelectMgr_Selection &) –
  • aMode (int) –
Return type:

None

Attributes()
  • Returns the attributes settings.
Return type:Handle_Prs3d_Drawer
BndBoxOfSelected()
  • Returns a bounding box of sensitive entities with the owners given if they are a part of activated selection
Parameters:theOwners (Handle_SelectMgr_IndexedMapOfOwner &) –
Return type:Bnd_Box
BoundingBox()
  • Returns bounding box of selectable object by storing its minimum and maximum 3d coordinates to output parameters
Parameters:theBndBox (Bnd_Box &) –
Return type:void
ClearSelected()
  • Method which clear all selected owners belonging to this selectable object ( for fast presentation draw )
Return type: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.
Parameters:update (bool) – default value is Standard_False
Return type:None
ComputeSelection()
  • Recovers and calculates any sensitive primitive, aSelection, available in Shape mode, specified by aMode. As a rule, these are sensitive faces. This method is defined as virtual. This enables you to implement it in the creation of a new class of AIS Interactive Object. You need to do this and in so doing, redefine this method, if you create a class which enriches the list of signatures and types.
Parameters:
  • aSelection (Handle_SelectMgr_Selection &) –
  • aMode (int) –
Return type:

void

CurrentSelection()
  • Returns the current selection in this framework.
Return type:Handle_SelectMgr_Selection
GetAssemblyOwner()
  • Returns common entity owner if the object is an assembly
Return type:Handle_SelectMgr_EntityOwner
GetHandle()
GetHilightPresentation()
Parameters:TheMgr (Handle_PrsMgr_PresentationManager3d &) –
Return type:Handle_Prs3d_Presentation
GetSelectPresentation()
Parameters:TheMgr (Handle_PrsMgr_PresentationManager3d &) –
Return type:Handle_Prs3d_Presentation
HasSelection()
  • Returns true if a selection corresponding to the selection mode aMode is present in this framework.
Parameters:aMode (int) –
Return type:bool
HilightAttributes()
  • Returns the hilight attributes settings.
Return type:Handle_Prs3d_Drawer
HilightOwnerWithColor()
  • Method which hilight an owner belonging to this selectable object ( for fast presentation draw )
Parameters:
  • thePM (Handle_PrsMgr_PresentationManager3d &) –
  • theColor (Quantity_NameOfColor) –
  • theOwner (Handle_SelectMgr_EntityOwner &) –
Return type:

void

HilightSelected()
  • Method which draws selected owners ( for fast presentation draw )
Parameters:
  • PM (Handle_PrsMgr_PresentationManager3d &) –
  • Seq (SelectMgr_SequenceOfOwner &) –
Return type:

void

Init()
  • Begins the iteration scanning for sensitive primitives.
Return type:None
static InitDefaultHilightAttributes()
  • Initializes theDrawer by default hilight settings.
Parameters:theDrawer (Handle_Prs3d_Drawer &) –
Return type:void
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.
Return type:bool
More()
  • Continues the iteration scanning for sensitive primitives.
Return type:bool
Next()
  • Continues the iteration scanning for sensitive primitives.
Return type: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.
Return type: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.
Parameters:theMode (int) –
Return type:None
Selection()
  • Returns the selection Selection having the selection mode aMode.
Parameters:aMode (int) –
Return type:Handle_SelectMgr_Selection
SetAssemblyOwner()
  • Sets common entity owner for assembly sensitive object entities
Parameters:
  • theOwner (Handle_SelectMgr_EntityOwner &) –
  • theMode (int) – default value is -1
Return type:

None

SetAttributes()
  • Initializes the drawing tool theDrawer.
Parameters:theDrawer (Handle_Prs3d_Drawer &) –
Return type:void
SetAutoHilight()
  • Set AutoHilight property to true or false Sets up Transform Persistence Mode for this object
Parameters:newAutoHilight (bool) –
Return type:void
SetHilightAttributes()
  • Initializes the hilight drawing tool theDrawer.
Parameters:theDrawer (Handle_Prs3d_Drawer &) –
Return type:void
UnsetAttributes()
  • Clears settings provided by the drawing tool theDrawer.
Return type:void
UnsetHilightAttributes()
  • Clears settings provided by the hilight drawing tool theDrawer.
Return type:void
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.
Parameters:theMode (int) – default value is -1
Return type:None
UpdateTransformations()
  • Updates locations in all sensitive entities from <aSelection> and in corresponding entity owners.
Parameters:aSelection (Handle_SelectMgr_Selection &) –
Return type:void
thisown

The membership flag

SelectMgr_SelectableObject_InitDefaultHilightAttributes()
  • Initializes theDrawer by default hilight settings.
Parameters:theDrawer (Handle_Prs3d_Drawer &) –
Return type:void
class SelectMgr_SelectingVolumeManager(*args)

Bases: OCC.SelectBasics.SelectBasics_SelectingVolumeManager

  • Creates instances of all available selecting volume types
Parameters:theToAllocateFrustums (bool) – default value is Standard_True
Return type: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
Parameters:theIsToAllow (bool) –
Return type:void
BuildSelectingVolume()
  • Builds rectangular selecting frustum for point selection
Parameters:thePoint (gp_Pnt2d) –
Return type:None
  • Builds rectangular selecting frustum for box selection
Parameters:
Return type:

None

  • Builds set of triangular selecting frustums for polyline selection
Parameters:thePoints (TColgp_Array1OfPnt2d) –
Return type:None
DetectedPoint()
  • Calculates the point on a view ray that was detected during the run of selection algo by given depth. Is valid for point selection only
Parameters:theDepth (float) –
Return type:gp_Pnt
DistToGeometryCenter()
  • Measures distance between 3d projection of user-picked screen point and given point theCOG
Parameters:theCOG (gp_Pnt) –
Return type:float
GetActiveSelectionType()
Return type:int
GetFarPnt()
Return type:gp_Pnt
GetNearPnt()
Return type:gp_Pnt
GetVertices()
  • A set of helper functions that return rectangular selecting frustum data
Return type:gp_Pnt *
IsClipped()
  • Checks if the point of sensitive in which selection was detected belongs to the region defined by clipping planes
Parameters:
  • thePlanes (Graphic3d_SequenceOfHClipPlane &) –
  • theDepth (float &) –
Return type:

bool

IsOverlapAllowed()
Return type:bool
Overlaps()
  • SAT intersection test between defined volume and given axis-aligned box
Parameters:
  • theBoxMin (SelectMgr_Vec3 &) –
  • theBoxMax (SelectMgr_Vec3 &) –
  • theDepth (float &) –
Return type:

bool

  • Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum corner at point theMinPt and maximum at point theMaxPt
Parameters:
  • theBoxMin (SelectMgr_Vec3 &) –
  • theBoxMax (SelectMgr_Vec3 &) –
  • theInside (bool *) – default value is NULL
Return type:

bool

  • Intersection test between defined volume and given point
Parameters:
  • thePnt (gp_Pnt) –
  • theDepth (float &) –
Return type:

bool

  • Intersection test between defined volume and given point
Parameters:thePnt (gp_Pnt) –
Return type: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
Parameters:
Return type:

bool

  • Checks if line segment overlaps selecting frustum
Parameters:
  • thePnt1 (gp_Pnt) –
  • thePnt2 (gp_Pnt) –
  • theDepth (float &) –
Return type:

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
Parameters:
  • thePnt1 (gp_Pnt) –
  • thePnt2 (gp_Pnt) –
  • thePnt3 (gp_Pnt) –
  • theSensType (int) –
  • theDepth (float &) –
Return type:

bool

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.
Parameters:
Return type:

SelectMgr_SelectingVolumeManager

SetActiveSelectionType()
Parameters:theType (SelectionType &) –
Return type:None
SetCamera()
  • Updates camera projection and orientation matrices in all selecting volumes
Parameters:theCamera (Handle_Graphic3d_Camera) –
Return type:None
  • Updates camera projection and orientation matrices in all selecting volumes
Parameters:
  • theProjection (Graphic3d_Mat4d &) –
  • theOrientation (Graphic3d_Mat4d &) –
  • theIsOrthographic (bool) –
Return type:

None

SetPixelTolerance()
  • Updates pixel tolerance in all selecting volumes
Parameters:theTolerance (int) –
Return type:None
SetViewport()
  • Updates viewport in all selecting volumes
Parameters:
Return type:

None

SetWindowSize()
  • Updates window size in all selecting volumes
Parameters:
  • theWidth (int) –
  • theHeight (int) –
Return type:

None

thisown

The membership flag

class SelectMgr_Selection(*args)

Bases: OCC.MMgt.MMgt_TShared

  • Constructs a selection object defined by the selection mode IdMode. The default setting 0 is the selection mode for a shape in its entirety.
Parameters:theModeIdx (int) – default value is 0
Return type:None
Add()
  • Adds the sensitive primitive aprimitive to the list of stored entities in this object. Raises NullObject if the primitive is a null handle.
Parameters:theSensitive (Handle_SelectBasics_SensitiveEntity &) –
Return type:None
BVHUpdateStatus()
Return type:SelectMgr_TypeOfBVHUpdate
Clear()
  • empties the selection from all the stored entities
Return type:None
Destroy()
Return type:None
GetHandle()
GetSelectionState()
  • Returns status of selection
Return type:SelectMgr_StateOfSelection
Init()
  • Begins an iteration scanning for sensitive primitives.
Return type:None
IsEmpty()
  • returns true if no sensitive entity is stored.
Return type:bool
Mode()
  • returns the selection mode represented by this selection
Return type:int
More()
  • Continues the iteration scanning for sensitive primitives with the mode defined in this framework.
Return type:bool
Next()
  • Returns the next sensitive primitive found in the iteration. This is a scan for entities with the mode defined in this framework.
Return type:None
Sensitive()
  • Returns any sensitive primitive in this framework.
Return type:Handle_SelectMgr_SensitiveEntity
Sensitivity()
  • Returns sensitivity of the selection
Return type:int
SetSelectionState()
  • Sets status of selection
Parameters:theState (SelectMgr_StateOfSelection) –
Return type: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.
Parameters:theNewSens (int) –
Return type:None
UpdateBVHStatus()
Parameters:theStatus (SelectMgr_TypeOfBVHUpdate) –
Return type:None
UpdateStatus()
  • Returns the flag UpdateFlag. This flage gives the update status of this framework in a ViewerSelector object: - full - partial, or - none.
Return type:SelectMgr_TypeOfUpdate
Parameters:theStatus (SelectMgr_TypeOfUpdate) –
Return type:None
thisown

The membership flag

class SelectMgr_SelectionManager(*args)

Bases: OCC.MMgt.MMgt_TShared

  • Constructs an empty selection manager object.
Return type: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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is 0
  • theSelector (Handle_SelectMgr_ViewerSelector &) – default value is NULL
Return type:

None

Add()
  • Adds the viewer selector theSelector to the list of known items.
Parameters:theSelector (Handle_SelectMgr_ViewerSelector &) –
Return type: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.
Parameters:
  • theObj (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is -1
  • theSelector (Handle_SelectMgr_ViewerSelector &) – default value is NULL
Return type:

None

Contains()
  • Returns true if the manager contains the viewer selector theSelector in a list of known items.
Parameters:theSelector (Handle_SelectMgr_ViewerSelector &) –
Return type:bool
  • Returns true if the manager contains the selectable object theObject.
Parameters:theObject (Handle_SelectMgr_SelectableObject &) –
Return type:bool
Deactivate()
  • Deactivates mode theMode of theObject in theSelector. If theMode value is set to default (-1), all avtive selection modes will be deactivated. Likewise, if theSelector value is set to default (NULL), theMode will be deactivated in all viewer selectors.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is -1
  • theSelector (Handle_SelectMgr_ViewerSelector &) – default value is NULL
Return type:

None

GetHandle()
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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is -1
  • theSelector (Handle_SelectMgr_ViewerSelector &) – default value is NULL
Return type:

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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is -1
Return type:

None

  • Loads and computes selection mode theMode (if it is not equal to -1) and adds selectable object to BVH tree. Does not perform check of existance of theObject in global context before addition, but adds theSelector to local context.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theSelector (Handle_SelectMgr_ViewerSelector &) –
  • theMode (int) – default value is -1
Return type:

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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theIsForce (bool) – default value is Standard_False
  • theMode (int) – default value is -1
Return type:

None

Remove()
  • Removes viewer selector theSelector from the list of known items.
Parameters:theSelector (Handle_SelectMgr_ViewerSelector &) –
Return type:None
  • 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.
Parameters:theObject (Handle_SelectMgr_SelectableObject &) –
Return type:None
  • Removes theObject from theSelector, does not clear selections and unbind theObject from context maps.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theSelector (Handle_SelectMgr_ViewerSelector &) –
Return type:

None

RestoreSelectionStructures()
  • Re-adds newely calculated sensitive entities of recomputed selection defined by mode theMode to all viewer selectors contained that selection.
Parameters:
  • theObj (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) – default value is -1
  • theSelector (Handle_SelectMgr_ViewerSelector &) – default value is NULL
Return type:

None

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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) –
  • theNewSens (int) –
Return type:

None

SetUpdateMode()
  • Sets type of update of all selections of theObject to the given theType.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theType (SelectMgr_TypeOfUpdate) –
Return type:

None

  • Sets type of update of selection with theMode of theObject to the given theType.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) –
  • theType (SelectMgr_TypeOfUpdate) –
Return type:

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.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theIsForce (bool) – default value is Standard_True
Return type:

None

  • Updates all selections of theObject in specified viewer selector according to its current update status. If theIsForce is set to true, the call is equal to recomputation.
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theSelector (Handle_SelectMgr_ViewerSelector &) –
  • theIsForce (bool) – default value is Standard_True
Return type:

None

thisown

The membership flag

class SelectMgr_SensitiveEntity(*args)

Bases: OCC.Standard.Standard_Transient

  • Creates new inactive for selection object with base entity theEntity
Parameters:theEntity (Handle_SelectBasics_SensitiveEntity &) –
Return type:None
BaseSensitive()
  • Returns related instance of SelectBasics class
Return type:Handle_SelectBasics_SensitiveEntity
Clear()
  • Clears up all resources and memory
Return type:None
GetHandle()
IsActiveForSelection()
  • Returns true if this entity belongs to the active selection mode of parent object
Return type:bool
ResetSelectionActiveStatus()
  • Marks entity as inactive for selection
Return type:None
SetActiveForSelection()
  • Marks entity as active for selection
Return type:None
thisown

The membership flag

class SelectMgr_SequenceNodeOfSequenceOfFilter(*args)

Bases: OCC.TCollection.TCollection_SeqNode

Parameters:
  • I (Handle_SelectMgr_Filter &) –
  • n (TCollection_SeqNodePtr &) –
  • p (TCollection_SeqNodePtr &) –
Return type:

None

GetHandle()
Value()
Return type:Handle_SelectMgr_Filter
thisown

The membership flag

class SelectMgr_SequenceNodeOfSequenceOfOwner(*args)

Bases: OCC.TCollection.TCollection_SeqNode

Parameters:
  • I (Handle_SelectMgr_EntityOwner &) –
  • n (TCollection_SeqNodePtr &) –
  • p (TCollection_SeqNodePtr &) –
Return type:

None

GetHandle()
Value()
Return type:Handle_SelectMgr_EntityOwner
thisown

The membership flag

class SelectMgr_SequenceNodeOfSequenceOfSelector(*args)

Bases: OCC.TCollection.TCollection_SeqNode

Parameters:
  • I (Handle_SelectMgr_ViewerSelector &) –
  • n (TCollection_SeqNodePtr &) –
  • p (TCollection_SeqNodePtr &) –
Return type:

None

GetHandle()
Value()
Return type:Handle_SelectMgr_ViewerSelector
thisown

The membership flag

class SelectMgr_SequenceOfFilter(*args)

Bases: OCC.TCollection.TCollection_BaseSequence

Return type:None
Parameters:Other (SelectMgr_SequenceOfFilter &) –
Return type:None
Append()
Parameters:
  • T (Handle_SelectMgr_Filter &) –
  • S (SelectMgr_SequenceOfFilter &) –
Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectMgr_SequenceOfFilter &) –
Return type:SelectMgr_SequenceOfFilter
ChangeValue()
Parameters:Index (int) –
Return type:Handle_SelectMgr_Filter
Clear()
Return type:None
First()
Return type:Handle_SelectMgr_Filter
InsertAfter()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_Filter &) –
  • Index
  • S (SelectMgr_SequenceOfFilter &) –
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_Filter &) –
  • Index
  • S (SelectMgr_SequenceOfFilter &) –
Return type:

None

Return type:

None

Last()
Return type:Handle_SelectMgr_Filter
Prepend()
Parameters:
  • T (Handle_SelectMgr_Filter &) –
  • S (SelectMgr_SequenceOfFilter &) –
Return type:

None

Return type:

None

Remove()
Parameters:
  • Index (int) –
  • FromIndex (int) –
  • ToIndex (int) –
Return type:

None

Return type:

None

Set()
Parameters:Other (SelectMgr_SequenceOfFilter &) –
Return type:SelectMgr_SequenceOfFilter
SetValue()
Parameters:
  • Index (int) –
  • I (Handle_SelectMgr_Filter &) –
Return type:

None

Split()
Parameters:
  • Index (int) –
  • Sub (SelectMgr_SequenceOfFilter &) –
Return type:

None

Value()
Parameters:Index (int) –
Return type:Handle_SelectMgr_Filter
thisown

The membership flag

class SelectMgr_SequenceOfOwner(*args)

Bases: OCC.TCollection.TCollection_BaseSequence

Return type:None
Parameters:Other (SelectMgr_SequenceOfOwner &) –
Return type:None
Append()
Parameters:
  • T (Handle_SelectMgr_EntityOwner &) –
  • S (SelectMgr_SequenceOfOwner &) –
Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectMgr_SequenceOfOwner &) –
Return type:SelectMgr_SequenceOfOwner
ChangeValue()
Parameters:Index (int) –
Return type:Handle_SelectMgr_EntityOwner
Clear()
Return type:None
First()
Return type:Handle_SelectMgr_EntityOwner
InsertAfter()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_EntityOwner &) –
  • Index
  • S (SelectMgr_SequenceOfOwner &) –
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_EntityOwner &) –
  • Index
  • S (SelectMgr_SequenceOfOwner &) –
Return type:

None

Return type:

None

Last()
Return type:Handle_SelectMgr_EntityOwner
Prepend()
Parameters:
  • T (Handle_SelectMgr_EntityOwner &) –
  • S (SelectMgr_SequenceOfOwner &) –
Return type:

None

Return type:

None

Remove()
Parameters:
  • Index (int) –
  • FromIndex (int) –
  • ToIndex (int) –
Return type:

None

Return type:

None

Set()
Parameters:Other (SelectMgr_SequenceOfOwner &) –
Return type:SelectMgr_SequenceOfOwner
SetValue()
Parameters:
  • Index (int) –
  • I (Handle_SelectMgr_EntityOwner &) –
Return type:

None

Split()
Parameters:
  • Index (int) –
  • Sub (SelectMgr_SequenceOfOwner &) –
Return type:

None

Value()
Parameters:Index (int) –
Return type:Handle_SelectMgr_EntityOwner
thisown

The membership flag

class SelectMgr_SequenceOfSelector(*args)

Bases: OCC.TCollection.TCollection_BaseSequence

Return type:None
Parameters:Other (SelectMgr_SequenceOfSelector &) –
Return type:None
Append()
Parameters:
  • T (Handle_SelectMgr_ViewerSelector &) –
  • S (SelectMgr_SequenceOfSelector &) –
Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectMgr_SequenceOfSelector &) –
Return type:SelectMgr_SequenceOfSelector
ChangeValue()
Parameters:Index (int) –
Return type:Handle_SelectMgr_ViewerSelector
Clear()
Return type:None
First()
Return type:Handle_SelectMgr_ViewerSelector
InsertAfter()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_ViewerSelector &) –
  • Index
  • S (SelectMgr_SequenceOfSelector &) –
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • Index (int) –
  • T (Handle_SelectMgr_ViewerSelector &) –
  • Index
  • S (SelectMgr_SequenceOfSelector &) –
Return type:

None

Return type:

None

Last()
Return type:Handle_SelectMgr_ViewerSelector
Prepend()
Parameters:
  • T (Handle_SelectMgr_ViewerSelector &) –
  • S (SelectMgr_SequenceOfSelector &) –
Return type:

None

Return type:

None

Remove()
Parameters:
  • Index (int) –
  • FromIndex (int) –
  • ToIndex (int) –
Return type:

None

Return type:

None

Set()
Parameters:Other (SelectMgr_SequenceOfSelector &) –
Return type:SelectMgr_SequenceOfSelector
SetValue()
Parameters:
  • Index (int) –
  • I (Handle_SelectMgr_ViewerSelector &) –
Return type:

None

Split()
Parameters:
  • Index (int) –
  • Sub (SelectMgr_SequenceOfSelector &) –
Return type:

None

Value()
Parameters:Index (int) –
Return type:Handle_SelectMgr_ViewerSelector
thisown

The membership flag

class SelectMgr_SortCriterion(*args)

Bases: object

Return type:None
  • Defines parameters of selection criterion: - Priority: selection priority - Depth: distance from the view plane to the entity - MinDist: distance from the clicked point to the entity on the view plane - Tol: tolerance used for selecting candidates - PreferClosest: specify whether closest object is preferred even if if has less priority
Parameters:
  • thePriority (int) –
  • theDepth (float) –
  • theMinDist (float) –
  • theTol (float) –
  • PreferClosest (bool) –
Return type:

None

Depth()
Return type:float
IsGreater()
Parameters:anOtherCriterion (SelectMgr_SortCriterion &) –
Return type:bool
IsLower()
Parameters:anOtherCriterion (SelectMgr_SortCriterion &) –
Return type:bool
MinDist()
Return type:float
Priority()
Return type:int
SetDepth()
Parameters:D (float) –
Return type:None
SetMinDist()
Parameters:D (float) –
Return type:None
SetPriority()
Parameters:P (int) –
Return type:None
SetTol()
Parameters:T (float) –
Return type:None
Tol()
Return type:float
thisown

The membership flag

class SelectMgr_ViewerSelector(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

ActiveOwners()
  • Returns the list of active entity owners
Parameters:theOwners (NCollection_List<Handle_SelectBasics_EntityOwner> &) –
Return type:None
AddSelectableObject()
  • Adds new object to the map of selectable objects
Parameters:theObject (Handle_SelectMgr_SelectableObject &) –
Return type:None
AddSelectionToObject()
  • Adds new selection to the object and builds its BVH tree
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theSelection (Handle_SelectMgr_Selection &) –
Return type:

None

Clear()
  • Empties all the tables, removes all selections…
Return type:None
Contains()
Parameters:theObject (Handle_SelectMgr_SelectableObject &) –
Return type:bool
DetectedEntity()
  • Returns sensitive entity that was detected during the previous run of selection algorithm
Return type:Handle_SelectBasics_SensitiveEntity
GetHandle()
GetManager()
  • Returns instance of selecting volume manager of the viewer selector
Return type:SelectMgr_SelectingVolumeManager
Init()
  • Begins an iteration scanning for the owners detected at a position in the view.
Return type:None
InitDetected()
  • Initializes internal iterator for stored detected sensitive entities
Return type:None
IsActive()
  • Returns true if the selectable object aSelectableObject having the selection mode aMode is active in this selector.
Parameters:
  • theSelectableObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) –
Return type:

bool

IsInside()
  • Returns true if the selectable object aSelectableObject having the selection mode aMode is in this selector.
Parameters:
  • theSelectableObject (Handle_SelectMgr_SelectableObject &) –
  • theMode (int) –
Return type:

bool

Modes()
  • Returns the list of selection modes ModeList found in this selector for the selectable object aSelectableObject. Returns true if aSelectableObject is referenced inside this selector; returns false if the object is not present in this selector.
Parameters:
  • theSelectableObject (Handle_SelectMgr_SelectableObject &) –
  • theModeList (TColStd_ListOfInteger &) –
  • theWantedState (SelectMgr_StateOfSelection) – default value is SelectMgr_SOS_Any
Return type:

bool

More()
  • Continues the interation scanning for the owners detected at a position in the view, or - continues the iteration scanning for the owner closest to the position in the view.
Return type:bool
MoreDetected()
  • Returns true if iterator of map of detected sensitive entities has reached its end
Return type:bool
NbPicked()
  • Returns the number of owners found at a position in the view by the Init - More - Next - Picked iteration.
Return type:int
Next()
  • Returns the next owner found in the iteration. This is a scan for the owners detected at a position in the view.
Return type:None
NextDetected()
  • Makes a step along the map of detected sensitive entities and their owners
Return type:None
OnePicked()
  • Returns the picked element with the highest priority, and which is the closest to the last successful mouse position.
Return type:Handle_SelectMgr_EntityOwner
Picked()
  • Returns the current selected entity detected by the selector;
Return type:Handle_SelectMgr_EntityOwner
  • Returns the entity which is at rank <aRank> in the list of stored ones.
Parameters:aRank (int) –
Return type:Handle_SelectMgr_EntityOwner
RebuildObjectsTree()
  • Marks BVH of selectable objects for rebuild. Parameter theIsForce set as true guarantees that 1st level BVH for the viewer selector will be rebuilt during this call
Parameters:theIsForce (bool) – default value is Standard_False
Return type:None
RebuildSensitivesTree()
  • Marks BVH of sensitive entities of particular selectable object for rebuild. Parameter theIsForce set as true guarantees that 2nd level BVH for the object given will be rebuilt during this call
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theIsForce (bool) – default value is Standard_False
Return type:

None

RemoveSelectableObject()
  • Removes selectable object from map of selectable ones
Parameters:theObject (Handle_SelectMgr_SelectableObject &) –
Return type:None
RemoveSelectionOfObject()
  • Removes selection of the object and marks its BVH tree for rebuild
Parameters:
  • theObject (Handle_SelectMgr_SelectableObject &) –
  • theSelection (Handle_SelectMgr_Selection &) –
Return type:

None

Sensitivity()
  • returns the Sensitivity of picking
Return type:int
SetPickClosest()
  • Set preference of selecting one object for OnePicked() method: - If True, objects with less depth (distance fron the view plane) are preferred regardless of priority (priority is used then to choose among objects with similar depth), - If False, objects with higher priority are preferred regardless of the depth which is used to choose among objects of the same priority.
Parameters:preferClosest (bool) –
Return type:None
SortResult()
  • Sorts the detected entites by priority and distance. to be redefined if other criterion are used…
Return type:None
Status()
  • Returns the selection status Status of the selection aSelection.
Parameters:
  • theSelection (Handle_SelectMgr_Selection &) –
  • theSelectableObject (Handle_SelectMgr_SelectableObject &) –
Return type:

SelectMgr_StateOfSelection

Return type:

TCollection_AsciiString

thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases