Open CASCADE Technology  7.7.0
Static Public Member Functions

StdSelect_BRepSelectionTool Class Reference

Tool to create specific selections (sets of primitives) for Shapes from Topology. These Selections may be used in dynamic selection Mechanism Given a Shape and a mode of selection (selection of vertices, edges,faces ...) , This Tool Computes corresponding sensitive primitives, puts them in an entity called Selection (see package SelectMgr) and returns it. More...

#include <StdSelect_BRepSelectionTool.hxx>

Static Public Member Functions

static void Load (const Handle< SelectMgr_Selection > &aSelection, const TopoDS_Shape &aShape, const TopAbs_ShapeEnum aType, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Boolean AutoTriangulation=Standard_True, const Standard_Integer aPriority=-1, const Standard_Integer NbPOnEdge=9, const Standard_Real MaximalParameter=500)
 Decomposition of <aShape> into sensitive entities following a mode of decomposition <aType>. These entities are stored in <aSelection>. BrepOwners are created to store the identity of the picked shapes during the selection process. In those BRepOwners is also stored the original shape. But One can't get the selectable object which was decomposed to give the sensitive entities. maximal parameter is used for infinite objects, to limit the sensitive Domain.... If AutoTriangulation = True, a Triangulation will be computed for faces which have no existing one. if AutoTriangulation = False the old algorithm will be called to compute sensitive entities on faces. More...
 
static void Load (const Handle< SelectMgr_Selection > &aSelection, const Handle< SelectMgr_SelectableObject > &Origin, const TopoDS_Shape &aShape, const TopAbs_ShapeEnum aType, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Boolean AutoTriangulation=Standard_True, const Standard_Integer aPriority=-1, const Standard_Integer NbPOnEdge=9, const Standard_Real MaximalParameter=500)
 Same functionalities ; the only difference is that the selectable object from which the selection comes is stored in each Sensitive EntityOwner; decomposition of <aShape> into sensitive entities following a mode of decomposition <aType>. These entities are stored in <aSelection> The Major difference is that the known users are first inserted in the BRepOwners. the original shape is the last user... (see EntityOwner from SelectBasics and BrepOwner)... More...
 
static Standard_Integer GetStandardPriority (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theType)
 Returns the standard priority of the shape aShap having the type aType. This priority is passed to a StdSelect_BRepOwner object. You can use the function Load to modify the selection priority of an owner to make one entity more selectable than another one. More...
 
static void ComputeSensitive (const TopoDS_Shape &theShape, const Handle< SelectMgr_EntityOwner > &theOwner, const Handle< SelectMgr_Selection > &theSelection, const Standard_Real theDeflection, const Standard_Real theDeflAngle, const Standard_Integer theNbPOnEdge, const Standard_Real theMaxiParam, const Standard_Boolean theAutoTriang=Standard_True)
 Computes the sensitive primitives, stores them in the SelectMgr_Selection object, and returns this object. More...
 
static Standard_Boolean GetSensitiveForFace (const TopoDS_Face &theFace, const Handle< SelectMgr_EntityOwner > &theOwner, Select3D_EntitySequence &theOutList, const Standard_Boolean theAutoTriang=Standard_True, const Standard_Integer theNbPOnEdge=9, const Standard_Real theMaxiParam=500, const Standard_Boolean theInteriorFlag=Standard_True)
 Creates the 3D sensitive entities for Face selection. More...
 
static Standard_Boolean GetSensitiveForCylinder (const TopTools_IndexedMapOfShape &theSubfacesMap, const Handle< SelectMgr_EntityOwner > &theOwner, const Handle< SelectMgr_Selection > &theSelection)
 Creates a sensitive cylinder. More...
 
static void GetEdgeSensitive (const TopoDS_Shape &theShape, const Handle< SelectMgr_EntityOwner > &theOwner, const Handle< SelectMgr_Selection > &theSelection, const Standard_Real theDeflection, const Standard_Real theDeviationAngle, const Standard_Integer theNbPOnEdge, const Standard_Real theMaxiParam, Handle< Select3D_SensitiveEntity > &theSensitive)
 Create a sensitive edge or sensitive wire. More...
 
