# OCC.SelectBasics module

class `Handle_SelectBasics_EntityOwner`(*args)

  Bases: `OCC.MMgt.Handle_MMgt_TShared`

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

    The membership flag

class `Handle_SelectBasics_ListNodeOfListOfBox2d`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_MapNode`

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

    The membership flag

class `Handle_SelectBasics_ListNodeOfListOfSensitive`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_MapNode`

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

    The membership flag

class `Handle_SelectBasics_SensitiveEntity`(*args)

  Bases: `OCC.MMgt.Handle_MMgt_TShared`

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

    The membership flag

class `Handle_SelectBasics_SequenceNodeOfSequenceOfOwner`(*args)

  Bases: `OCC.TCollection.Handle_TCollection_SeqNode`

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

    The membership flag

class `SelectBasics_BasicTool`

  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 (int &) –
    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

`SelectBasics_BasicTool_AutoInter`(*args)

  Parameters: | aPolyg2d (TColgp_Array1OfPnt2d) –
  Return type: | bool

`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 (int &) –
  Return type: | bool

`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

`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 `SelectBasics_EntityOwner`(*args, **kwargs)

  Bases: `OCC.MMgt.MMgt_TShared`

  `GetHandle`()
  `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 (int) –
    Return type: | None

  `SetLocation`()

    Parameters: | aLoc (TopLoc_Location &) –
    Return type: | void

  `thisown`

    The membership flag

class `SelectBasics_ListIteratorOfListOfBox2d`(*args)

  Bases: `object`

  Return type: | None
  Parameters: | L (SelectBasics_ListOfBox2d &) –
  Return type: | None

  `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 `SelectBasics_ListIteratorOfListOfSensitive`(*args)

  Bases: `object`

  Return type: | None
  Parameters: | L (SelectBasics_ListOfSensitive &) –
  Return type: | None

  `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 `SelectBasics_ListNodeOfListOfBox2d`(*args)

  Bases: `OCC.TCollection.TCollection_MapNode`

  Parameters: | I (Bnd_Box2d &) – n (TCollection_MapNodePtr &) –
  Return type: | None

  `GetHandle`()
  `Value`()

    Return type: | Bnd_Box2d

  `thisown`

    The membership flag

class `SelectBasics_ListNodeOfListOfSensitive`(*args)

  Bases: `OCC.TCollection.TCollection_MapNode`

  Parameters: | I (Handle_SelectBasics_SensitiveEntity &) – n (TCollection_MapNodePtr &) –
  Return type: | None

  `GetHandle`()
  `Value`()

    Return type: | Handle_SelectBasics_SensitiveEntity

  `thisown`

    The membership flag

class `SelectBasics_ListOfBox2d`(*args)

  Bases: `object`

  Return type: | None
  Parameters: | Other (SelectBasics_ListOfBox2d &) –
  Return type: | None

  `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 `SelectBasics_ListOfSensitive`(*args)

  Bases: `object`

  Return type: | None
  Parameters: | Other (SelectBasics_ListOfSensitive &) –
  Return type: | None

  `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 `SelectBasics_PickArgs`(*args)

  Bases: `object`

  - Constructor. @param theX mouse picking coordinate on x-axis of selection coord space. @param theY mouse picking coordinate on y-axis of selection coord space. @param theTolerance x, y coordinate tolerance. @param theDepthMin minimum picking depth in selection coord space. @param theDepthMax maximum picking depth in selection coord space. @param thePickingLine line going through picking point.

  Parameters: | theX (float) – theY (float) – theTolerance (float) – theDepthMin (float) – theDepthMax (float) – thePickingLine (gp_Lin) –
  Return type: | None

  `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 `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`()
  `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 `SelectBasics_SequenceNodeOfSequenceOfOwner`(*args)

  Bases: `OCC.TCollection.TCollection_SeqNode`

  Parameters: | I (Handle_SelectBasics_EntityOwner &) – n (TCollection_SeqNodePtr &) – p (TCollection_SeqNodePtr &) –
  Return type: | None

  `GetHandle`()
  `Value`()

    Return type: | Handle_SelectBasics_EntityOwner

  `thisown`

    The membership flag

class `SelectBasics_SequenceOfOwner`(*args)

  Bases: `OCC.TCollection.TCollection_BaseSequence`

  Return type: | None
  Parameters: | Other (SelectBasics_SequenceOfOwner &) –
  Return type: | None

  `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 (int) –
    Return type: | Handle_SelectBasics_EntityOwner

  `Clear`()

    Return type: | None

  `First`()

    Return type: | Handle_SelectBasics_EntityOwner

  `InsertAfter`()

    Parameters: | Index (int) – T (Handle_SelectBasics_EntityOwner &) – Index – S (SelectBasics_SequenceOfOwner &) –
    Return type: | None
    Return type: | None

  `InsertBefore`()

    Parameters: | Index (int) – 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 (int) – FromIndex (int) – ToIndex (int) –
    Return type: | None
    Return type: | None

  `Set`()

    Parameters: | Other (SelectBasics_SequenceOfOwner &) –
    Return type: | SelectBasics_SequenceOfOwner

  `SetValue`()

    Parameters: | Index (int) – I (Handle_SelectBasics_EntityOwner &) –
    Return type: | None

  `Split`()

    Parameters: | Index (int) – Sub (SelectBasics_SequenceOfOwner &) –
    Return type: | None

  `Value`()

    Parameters: | Index (int) –
    Return type: | Handle_SelectBasics_EntityOwner

  `thisown`

    The membership flag

class `SelectBasics_SortAlgo`(*args)

  Bases: `object`

  - Empty rectangle selector.

  Return type: | None

  - Creates a initialized selector.

  Parameters: | ClippingRectangle (Bnd_Box2d &) – sizeOfSensitiveArea (float) – theRectangles (Handle_Bnd_HArray1OfBox2d &) –
  Return type: | None

  `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 `SwigPyIterator`(*args, **kwargs)

  Bases: `object`

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

    The membership flag

  `value`()

`register_handle`(handle, base_object)

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

class `selectbasics`

  Bases: `object`

  static `MaxOwnerPriority`(*args)
    - Structure to provide all-in-one information on picking arguments for ‘Matches’ method of SelectBasics_SensitiveEntity.

    Return type: | int

  static `MinOwnerPriority`(*args)

    Return type: | int

  `thisown`

    The membership flag

`selectbasics_MaxOwnerPriority`(*args)
  - Structure to provide all-in-one information on picking arguments for ‘Matches’ method of SelectBasics_SensitiveEntity.

  Return type: | int

`selectbasics_MinOwnerPriority`(*args)

  Return type: | int