OCC.SelectBasics module

class OCC.SelectBasics.Handle_SelectBasics_EntityOwner(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.SelectBasics.Handle_SelectBasics_ListNodeOfListOfBox2d(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.SelectBasics.Handle_SelectBasics_ListNodeOfListOfSensitive(*args)

Bases: OCC.TCollection.Handle_TCollection_MapNode

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

The membership flag

class OCC.SelectBasics.Handle_SelectBasics_SensitiveEntity(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

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

The membership flag

class OCC.SelectBasics.Handle_SelectBasics_SequenceNodeOfSequenceOfOwner(*args)

Bases: OCC.TCollection.Handle_TCollection_SeqNode

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

The membership flag

class OCC.SelectBasics.SelectBasics_BasicTool(*args, **kwargs)

Bases: object

static AutoInter(*args)
Parameters:aPolyg2d (TColgp_Array1OfPnt2d) –
Return type:bool
static MatchPolyg2d(*args)
  • package method used to find if a point is close enough to a polygon of 2D points to be Used by Primitives like curves or faces... Rank gives the index of the touched segment
Parameters:
  • tabpoint (TColgp_Array1OfPnt2d) –
  • X (float) –
  • Y (float) –
  • aTol (float) –
  • DMin (float &) –
  • Rank (Standard_Integer &) –
Return type:

bool

static MatchSegment(*args)
  • return True if Segment(pBegin, pEnd) is Selected
Parameters:
  • pBegin (gp_Pnt2d) –
  • pEnd (gp_Pnt2d) –
  • X (float) –
  • Y (float) –
  • aTol (float) –
  • DMin (float &) –
Return type:

bool

static MatchSegments(*args)
  • returns True if The Segment {P1P2} is intersected by the segment {P3P4}
Parameters:
  • P1 (gp_Pnt2d) –
  • P2 (gp_Pnt2d) –
  • P3 (gp_Pnt2d) –
  • P4 (gp_Pnt2d) –
Return type:

bool

thisown

The membership flag

OCC.SelectBasics.SelectBasics_BasicTool_AutoInter(*args)
Parameters:aPolyg2d (TColgp_Array1OfPnt2d) –
Return type:bool
OCC.SelectBasics.SelectBasics_BasicTool_MatchPolyg2d(*args)
  • package method used to find if a point is close enough to a polygon of 2D points to be Used by Primitives like curves or faces... Rank gives the index of the touched segment
Parameters:
  • tabpoint (TColgp_Array1OfPnt2d) –
  • X (float) –
  • Y (float) –
  • aTol (float) –
  • DMin (float &) –
  • Rank (Standard_Integer &) –
Return type:

bool

OCC.SelectBasics.SelectBasics_BasicTool_MatchSegment(*args)
  • return True if Segment(pBegin, pEnd) is Selected
Parameters:
  • pBegin (gp_Pnt2d) –
  • pEnd (gp_Pnt2d) –
  • X (float) –
  • Y (float) –
  • aTol (float) –
  • DMin (float &) –
Return type:

bool

OCC.SelectBasics.SelectBasics_BasicTool_MatchSegments(*args)
  • returns True if The Segment {P1P2} is intersected by the segment {P3P4}
Parameters:
  • P1 (gp_Pnt2d) –
  • P2 (gp_Pnt2d) –
  • P3 (gp_Pnt2d) –
  • P4 (gp_Pnt2d) –
Return type:

bool

class OCC.SelectBasics.SelectBasics_EntityOwner(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

GetHandle()

SelectBasics_EntityOwner_GetHandle(SelectBasics_EntityOwner self) -> Handle_SelectBasics_EntityOwner

HasLocation()
Return type:bool
Location()
Return type:TopLoc_Location
Priority()
Return type:int
ResetLocation()
Return type:void
Set()
  • sets the selectable priority of the owner
Parameters:aPriority (Standard_Integer) –
Return type:None
SetLocation()
Parameters:aLoc (TopLoc_Location &) –
Return type:void
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_ListIteratorOfListOfBox2d(*args)

Bases: object

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

The membership flag

class OCC.SelectBasics.SelectBasics_ListIteratorOfListOfSensitive(*args)

Bases: object

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

The membership flag

class OCC.SelectBasics.SelectBasics_ListNodeOfListOfBox2d(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

SelectBasics_ListNodeOfListOfBox2d_GetHandle(SelectBasics_ListNodeOfListOfBox2d self) -> Handle_SelectBasics_ListNodeOfListOfBox2d

Value()
Return type:Bnd_Box2d
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_ListNodeOfListOfSensitive(*args)

Bases: OCC.TCollection.TCollection_MapNode

GetHandle()

SelectBasics_ListNodeOfListOfSensitive_GetHandle(SelectBasics_ListNodeOfListOfSensitive self) -> Handle_SelectBasics_ListNodeOfListOfSensitive

Value()
Return type:Handle_SelectBasics_SensitiveEntity
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_ListOfBox2d

Bases: object

Append()
Parameters:
  • I (Bnd_Box2d &) –
  • I
  • theIt (SelectBasics_ListIteratorOfListOfBox2d &) –
  • Other (SelectBasics_ListOfBox2d &) –
Return type:

None

Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectBasics_ListOfBox2d &) –
Return type:None
Clear()
Return type:None
Extent()
Return type:int
First()
Return type:Bnd_Box2d
InsertAfter()
Parameters:
  • I (Bnd_Box2d &) –
  • It (SelectBasics_ListIteratorOfListOfBox2d &) –
  • Other (SelectBasics_ListOfBox2d &) –
  • It
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • I (Bnd_Box2d &) –
  • It (SelectBasics_ListIteratorOfListOfBox2d &) –
  • Other (SelectBasics_ListOfBox2d &) –
  • It
Return type:

None

Return type:

None

IsEmpty()
Return type:bool
Last()
Return type:Bnd_Box2d
Prepend()
Parameters:
  • I (Bnd_Box2d &) –
  • I
  • theIt (SelectBasics_ListIteratorOfListOfBox2d &) –
  • Other (SelectBasics_ListOfBox2d &) –
Return type:

None

Return type:

None

Return type:

None

Remove()
Parameters:It (SelectBasics_ListIteratorOfListOfBox2d &) –
Return type:None
RemoveFirst()
Return type:None
Set()
Parameters:Other (SelectBasics_ListOfBox2d &) –
Return type:None
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_ListOfSensitive

Bases: object

Append()
Parameters:
  • I (Handle_SelectBasics_SensitiveEntity &) –
  • I
  • theIt (SelectBasics_ListIteratorOfListOfSensitive &) –
  • Other (SelectBasics_ListOfSensitive &) –
Return type:

None

Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectBasics_ListOfSensitive &) –
Return type:None
Clear()
Return type:None
Extent()
Return type:int
First()
Return type:Handle_SelectBasics_SensitiveEntity
InsertAfter()
Parameters:
  • I (Handle_SelectBasics_SensitiveEntity &) –
  • It (SelectBasics_ListIteratorOfListOfSensitive &) –
  • Other (SelectBasics_ListOfSensitive &) –
  • It
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • I (Handle_SelectBasics_SensitiveEntity &) –
  • It (SelectBasics_ListIteratorOfListOfSensitive &) –
  • Other (SelectBasics_ListOfSensitive &) –
  • It
Return type:

None

Return type:

None

IsEmpty()
Return type:bool
Last()
Return type:Handle_SelectBasics_SensitiveEntity
Prepend()
Parameters:
  • I (Handle_SelectBasics_SensitiveEntity &) –
  • I
  • theIt (SelectBasics_ListIteratorOfListOfSensitive &) –
  • Other (SelectBasics_ListOfSensitive &) –
Return type:

None

Return type:

None

Return type:

None

Remove()
Parameters:It (SelectBasics_ListIteratorOfListOfSensitive &) –
Return type:None
RemoveFirst()
Return type:None
Set()
Parameters:Other (SelectBasics_ListOfSensitive &) –
Return type:None
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_PickArgs(*args)

Bases: object

DepthMax()
Return type:inline float
DepthMin()
Return type:inline float
IsClipped()
  • returns True if passed depth lies outside valid depth range.
Parameters:theDepth (float) –
Return type:inline bool
PickLine()
Return type:inline gp_Lin
Tolerance()
Return type:inline float
X()
Return type:inline float
Y()
Return type:inline float
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_SensitiveEntity(*args, **kwargs)

Bases: OCC.MMgt.MMgt_TShared

Areas()
  • to be implemented specifically by each type of sensitive primitive .
Parameters:aresult (SelectBasics_ListOfBox2d &) –
Return type:void
GetHandle()

SelectBasics_SensitiveEntity_GetHandle(SelectBasics_SensitiveEntity self) -> Handle_SelectBasics_SensitiveEntity

Is3D()
  • returns True if able to give 3D information (Depth,...). See Select3D
Return type:bool
Matches()
  • Checks whether the sensitive entity matches the picking detection area (close to the picking line). This method takes into account depth limits produced by abstract view: far/near planes, clippings. Please port existing implementations of your picking detection, which were done at Matches (X, Y, Tol, DMin) method to this one, introducing the depth checks. Please note that the previous method is suppressed and the virtual implementations are not used by OCC selection framework. The porting procedure for simple sensitives (or if you are not interested in implementing full scale depth checks) can be simplified to writing the following code snippet: @code { // example code for porting descendants of Select3D_SensitiveEntity // invoke implementation of obsolete matches method (if implemented)... if (!Matches (thePickArgs.X(), thePickArgs.Y(), thePickArgs.Tolerance(), theMatchDMin)) return Standard_False; // invoke your implementation of computing depth (if implemented)... Standard_Real aDetectDepth = ComputeDepth (thePickArgs.PickLine()); return !thePickArgs.IsClipped(aDetectDepth); } @endcode @param thePickArgs [in] the picking arguments. @param theMatchDMin [out] the minimum distance on xy plane from point of picking to center of gravity of the detected sub-part of sensitive entity or the whole sensitive (e.g. used for resolving selection of coinciding circles, selection will be set to the one whose center is closest to the picking point). @param theMatchDepth [out] the minimum detected depth: depth of the closest detected sub-part of sensitive entity (or the whole sensitive). returns True if the sensitive matches the detection area. This method is an entry point for picking detection framework. The method is triggered when it is required to compose list of detected sensitive entities. The sensitives are filtered out from detection result if returned value is False. The passed entities are then can be sorted by ‘theDetectDist’, ‘theDetectDepth’ parameters.
Parameters:
  • thePickArgs (SelectBasics_PickArgs &) –
  • theMatchDMin (float &) –
  • theMatchDepth (float &) –
Return type:

bool

  • returns True if the box (Xmin,YMin)——(Xmax,Ymax) contains the SensitiveEntity. Necessary for selection using elastic boxes,or segments.
Parameters:
  • XMin (float) –
  • YMin (float) –
  • XMax (float) –
  • YMax (float) –
  • aTol (float) –
Return type:

bool

  • returns True if the polyline xi,yi contains the SensitiveEntity. Necessary for selection using polyline selection
Parameters:
  • Polyline (TColgp_Array1OfPnt2d) –
  • aBox (Bnd_Box2d &) –
  • aTol (float) –
Return type:

bool

MaxBoxes()
  • returns the max number of boxes the entity is able to give at a time
Return type:int
NeedsConversion()
Return type:bool
OwnerId()
Return type:Handle_SelectBasics_EntityOwner
SensitivityFactor()
  • allows a better sensitivity for a specific entity in selection algorithms useful for small sized entities.
Return type:Standard_ShortReal
Set()
Parameters:TheOwnerId (Handle_SelectBasics_EntityOwner &) –
Return type:void
SetSensitivityFactor()
Parameters:aFactor (Standard_ShortReal) –
Return type:None
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_SequenceNodeOfSequenceOfOwner(*args)

Bases: OCC.TCollection.TCollection_SeqNode

GetHandle()

SelectBasics_SequenceNodeOfSequenceOfOwner_GetHandle(SelectBasics_SequenceNodeOfSequenceOfOwner self) -> Handle_SelectBasics_SequenceNodeOfSequenceOfOwner

Value()
Return type:Handle_SelectBasics_EntityOwner
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_SequenceOfOwner

Bases: OCC.TCollection.TCollection_BaseSequence

Append()
Parameters:
  • T (Handle_SelectBasics_EntityOwner &) –
  • S (SelectBasics_SequenceOfOwner &) –
Return type:

None

Return type:

None

Assign()
Parameters:Other (SelectBasics_SequenceOfOwner &) –
Return type:SelectBasics_SequenceOfOwner
ChangeValue()
Parameters:Index (Standard_Integer) –
Return type:Handle_SelectBasics_EntityOwner
Clear()
Return type:None
First()
Return type:Handle_SelectBasics_EntityOwner
InsertAfter()
Parameters:
  • Index (Standard_Integer) –
  • T (Handle_SelectBasics_EntityOwner &) –
  • Index
  • S (SelectBasics_SequenceOfOwner &) –
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • Index (Standard_Integer) –
  • T (Handle_SelectBasics_EntityOwner &) –
  • Index
  • S (SelectBasics_SequenceOfOwner &) –
Return type:

None

Return type:

None

Last()
Return type:Handle_SelectBasics_EntityOwner
Prepend()
Parameters:
  • T (Handle_SelectBasics_EntityOwner &) –
  • S (SelectBasics_SequenceOfOwner &) –
Return type:

None

Return type:

None

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

None

Return type:

None

Set()
Parameters:Other (SelectBasics_SequenceOfOwner &) –
Return type:SelectBasics_SequenceOfOwner
SetValue()
Parameters:
  • Index (Standard_Integer) –
  • I (Handle_SelectBasics_EntityOwner &) –
Return type:

None

Split()
Parameters:
  • Index (Standard_Integer) –
  • Sub (SelectBasics_SequenceOfOwner &) –
Return type:

None

Value()
Parameters:Index (Standard_Integer) –
Return type:Handle_SelectBasics_EntityOwner
thisown

The membership flag

class OCC.SelectBasics.SelectBasics_SortAlgo(*args)

Bases: object

InitSelect()
  • Searchs the items on this position.
Parameters:
  • x (float) –
  • y (float) –
Return type:

None

  • Searchs the items in this rectangle.
Parameters:rect (Bnd_Box2d &) –
Return type:None
Initialize()
  • Clears and initializes the selector.
Parameters:
  • ClippingRectangle (Bnd_Box2d &) –
  • sizeOfSensitiveArea (float) –
  • theRectangles (Handle_Bnd_HArray1OfBox2d &) –
Return type:

None

More()
  • Returns true if there is something selected.
Return type:bool
Next()
  • Sets value on the next selected item.
Return type:None
Value()
  • Returns the index of the selected rectangle.
Return type:int
thisown

The membership flag

class OCC.SelectBasics.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.SelectBasics.selectbasics(*args, **kwargs)

Bases: object

static MaxOwnerPriority()
  • Structure to provide all-in-one information on picking arguments for ‘Matches’ method of SelectBasics_SensitiveEntity.
Return type:int
static MinOwnerPriority()
Return type:int
thisown

The membership flag

OCC.SelectBasics.selectbasics_MaxOwnerPriority()
  • Structure to provide all-in-one information on picking arguments for ‘Matches’ method of SelectBasics_SensitiveEntity.
Return type:int
OCC.SelectBasics.selectbasics_MinOwnerPriority()
Return type:int