static void PreBuildBVH (const Handle< SelectMgr_Selection > &theSelection)
 Traverses the selection given and pre-builds BVH trees for heavyweight sensitive entities containing more than BVH_PRIMITIVE_LIMIT (defined in .cxx file) sub-elements. More...
 

Detailed Description

Tool to create specific selections (sets of primitives) for Shapes from Topology. These Selections may be used in dynamic selection Mechanism Given a Shape and a mode of selection (selection of vertices, edges,faces ...) , This Tool Computes corresponding sensitive primitives, puts them in an entity called Selection (see package SelectMgr) and returns it.

A Priority for the decomposed pickable objects can be given ; by default There is A Preset Hierarchy: Vertex priority : 5 Edge priority : 4 Wire priority : 3 Face priority : 2 Shell,solid,shape priority : 1 the default priority in the following methods has no sense - it's only taken in account when the user gives a value between 0 and 10. IMPORTANT : This decomposition creates BRepEntityOwner instances (from StdSelect). which are stored in the Sensitive Entities coming from The Decomposition.

the result of picking in a ViewerSelector return EntityOwner from SelectMgr; to know what kind of object was picked :

ENTITY_OWNER -> Selectable() gives the selectableobject which was decomposed into pickable elements. Handle(StdSelect_BRepOwner)::DownCast(ENTITY_OWNER) -> Shape() gives the real picked shape (edge,vertex,shape...)

Member Function Documentation

◆ ComputeSensitive()

static void StdSelect_BRepSelectionTool::ComputeSensitive ( const TopoDS_Shape theShape,
const Handle< SelectMgr_EntityOwner > &  theOwner,
const Handle< SelectMgr_Selection > &  theSelection,
const Standard_Real  theDeflection,
const Standard_Real  theDeflAngle,
const Standard_Integer  theNbPOnEdge,
const Standard_Real  theMaxiParam,
const Standard_Boolean  theAutoTriang = Standard_True 
)
static

Computes the sensitive primitives, stores them in the SelectMgr_Selection object, and returns this object.

Parameters
[in]theShapeshape to compute sensitive entities
[in]theOwnerselectable owner object
[in]theSelectionselection to append new sensitive entities
[in]theDeflectionlinear deflection
[in]theDeflAngleangular deflection
[in]theNbPOnEdgesensitivity parameters for edges and wires
[in]theMaxiParamsensitivity parameters for infinite objects (the default value is 500)
[in]theAutoTriangflag to compute triangulation for the faces which have none

◆ GetEdgeSensitive()

static void StdSelect_BRepSelectionTool::GetEdgeSensitive ( const TopoDS_Shape theShape,
const Handle< SelectMgr_EntityOwner > &  theOwner,
const Handle< SelectMgr_Selection > &  theSelection,
const Standard_Real  theDeflection,
const Standard_Real  theDeviationAngle,
const Standard_Integer  theNbPOnEdge,
const Standard_Real  theMaxiParam,
Handle< Select3D_SensitiveEntity > &  theSensitive 
)
static

Create a sensitive edge or sensitive wire.

Parameters
[in]theShapeeither TopoDS_Edge or TopoDS_Wire to compute sensitive entities
[in]theOwnerselectable owner object
[in]theSelectionselection to append new sensitive entities
[in]theDeflectionlinear deflection
[in]theDeviationAngleangular deflection
[in]theNbPOnEdgesensitivity parameters
[out]theMaxiParamsensitivity parameters

◆ GetSensitiveForCylinder()

static Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForCylinder ( const TopTools_IndexedMapOfShape theSubfacesMap,
const Handle< SelectMgr_EntityOwner > &  theOwner,
const Handle< SelectMgr_Selection > &  theSelection 
)
static

Creates a sensitive cylinder.

