OCC.Select3D module

The Select3D package provides the following services- definition of standard 3D sensitive primitives such as points, curves and faces.- recovery of the bounding boxes in the 2D graphic selection space, if required.- a 3D-2D projector.

class Handle_Select3D_InteriorSensitivePointSet(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitiveSet

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

The membership flag

class Handle_Select3D_SensitiveBox(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitiveCircle(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitivePoly

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

The membership flag

class Handle_Select3D_SensitiveCurve(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitivePoly

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

The membership flag

class Handle_Select3D_SensitiveFace(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitiveGroup(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitiveSet

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

The membership flag

class Handle_Select3D_SensitivePoint(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitivePoly(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitiveSet

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

The membership flag

class Handle_Select3D_SensitiveSegment(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitiveSet(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitiveTriangle(*args)

Bases: object

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

The membership flag

class Handle_Select3D_SensitiveWire(*args)

Bases: OCC.Select3D.Handle_Select3D_SensitiveSet

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

The membership flag

class Select3D_InteriorSensitivePointSet(*args)

Bases: OCC.Select3D.Select3D_SensitiveSet

  • Splits the given point set thePoints onto planar convex polygons
Parameters:
Return type:

None

Box()
  • Returns bounding box of planar convex polygon with index theIdx
Parameters:theIdx (int) –
Return type:Select3D_BndBox3d
Center()
  • Returns geometry center of planar convex polygon with index theIdx in the vector along the given axis theAxis
Parameters:
  • theIdx (int) –
  • theAxis (int) –
Return type:

float

GetHandle()
GetPoints()
  • Initializes the given array theHArrayOfPnt by 3d coordinates of vertices of the whole point set
Parameters:theHArrayOfPnt (Handle_TColgp_HArray1OfPnt) –
Return type:void
NbSubElements()
  • Returns the amount of points in set
Return type:int
Size()
  • Returns the length of vector of planar convex polygons
Return type:int
Swap()
  • Swaps items with indexes theIdx1 and theIdx2 in the vector
Parameters:
  • theIdx1 (int) –
  • theIdx2 (int) –
Return type:

void

thisown

The membership flag

class Select3D_Pnt(*args, **kwargs)

Bases: object

Set()
Parameters:thePnt (gp_Pnt) –
Return type:inline gp_Pnt
thisown

The membership flag

x
y
z
class Select3D_PointData(*args)

Bases: object

Parameters:theNbPoints (int) –
Return type:None
Pnt()
Parameters:theIndex (int) –
Return type:Select3D_Pnt
Pnt3d()
Parameters:theIndex (int) –
Return type:gp_Pnt
SetPnt()
Parameters:
  • theIndex (int) –
  • theValue (gp_Pnt) –
  • theIndex
  • theValue
Return type:

None

Return type:

None

Size()
Return type:int
thisown

The membership flag

class Select3D_SensitiveBox(*args)

Bases: object

  • Constructs a sensitive box object defined by the owner theOwnerId, and the box theBox.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theBox (Bnd_Box &) –
Return type:

None

  • Constructs a sensitive box object defined by the owner theOwnerId, and the coordinates theXmin, theYMin, theZMin, theXMax, theYMax, theZMax. theXmin, theYMin and theZMin define the minimum point in the front lower left hand corner of the box, and theXMax, theYMax and theZMax define the maximum point in the back upper right hand corner of the box.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theXMin (float) –
  • theYMin (float) –
  • theZMin (float) –
  • theXMax (float) –
  • theYMax (float) –
  • theZMax (float) –
Return type:

None

BoundingBox()
  • Returns coordinates of the box. If location transformation is set, it will be applied
Return type:Select3D_BndBox3d
CenterOfGeometry()
  • Returns center of the box. If location transformation is set, it will be applied
Return type:gp_Pnt
GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
Matches()
  • Checks whether the box overlaps current selecting volume
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

NbSubElements()
  • Returns the amount of sub-entities in sensitive
Return type:int
thisown

The membership flag

class Select3D_SensitiveCircle(*args)

Bases: OCC.Select3D.Select3D_SensitivePoly

  • Constructs the sensitive circle object defined by the owner theOwnerId, the circle theCircle, the boolean theIsFilled and the number of points theNbPnts.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theCircle (Handle_Geom_Circle &) –
  • theIsFilled (bool) – default value is Standard_False
  • theNbPnts (int) – default value is 12
Return type:

None

  • Constructs the sensitive arc object defined by the owner theOwnerId, the circle theCircle, the parameters theU1 and theU2, the boolean theIsFilled and the number of points theNbPnts. theU1 and theU2 define the first and last points of the arc on theCircle.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theCircle (Handle_Geom_Circle &) –
  • theU1 (float) –
  • theU2 (float) –
  • theIsFilled (bool) – default value is Standard_False
  • theNbPnts (int) – default value is 12
Return type:

None

  • Constructs the sensitive circle object defined by the owner theOwnerId, the array of triangles thePnts3d, and the boolean theIsFilled. thePnts3d is an array of consecutive triangles on the circle. The triangle i+1 lies on the intersection of the tangents to the circle of i and i+2. Note, that the first point of thePnts3d must be equal to the last point of thePnts3d.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePnts3d (Handle_TColgp_HArray1OfPnt) –
  • theIsFilled (bool) – default value is Standard_False
Return type:

None

  • Constructs the sensitive circle object defined by the owner theOwnerId, the array of points thePnts3d, and the boolean theIsFilled. If the length of thePnts3d is more then 1, the first point of thePnts3d must be equal to the last point of thePnts3d.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePnts3d (TColgp_Array1OfPnt) –
  • theIsFilled (bool) – default value is Standard_False
Return type:

None

ArrayBounds()
Parameters:
  • theLow (int &) –
  • theUp (int &) –
Return type:

None

BVH()
  • Builds BVH tree for a circle’s edge segments if needed
Return type:void
GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
GetPoint3d()
Parameters:thePntIdx (int) –
Return type:gp_Pnt
thisown

The membership flag

class Select3D_SensitiveCurve(*args)

Bases: OCC.Select3D.Select3D_SensitivePoly

  • Constructs a sensitive curve object defined by the owner theOwnerId, the curve theCurve, and the maximum number of points on the curve: theNbPnts.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theCurve (Handle_Geom_Curve &) –
  • theNbPnts (int) – default value is 17
Return type:

None

  • Constructs a sensitive curve object defined by the owner theOwnerId and the set of points ThePoints.
Parameters:
Return type:

None

  • Creation of Sensitive Curve from Points. Warning : This Method should disappear in the next version…
Parameters:
Return type:

None

GetConnected()
  • Returns the copy of this
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
thisown

The membership flag

class Select3D_SensitiveFace(*args)

Bases: object

  • Constructs a sensitive face object defined by the owner theOwnerId, the array of points thePoints, and the sensitivity type theType. The array of points is the outer polygon of the geometric face.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePoints (TColgp_Array1OfPnt) –
  • theType (Select3D_TypeOfSensitivity) –
Return type:

None

  • Constructs a sensitive face object defined by the owner theOwnerId, the array of points thePoints, and the sensitivity type theType. The array of points is the outer polygon of the geometric face.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePoints (Handle_TColgp_HArray1OfPnt) –
  • theType (Select3D_TypeOfSensitivity) –
Return type:

None

BVH()
  • Builds BVH tree for the face
Return type:void
BoundingBox()
  • Returns bounding box of the face. If location transformation is set, it will be applied
Return type:Select3D_BndBox3d
CenterOfGeometry()
  • Returns center of the face. If location transformation is set, it will be applied
Return type:gp_Pnt
GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
GetPoints()
  • Initializes the given array theHArrayOfPnt by 3d coordinates of vertices of the face
Parameters:theHArrayOfPnt (Handle_TColgp_HArray1OfPnt) –
Return type:None
Matches()
  • Checks whether the face overlaps current selecting volume
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

NbSubElements()
  • Returns the amount of sub-entities (points or planar convex polygons)
Return type:int
thisown

The membership flag

class Select3D_SensitiveGroup(*args)

Bases: OCC.Select3D.Select3D_SensitiveSet

  • Constructs an empty sensitive group object. This is a set of sensitive 3D entities. The sensitive entities will be defined using the function Add to fill the entity owner OwnerId. If MatchAll is false, nothing can be added.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theIsMustMatchAll (bool) – default value is Standard_True
Return type:

None

  • Constructs a sensitive group object defined by the list TheList and the entity owner OwnerId. If MatchAll is false, nothing is done.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theEntities (Select3D_EntitySequence &) –
  • theIsMustMatchAll (bool) – default value is Standard_True
Return type:

None

Add()
  • Adds the list of sensitive entities LL to the empty sensitive group object created at construction time.
Parameters:theEntities (Select3D_EntitySequence &) –
Return type:None
  • Adds the sensitive entity aSensitive to the non-empty sensitive group object created at construction time.
Parameters:theSensitive (Handle_Select3D_SensitiveEntity &) –
Return type:None
Box()
  • Returns bounding box of sensitive entity with index theIdx
Parameters:theIdx (int) –
Return type:Select3D_BndBox3d
Center()
  • Returns geometry center of sensitive entity index theIdx in the vector along the given axis theAxis
Parameters:
  • theIdx (int) –
  • theAxis (int) –
Return type:

float

GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetEntities()
  • Gets group content
Return type:Select3D_EntitySequence
GetHandle()
IsIn()
  • Returns true if the sensitive entity aSensitive is in the list used at the time of construction, or added using the function Add.
Parameters:theSensitive (Handle_Select3D_SensitiveEntity &) –
Return type:bool
MustMatchAll()
  • Returns true if all sensitive entities in the list used at the time of construction, or added using the function Add must be matched.
Return type:bool
NbSubElements()
  • Returns the amount of sub-entities
Return type:int
Remove()
Parameters:theSensitive (Handle_Select3D_SensitiveEntity &) –
Return type:None
Set()
  • Sets the owner for all entities in group
Parameters:theOwnerId (Handle_SelectBasics_EntityOwner &) –
Return type:None
SetMatchType()
  • Sets the requirement that all sensitive entities in the list used at the time of construction, or added using the function Add must be matched.
Parameters:theIsMustMatchAll (bool) –
Return type:None
Size()
  • Returns the length of vector of sensitive entities
Return type:int
Swap()
  • Swaps items with indexes theIdx1 and theIdx2 in the vector
Parameters:
  • theIdx1 (int) –
  • theIdx2 (int) –
Return type:

void

thisown

The membership flag

class Select3D_SensitivePoint(*args)

Bases: object

  • Constructs a sensitive point object defined by the owner OwnerId and the point Point.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePoint (gp_Pnt) –
Return type:

None

BoundingBox()
  • Returns bounding box of the point. If location transformation is set, it will be applied
Return type:Select3D_BndBox3d
CenterOfGeometry()
  • Returns center of point. If location transformation is set, it will be applied
Return type:gp_Pnt
GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
Matches()
  • Checks whether the point overlaps current selecting volume
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

NbSubElements()
  • Returns the amount of sub-entities in sensitive
Return type:int
Point()
  • Returns the point used at the time of construction.
Return type:gp_Pnt
thisown

The membership flag

class Select3D_SensitivePoly(*args)

Bases: OCC.Select3D.Select3D_SensitiveSet

  • Constructs a sensitive face object defined by the owner OwnerId, the array of points ThePoints, and the sensitivity type Sensitivity. The array of points is the outer polygon of the geometric face.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePoints (TColgp_Array1OfPnt) –
  • theIsBVHEnabled (bool) –
Return type:

None

  • Constructs a sensitive face object defined by the owner OwnerId, the array of points ThePoints, and the sensitivity type Sensitivity. The array of points is the outer polygon of the geometric face.
Parameters:
Return type:

None

  • Constructs the sensitive circle object defined by the owner OwnerId, the circle Circle, the Boolean FilledCircle and the number of points NbOfPoints.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theIsBVHEnabled (bool) –
  • theNbPnts (int) – default value is 6
Return type:

None

Box()
  • Returns bounding box of segment with index theIdx
Parameters:theIdx (int) –
Return type:Select3D_BndBox3d
Center()
  • Returns geometry center of sensitive entity index theIdx in the vector along the given axis theAxis
Parameters:
  • theIdx (int) –
  • theAxis (int) –
Return type:

float

GetHandle()
NbSubElements()
  • Returns the amount of segments in poly
Return type:int
Points3D()
  • Returns the 3D points of the array used at construction time.
Parameters:theHArrayOfPnt (Handle_TColgp_HArray1OfPnt) –
Return type:None
Size()
  • Returns the amount of segments of the poly
Return type:int
Swap()
  • Swaps items with indexes theIdx1 and theIdx2 in the vector
Parameters:
  • theIdx1 (int) –
  • theIdx2 (int) –
Return type:

void

thisown

The membership flag

class Select3D_SensitiveSegment(*args)

Bases: object

  • Constructs the sensitive segment object defined by the owner theOwnerId, the points theFirstPnt, theLastPnt
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • theFirstPnt (gp_Pnt) –
  • theLastPnt (gp_Pnt) –
Return type:

None

BoundingBox()
  • Returns bounding box of the segment. If location transformation is set, it will be applied
Return type:Select3D_BndBox3d
CenterOfGeometry()
  • Returns center of the segment. If location transformation is set, it will be applied
Return type:gp_Pnt
EndPoint()
  • changes the end point of the segment
Parameters:thePnt (gp_Pnt) –
Return type:None
  • gives the 3D End Point of the Segment
Return type:gp_Pnt
GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
Matches()
  • Checks whether the segment overlaps current selecting volume
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

NbSubElements()
  • Returns the amount of points
Return type:int
StartPoint()
  • changes the start Point of the Segment;
Parameters:thePnt (gp_Pnt) –
Return type:None
  • gives the 3D start Point of the Segment
Return type:gp_Pnt
thisown

The membership flag

class Select3D_SensitiveSet(*args, **kwargs)

Bases: object

BVH()
  • Builds BVH tree for sensitive set. Must be called manually to build BVH tree for any sensitive set in case if its content was initialized not in a constructor, but element by element
Return type:None
BoundingBox()
  • Returns bounding box of the whole set. This method should be redefined in Select3D_SensitiveSet descendants
Return type:Select3D_BndBox3d
Box()
  • Returns bounding box of sub-entity with index theIdx in sub-entity list
Parameters:theIdx (int) –
Return type:Select3D_BndBox3d
Center()
  • Returns geometry center of sensitive entity index theIdx along the given axis theAxis
Parameters:
  • theIdx (int) –
  • theAxis (int) –
Return type:

float

CenterOfGeometry()
  • Returns center of the whole set. This method should be redefined in Select3D_SensitiveSet descendants
Return type:gp_Pnt
Clear()
  • Destroys cross-reference to avoid memory leak
Return type:void
GetHandle()
GetLeafNodeSize()
  • Returns a number of nodes in 1 BVH leaf
Return type:int
MarkDirty()
  • Marks BVH tree of the set as outdated. It will be rebuild at the next call of BVH()
Return type:None
Matches()
  • Checks whether one or more entities of the set overlap current selecting volume. Implements the traverse of BVH tree built for the set
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

Size()
  • Returns the amount of sub-entities of the complex entity
Return type:int
Swap()
  • Swaps items with indexes theIdx1 and theIdx2
Parameters:
  • theIdx1 (int) –
  • theIdx2 (int) –
Return type:

None

thisown

The membership flag

class Select3D_SensitiveTriangle(*args)

Bases: object

  • Constructs a sensitive triangle object defined by the owner theOwnerId, the points P1, P2, P3, and the type of sensitivity Sensitivity.
Parameters:
  • theOwnerId (Handle_SelectBasics_EntityOwner &) –
  • thePnt0 (gp_Pnt) –
  • thePnt1 (gp_Pnt) –
  • thePnt2 (gp_Pnt) –
  • theType (Select3D_TypeOfSensitivity) – default value is Select3D_TOS_INTERIOR
Return type:

None

BoundingBox()
  • Returns bounding box of the triangle. If location transformation is set, it will be applied
Return type:Select3D_BndBox3d
Center3D()
  • Returns the center point of the sensitive triangle created at construction time.
Return type:gp_Pnt
CenterOfGeometry()
Return type:gp_Pnt
GetConnected()
  • Returns the copy of this
Return type:Handle_Select3D_SensitiveEntity
GetHandle()
Matches()
  • Checks whether the triangle overlaps current selecting volume
Parameters:
  • theMgr (SelectBasics_SelectingVolumeManager &) –
  • thePickResult (SelectBasics_PickResult &) –
Return type:

bool

NbSubElements()
  • Returns the amount of points
Return type:int
Points3D()
  • Returns the 3D points P1, P2, P3 used at the time of construction.
Parameters:
Return type:

None

thisown

The membership flag

class Select3D_SensitiveWire(*args)

Bases: OCC.Select3D.Select3D_SensitiveSet

  • Constructs a sensitive wire object defined by the owner theOwnerId
Parameters:theOwnerId (Handle_SelectBasics_EntityOwner &) –
Return type:None
Add()
  • Adds the sensitive entity theSensitive to this framework.
Parameters:theSensitive (Handle_Select3D_SensitiveEntity &) –
Return type:None
Box()
  • Returns bounding box of sensitive entity with index theIdx
Parameters:theIdx (int) –
Return type:Select3D_BndBox3d
Center()
  • Returns geometry center of sensitive entity index theIdx in the vector along the given axis theAxis
Parameters:
  • theIdx (int) –
  • theAxis (int) –
Return type:

float

GetConnected()
Return type:Handle_Select3D_SensitiveEntity
GetEdges()
  • returns the sensitive edges stored in this wire
Return type:NCollection_Vector<Handle_Select3D_SensitiveEntity>
GetHandle()
GetLastDetected()
Return type:Handle_Select3D_SensitiveEntity
NbSubElements()
  • Returns the amount of sub-entities
Return type:int
Set()
  • Sets the owner for all entities in wire
Parameters:theOwnerId (Handle_SelectBasics_EntityOwner &) –
Return type:None
Size()
  • Returns the length of vector of sensitive entities
Return type:int
Swap()
  • Swaps items with indexes theIdx1 and theIdx2 in the vector
Parameters:
  • theIdx1 (int) –
  • theIdx2 (int) –
Return type:

void

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