Parameters
[in]theSubfacesMapmap of cylinder faces
[in]theOwnerselectable owner object
[in]theSelectionselection to append new sensitive entities

◆ GetSensitiveForFace()

static Standard_Boolean StdSelect_BRepSelectionTool::GetSensitiveForFace ( const TopoDS_Face theFace,
const Handle< SelectMgr_EntityOwner > &  theOwner,
Select3D_EntitySequence theOutList,
const Standard_Boolean  theAutoTriang = Standard_True,
const Standard_Integer  theNbPOnEdge = 9,
const Standard_Real  theMaxiParam = 500,
const Standard_Boolean  theInteriorFlag = Standard_True 
)
static

Creates the 3D sensitive entities for Face selection.

Parameters
[in]theFaceface to compute sensitive entities
[in]theOwnerselectable owner object
[out]theOutListoutput result list to append created entities
[in]theAutoTriangobsolete flag (has no effect)
[in]theNbPOnEdgesensitivity parameters
[in]theMaxiParamsensitivity parameters
[in]theInteriorFlagflag indicating that face interior (TRUE) or face boundary (FALSE) should be selectable

◆ GetStandardPriority()

static Standard_Integer StdSelect_BRepSelectionTool::GetStandardPriority ( const TopoDS_Shape theShape,
const TopAbs_ShapeEnum  theType 
)
inlinestatic

Returns the standard priority of the shape aShap having the type aType. This priority is passed to a StdSelect_BRepOwner object. You can use the function Load to modify the selection priority of an owner to make one entity more selectable than another one.

◆ Load() [1/2]

static void StdSelect_BRepSelectionTool::Load ( const Handle< SelectMgr_Selection > &  aSelection,
const Handle< SelectMgr_SelectableObject > &  Origin,
const TopoDS_Shape aShape,
const TopAbs_ShapeEnum  aType,
const Standard_Real  theDeflection,
const Standard_Real  theDeviationAngle,
const Standard_Boolean  AutoTriangulation = Standard_True,
const Standard_Integer  aPriority = -1,
const Standard_Integer  NbPOnEdge = 9,
const Standard_Real  MaximalParameter = 500 
)
static

Same functionalities ; the only difference is that the selectable object from which the selection comes is stored in each Sensitive EntityOwner; decomposition of <aShape> into sensitive entities following a mode of decomposition <aType>. These entities are stored in <aSelection> The Major difference is that the known users are first inserted in the BRepOwners. the original shape is the last user... (see EntityOwner from SelectBasics and BrepOwner)...

◆ Load() [2/2]

static void StdSelect_BRepSelectionTool::Load ( const Handle< SelectMgr_Selection > &  aSelection,
const TopoDS_Shape aShape,
const TopAbs_ShapeEnum  aType,
const Standard_Real  theDeflection,
const Standard_Real  theDeviationAngle,
const Standard_Boolean  AutoTriangulation = Standard_True,
const Standard_Integer  aPriority = -1,
const Standard_Integer  NbPOnEdge = 9,
const Standard_Real  MaximalParameter = 500 
)
static

Decomposition of <aShape> into sensitive entities following a mode of decomposition <aType>. These entities are stored in <aSelection>. BrepOwners are created to store the identity of the picked shapes during the selection process. In those BRepOwners is also stored the original shape. But One can't get the selectable object which was decomposed to give the sensitive entities. maximal parameter is used for infinite objects, to limit the sensitive Domain.... If AutoTriangulation = True, a Triangulation will be computed for faces which have no existing one. if AutoTriangulation = False the old algorithm will be called to compute sensitive entities on faces.

◆ PreBuildBVH()

static void StdSelect_BRepSelectionTool::PreBuildBVH ( const Handle< SelectMgr_Selection > &  theSelection)
static

Traverses the selection given and pre-builds BVH trees for heavyweight sensitive entities containing more than BVH_PRIMITIVE_LIMIT (defined in .cxx file) sub-elements.


The documentation for this class was generated from the following file: