Namespaces | Classes | Typedefs | Functions | Variables
Sub Enity Tool

Namespaces

 Bentley
 The Bentley namespace contains types defined by the Bentley Library.
 
 Bentley::DgnPlatform
 The DgnPlatform namespace contains types defined by the DgnPlatform.
 

Classes

struct  ElementGraphicsTool
 Tool base class for caching a geometric representation of elements. More...
 
struct  LocateSubEntityTool
 Tool base class for picking sub-entities on element geometry (faces/edges/vertices). More...
 

Typedefs

typedef RefCountedPtr
< IRefCounted > 
IElementGraphicsPtr
 

Functions

virtual bool _CollectCurves ()
 Whether to collect open curves. More...
 
virtual bool _CollectSurfaces ()
 Whether to collect closed curves, regions, surfaces, and open meshes. More...
 
virtual bool _CollectSolids ()
 Whether to collect solids and closed meshes. More...
 
virtual bool _CollectTextBoundaries ()
 Whether to collect text as bounding shapes. More...
 
virtual bool _CollectComplexComponents ()
 Whether to collect geometry output from component elements. (ex. geometry from normal cells) More...
 
virtual DrawPurpose _GetCollectDrawPurpose ()
 Allow tools to override the default draw purpose supplied to the geometry collector... More...
 
BentleyStatus GetElementGraphicsCache (ElementHandleCR eh, bvector< IElementGraphicsPtr > &geomCache)
 Return vector of geometry collected by asking the element to draw itself (cached as ElementRefAppData). More...
 
size_t GetElementGraphicsCacheCount (ElementHandleCR eh)
 Convenience method to quickly return the size of the graphics cache. Modify tools typically require that there be only a single piece of geometry and nothing was excluded (IsGeometryMissing returns false). More...
 
DisplayPathPtr GetDisplayPath (IElementGraphicsPtr &geomPtr)
 Return the display path that produced the cached geometry. More...
 
bool IsFromLocatedComponent (IElementGraphicsPtr &geomPtr)
 Return whether this geometry was output from the same display path as the locate path (_BuildLocateAgenda) when collecting geometry for complex components. More...
 
DisplayPathPtr GetLocatedComponentPath (ElementHandleCR eh)
 Return the display path to this top-level element's located component (_BuildLocateAgenda) when collecting geometry for complex components. More...
 
ISolidKernelEntityPtr TryGetAsBRep (IElementGraphicsPtr &geomPtr)
 Get a specific geometry type. Invalid ptr returned if geometry is not ISolidKernelEntityPtr. More...
 
ISolidPrimitivePtr TryGetAsPrimitive (IElementGraphicsPtr &geomPtr)
 Get a specific geometry type. Invalid ptr returned if geometry is not ISolidPrimitivePtr. More...
 
MSBsplineSurfacePtr TryGetAsSurface (IElementGraphicsPtr &geomPtr)
 Get a specific geometry type. Invalid ptr returned if geometry is not MSBsplineSurfacePtr. More...
 
PolyfaceHeaderPtr TryGetAsPolyface (IElementGraphicsPtr &geomPtr)
 Get a specific geometry type. Invalid ptr returned if geometry is not PolyfaceHeaderPtr. More...
 
CurveVectorPtr TryGetAsCurveVector (IElementGraphicsPtr &geomPtr)
 Get a specific geometry type. Invalid ptr returned if geometry is not CurveVectorPtr. More...
 
bool IsGeometrySolid (IElementGraphicsPtr &geomPtr)
 Return true if the geometry is or would be represented by a solid body. Accepted geometry includes BRep solids, capped SolidPrimitves, and closed Polyfaces. More...
 
bool IsGeometrySheet (IElementGraphicsPtr &geomPtr)
 Return true if the geometry is or would be represented by a sheet body. Accepted geometry includes BRep sheets, un-capped SolidPrimitives, region CurveVectors, Bspline Surfaces, and unclosed Polyfaces. More...
 
bool IsGeometryWire (IElementGraphicsPtr &geomPtr)
 Return true if the geometry is or would be represented by a wire body. Accepted geometry includes BRep wires and CurveVectors. More...
 
bool IsGeometryMissing (ElementHandleCR eh)
 Return true if geometry cache does not contain all geometry output by this element. Geometry could have been filtered by type, or failed promotion to BRep, etc. More...
 
virtual void _DoCollectElementGraphics (ElementHandleCR eh)
 Collect element graphics for this element. Allows sub-classes to override the default processor implementation. More...
 
virtual BentleyStatus _OnProcessSolidKernelEntity (ISolidKernelEntityPtr &geomPtr, DisplayPathCR path)
 Geometry collector callback for brep entities. Return SUCCESS to ignore this geometry. More...
 
virtual BentleyStatus _OnProcessSolidPrimitive (ISolidPrimitivePtr &geomPtr, DisplayPathCR path)
 Geometry collector callback for primitive solids and surfaces. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet or solid brep. More...
 
virtual BentleyStatus _OnProcessBsplineSurface (MSBsplineSurfacePtr &geomPtr, DisplayPathCR path)
 Geometry collector callback for bspline surfaces. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet brep. More...
 
virtual BentleyStatus _OnProcessPolyface (PolyfaceHeaderPtr &geomPtr, DisplayPathCR path)
 Geometry collector callback for meshes. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet or solid brep. NOTE: Avoid converting very large meshes into breps! More...
 
virtual BentleyStatus _OnProcessCurveVector (CurveVectorPtr &geomPtr, DisplayPathCR path)
 Geometry collector callback for open/closed curves and regions. Return SUCCESS to ignore this geometry. Return ERROR to process as a wire or sheet brep. More...
 
virtual EditElementHandleP _BuildLocateAgenda (HitPathCP path, DgnButtonEventCP ev) override
 Preserve which component was located when _CollectComplexComponents returns true to better support operations on a single component of cells. More...
 
virtual bool _IsElementValidForOperation (ElementHandleCR eh, HitPathCP path, WStringR cantAcceptReason)
 Sub-classes should only collect supported geometry, accepts element/component when geometry cache isn't empty. NOTE: cantAcceptReason only used when path isn't NULL. More...
 
virtual bool _OnPostLocate (HitPathCP path, WStringR cantAcceptReason) override
 Reject elements that aren't valid for this tool as determined by calling _IsElementValidForOperation with locate hit path. More...
 
virtual bool _FilterAgendaEntries () override
 Remove agenda entries that aren't valid for this tool as determined by calling _IsElementValidForOperation with NULL hit path. More...
 
virtual void _OnCleanup () override
 Clear ElementRefAppData cache graphics for elements processed by this tool instance. If overridden you MUST call super! More...
 
virtual UsesSelection _AllowSelection () override
 A tool can support selection sets as well as sub-entity selection for a single element, allow selection sets if sub-entity support is not required. More...
 
virtual bool _DoGroups () override
 Don't support named and graphic groups since sub-entities selection is for a single element. More...
 
virtual bool _WantDynamics () override
 Enable dynamics to use locate boresite to display sub-entity at the cursor location. More...
 
virtual bool _WantAccuSnap () override
 Disable AccuSnap when locating sub-entities. More...
 
virtual ISubEntity::SubEntityType _GetSubEntityTypeMask ()
 Default sub-entity type mask to identify faces. More...
 
virtual bool _RequireSubEntitySupport ()
 Whether to allow selection/accept of elements that don't support sub-entity selection in addition to those that do. More...
 
virtual bool _AcceptIdentifiesSubEntity ()
 Whether initial accept should also attempt to pick a sub-entity at the accept point. More...
 
virtual size_t _GetRequiredSubEntityCount (ISubEntity::SubEntityType entityType)
 Get minimum required sub-entity count to begin sub-entity selection. i.e. returning 2 would eliminate single face elements from face selection. More...
 
virtual size_t _GetMaximumSubEntityHits (ISubEntity::SubEntityType entityType)
 Get maximum number of sub-entities to return of the specified type from a locate. More...
 
virtual bool _AllowSubEntityDeselect ()
 Allow selecting an already accepted entity again (either by data or reset to cycle though overlapping entities) to de-select it. More...
 
virtual void _FilterSubEntities (bvector< ISubEntityPtr > &subEntities)
 Remove unwanted hits returned from locate, ex. smooth edges for a edge blending tool, etc. More...
 
virtual bool _WantSubEntityDisplay ()
 Whether to display sub-entity dynamics and accepted sub-entities as view transients. More...
 
bvector< ISubEntityPtr > & GetAcceptedSubEntities ()
 Return vector of accepted sub-entities. More...
 
void ResetSubEntityLocate ()
 Clear result from prior locate to invalidate list reset uses to cycling between overlapping sub-entities. Does not affect accepted entities. More...
 
EditElementHandleP FindAgendaEntry (ISubEntityCR subEntity)
 Return entry from tool agenda that produced the supplied subEntity. More...
 
IElementGraphicsPtr GetIElementGraphicsPtr (ISubEntityCR subEntity)
 Return IElementGraphicsPtr entry that produced the supplied subEntity. More...
 
QvElem * CreateSubEntityQvElem (ElementHandleCR eh, ISubEntityCR subEntity, ViewContextR context)
 Return QvElem representing sub-entity geometry. NOTE: To be freed by caller with IViewOutput::DeleteCacheElement. More...
 
bool IsSolidKernelSubEntity (ISubEntityCR subEntity)
 Return true if the supplied subEntity represents an face, edge, or vertex of an ISolidKernelEntity and is valid for the solid modelling api. More...
 
bool TryGetAsCurveLocationDetail (CurveLocationDetail &location, ISubEntityCR subEntity)
 Return true if the supplied subEntity represents a CurveLocationDetail for an edge or vertex of a CurveVector, ISolidPrimitive, or MSBsplineSurface. More...
 
bool TryGetAsFacetLocationDetail (FacetLocationDetail &location, ISubEntityCR subEntity)
 Return true if the supplied subEntity represents a FaceLocationDetail for an face, edge, or vertex of a PolyfaceHeader. More...
 
bool TryGetAsSolidLocationDetail (SolidLocationDetail &location, ISubEntityCR subEntity)
 Return true if the supplied subEntity represents a SolidLocationDetail for the face of an ISolidPrimitive. More...
 
BentleyStatus GetFaceParameterRange (ISubEntityCR subEntity, DRange1dR uRange, DRange1dR vRange)
 Get parameter range (uv box) for a sub-entity representing a face. More...
 
BentleyStatus EvaluateFace (ISubEntityCR subEntity, DPoint3dR point, DVec3dR normal, DVec3dR uDir, DVec3dR vDir, DPoint2dCR uvParam)
 Evaluate a uv parameter location on a sub-entity representing a face. More...
 
BentleyStatus GetSubEntityGeometry (IGeometryPtr &geom, ISubEntityCR subEntity)
 Get an IGeometryPtr that holds the geometric representation for the supplied sub-entity. More...
 
bool DoPickSubEntities (ElementHandleCR eh, DgnButtonEventCR ev, bvector< ISubEntityPtr > &intersectEntities, bvector< DPoint3d > &intersectPts, bvector< DPoint2d > &intersectParams)
 Boresite to face/edge/vertex and return hit sub-entities. More...
 
bool DoPickSurfaces (ElementHandleCR eh, DgnButtonEventCR ev, bvector< ISubEntityPtr > &intersectEntities, bvector< DPoint3d > &intersectPts, bvector< DPoint2d > &intersectParams)
 Boresite to surfaces and return face hit information. More...
 
bool DoPickFace (ElementHandleCR eh, ISubEntityCR subEntity, DgnButtonEventCR ev, bvector< DPoint3d > &intersectPts, bvector< DPoint2d > &intersectParams)
 Boresite to a single face returning hit information. More...
 
bool GetClosestFace (ElementHandleCR eh, DgnButtonEventCR ev, ISubEntityPtr &closeEntity, DPoint3dR closePoint, DPoint2dR closeParam)
 Return closest face on element to supplied location. More...
 
virtual UInt32 _GetSubEntityColor (ViewportR vp, ISubEntity::SubEntityType entityType, bool isDynamics)
 Get dynamic/selected sub-entity color. More...
 
virtual UInt32 _GetSubEntityWeight (ViewportR vp, ISubEntity::SubEntityType entityType, bool isDynamics)
 Get dynamic/selected sub-entity weight. More...
 
virtual Int32 _GetSubEntityStyle (ViewportR vp, ISubEntity::SubEntityType entityType, bool isDynamics)
 Get dynamic/selected sub-entity style. More...
 
virtual void _PushSubEntitySymbology (ViewContextR context, ISubEntity::SubEntityType entityType, bool isDynamics)
 Establish symbology for displaying dynamic/selected sub-entities. More...
 
virtual void _PopSubEntitySymbology (ViewContextR context, ISubEntity::SubEntityType entityType, bool isDynamics)
 Clear any symbology overrides established for displaying sub-entity. More...
 
virtual void _DrawSubEntity (ElementHandleCR eh, ISubEntityCR subEntity, ViewContextR context, bool isDynamics)
 Display accepted/dynamic sub-entities. More...
 
virtual void _DrawGeometry (ElementHandleCR eh, IElementGraphicsPtr &geomPtr, ViewContextR context)
 Convenience method that calls the "TryGetAs" methods and outputs the geometry to the supplied context. NOTE: Does not set symbology. More...
 
virtual void _DrawTransients (ViewContextR context, bool isPreUpdate) override
 Display selected/accepted sub-entities. More...
 
virtual void _OnDynamicFrame (DgnButtonEventCR ev) override
 Display sub-entity selected by locate boresite at cursor location. More...
 
virtual bool _WantAdditionalSubEntities (DgnButtonEventCR ev)
 A data button completes the tool if at least one sub-entity is selected. Allows ctrl+data to identify additional sub-entities. More...
 
virtual bool _AllowMissToAccept (DgnButtonEventCR ev)
 Allow a miss with no sub-entities selected to complete the tool. (note: When not _RequireSubEntitySupport and not ctrl+data). More...
 
virtual bool _DoLocateSubEntity (DgnButtonEventCR ev, bool newSearch)
 Do locate boresite and select sub-entities. Called from _OnResetButton with false for newSearch to cycle through overlapping entities. More...
 
virtual bool _IsValidForSubEntitySelection ()
 Test whether any of the requested sub-entity types are valid for the last located element/component (based on _GetComponentMode). More...
 
virtual bool _IsValidForSubEntitySelection (ElementHandleCR eh)
 Test whether any of the requested sub-entity types are valid for this element. More...
 
virtual bool _IsValidForSubEntitySelection (DisplayPathCR path)
 Test whether any of the requested sub-entity types are valid for this path. More...
 
virtual bool _OnPostLocate (HitPathCP path, WStringR cantAcceptReason) override
 Reject elements that don't support sub-entity selection when _RequireSubEntitySupport. More...
 
virtual void _SetLocateCriteria () override
 Disable coordinate lock overrides when picking sub-entities. More...
 
virtual bool _OnDataButton (DgnButtonEventCR ev) override
 Accept sub-entities, elements, or complete tool. More...
 
virtual bool _OnResetButton (DgnButtonEventCR ev) override
 Cycle through overlapping sub-entities, elements, or restart tool. More...
 
virtual void _OnCleanup () override
 Drop IViewTransient used to display accepted sub-entities. If overridden you MUST call super! More...
 
virtual void _OnPostInstall () override
 Add IViewTransient used to display accepted sub-entities. More...
 
static void GetSpacePoint (DPoint3dR spacePoint, DgnButtonEventCR ev, DisplayPathCP path)
 Compute space point from button event GetPoint. The spacePoint is returned in local coordinates of path. More...
 
static void GetLocateInfo (DPoint3dR spacePoint, DMatrix4dR viewToLocal, double &maxDistance, DgnButtonEventCR ev, DisplayPathCP path)
 Compute locate information from button event GetRawPoint (adjusted to eye). The spacePoint and maxDistance are returned in local coordinates of path. More...
 
static void InitBoresite (DRay3dR boresite, DPoint3dCR spacePoint, DMatrix4dCR worldToLocal)
 Compute boresite ray from space point and world to local matrix. (See GetLocateInfo). More...
 

Variables

bvector< ElementRefP > m_graphicsCache
 

Detailed Description

Typedef Documentation

typedef RefCountedPtr<IRefCounted> IElementGraphicsPtr

Function Documentation

virtual bool _AcceptIdentifiesSubEntity ( )
protectedvirtual

Whether initial accept should also attempt to pick a sub-entity at the accept point.

virtual bool _AllowMissToAccept ( DgnButtonEventCR  ev)
protectedvirtual

Allow a miss with no sub-entities selected to complete the tool. (note: When not _RequireSubEntitySupport and not ctrl+data).

virtual UsesSelection _AllowSelection ( )
overrideprotectedvirtual

A tool can support selection sets as well as sub-entity selection for a single element, allow selection sets if sub-entity support is not required.

Reimplemented from DgnElementSetTool.

virtual bool _AllowSubEntityDeselect ( )
protectedvirtual

Allow selecting an already accepted entity again (either by data or reset to cycle though overlapping entities) to de-select it.

virtual EditElementHandleP _BuildLocateAgenda ( HitPathCP  path,
DgnButtonEventCP  ev 
)
overrideprotectedvirtual

Preserve which component was located when _CollectComplexComponents returns true to better support operations on a single component of cells.

Reimplemented from DgnElementSetTool.

virtual bool _CollectComplexComponents ( )
protectedvirtual

Whether to collect geometry output from component elements. (ex. geometry from normal cells)

virtual bool _CollectCurves ( )
protectedvirtual

Whether to collect open curves.

virtual bool _CollectSolids ( )
protectedvirtual

Whether to collect solids and closed meshes.

virtual bool _CollectSurfaces ( )
protectedvirtual

Whether to collect closed curves, regions, surfaces, and open meshes.

virtual bool _CollectTextBoundaries ( )
protectedvirtual

Whether to collect text as bounding shapes.

virtual void _DoCollectElementGraphics ( ElementHandleCR  eh)
protectedvirtual

Collect element graphics for this element. Allows sub-classes to override the default processor implementation.

virtual bool _DoGroups ( )
overrideprotectedvirtual

Don't support named and graphic groups since sub-entities selection is for a single element.

Reimplemented from DgnElementSetTool.

virtual bool _DoLocateSubEntity ( DgnButtonEventCR  ev,
bool  newSearch 
)
protectedvirtual

Do locate boresite and select sub-entities. Called from _OnResetButton with false for newSearch to cycle through overlapping entities.

virtual void _DrawGeometry ( ElementHandleCR  eh,
IElementGraphicsPtr geomPtr,
ViewContextR  context 
)
protectedvirtual

Convenience method that calls the "TryGetAs" methods and outputs the geometry to the supplied context. NOTE: Does not set symbology.

virtual void _DrawSubEntity ( ElementHandleCR  eh,
ISubEntityCR  subEntity,
ViewContextR  context,
bool  isDynamics 
)
protectedvirtual

Display accepted/dynamic sub-entities.

virtual void _DrawTransients ( ViewContextR  context,
bool  isPreUpdate 
)
overrideprotectedvirtual

Display selected/accepted sub-entities.

Implements IViewTransients.

virtual bool _FilterAgendaEntries ( )
overrideprotectedvirtual

Remove agenda entries that aren't valid for this tool as determined by calling _IsElementValidForOperation with NULL hit path.

Reimplemented from DgnElementSetTool.

virtual void _FilterSubEntities ( bvector< ISubEntityPtr > &  subEntities)
protectedvirtual

Remove unwanted hits returned from locate, ex. smooth edges for a edge blending tool, etc.

virtual DrawPurpose _GetCollectDrawPurpose ( )
protectedvirtual

Allow tools to override the default draw purpose supplied to the geometry collector...

virtual size_t _GetMaximumSubEntityHits ( ISubEntity::SubEntityType  entityType)
protectedvirtual

Get maximum number of sub-entities to return of the specified type from a locate.

virtual size_t _GetRequiredSubEntityCount ( ISubEntity::SubEntityType  entityType)
protectedvirtual

Get minimum required sub-entity count to begin sub-entity selection. i.e. returning 2 would eliminate single face elements from face selection.

virtual UInt32 _GetSubEntityColor ( ViewportR  vp,
ISubEntity::SubEntityType  entityType,
bool  isDynamics 
)
protectedvirtual

Get dynamic/selected sub-entity color.

virtual Int32 _GetSubEntityStyle ( ViewportR  vp,
ISubEntity::SubEntityType  entityType,
bool  isDynamics 
)
protectedvirtual

Get dynamic/selected sub-entity style.

virtual ISubEntity::SubEntityType _GetSubEntityTypeMask ( )
protectedvirtual

Default sub-entity type mask to identify faces.

virtual UInt32 _GetSubEntityWeight ( ViewportR  vp,
ISubEntity::SubEntityType  entityType,
bool  isDynamics 
)
protectedvirtual

Get dynamic/selected sub-entity weight.

virtual bool _IsElementValidForOperation ( ElementHandleCR  eh,
HitPathCP  path,
WStringR  cantAcceptReason 
)
protectedvirtual

Sub-classes should only collect supported geometry, accepts element/component when geometry cache isn't empty. NOTE: cantAcceptReason only used when path isn't NULL.

virtual bool _IsValidForSubEntitySelection ( )
protectedvirtual

Test whether any of the requested sub-entity types are valid for the last located element/component (based on _GetComponentMode).

virtual bool _IsValidForSubEntitySelection ( ElementHandleCR  eh)
protectedvirtual

Test whether any of the requested sub-entity types are valid for this element.

virtual bool _IsValidForSubEntitySelection ( DisplayPathCR  path)
protectedvirtual

Test whether any of the requested sub-entity types are valid for this path.

virtual void _OnCleanup ( )
overrideprotectedvirtual

Clear ElementRefAppData cache graphics for elements processed by this tool instance. If overridden you MUST call super!

Reimplemented from DgnTool.

Reimplemented in LocateSubEntityTool.

virtual void _OnCleanup ( )
overrideprotectedvirtual

Drop IViewTransient used to display accepted sub-entities. If overridden you MUST call super!

Reimplemented from ElementGraphicsTool.

virtual bool _OnDataButton ( DgnButtonEventCR  ev)
overrideprotectedvirtual

Accept sub-entities, elements, or complete tool.

Reimplemented from DgnElementSetTool.

virtual void _OnDynamicFrame ( DgnButtonEventCR  ev)
overrideprotectedvirtual

Display sub-entity selected by locate boresite at cursor location.

Reimplemented from DgnElementSetTool.

virtual void _OnPostInstall ( )
overrideprotectedvirtual

Add IViewTransient used to display accepted sub-entities.

Reimplemented from DgnElementSetTool.

virtual bool _OnPostLocate ( HitPathCP  path,
WStringR  cantAcceptReason 
)
overrideprotectedvirtual

Reject elements that aren't valid for this tool as determined by calling _IsElementValidForOperation with locate hit path.

Reimplemented from DgnElementSetTool.

Reimplemented in LocateSubEntityTool.

virtual bool _OnPostLocate ( HitPathCP  path,
WStringR  cantAcceptReason 
)
overrideprotectedvirtual

Reject elements that don't support sub-entity selection when _RequireSubEntitySupport.

Reimplemented from ElementGraphicsTool.

virtual BentleyStatus _OnProcessBsplineSurface ( MSBsplineSurfacePtr geomPtr,
DisplayPathCR  path 
)
protectedvirtual

Geometry collector callback for bspline surfaces. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet brep.

virtual BentleyStatus _OnProcessCurveVector ( CurveVectorPtr geomPtr,
DisplayPathCR  path 
)
protectedvirtual

Geometry collector callback for open/closed curves and regions. Return SUCCESS to ignore this geometry. Return ERROR to process as a wire or sheet brep.

virtual BentleyStatus _OnProcessPolyface ( PolyfaceHeaderPtr geomPtr,
DisplayPathCR  path 
)
protectedvirtual

Geometry collector callback for meshes. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet or solid brep. NOTE: Avoid converting very large meshes into breps!

virtual BentleyStatus _OnProcessSolidKernelEntity ( ISolidKernelEntityPtr geomPtr,
DisplayPathCR  path 
)
protectedvirtual

Geometry collector callback for brep entities. Return SUCCESS to ignore this geometry.

virtual BentleyStatus _OnProcessSolidPrimitive ( ISolidPrimitivePtr geomPtr,
DisplayPathCR  path 
)
protectedvirtual

Geometry collector callback for primitive solids and surfaces. Return SUCCESS to ignore this geometry. Return ERROR to process as a sheet or solid brep.

virtual bool _OnResetButton ( DgnButtonEventCR  ev)
overrideprotectedvirtual

Cycle through overlapping sub-entities, elements, or restart tool.

Reimplemented from DgnElementSetTool.

virtual void _PopSubEntitySymbology ( ViewContextR  context,
ISubEntity::SubEntityType  entityType,
bool  isDynamics 
)
protectedvirtual

Clear any symbology overrides established for displaying sub-entity.

virtual void _PushSubEntitySymbology ( ViewContextR  context,
ISubEntity::SubEntityType  entityType,
bool  isDynamics 
)
protectedvirtual

Establish symbology for displaying dynamic/selected sub-entities.

virtual bool _RequireSubEntitySupport ( )
protectedvirtual

Whether to allow selection/accept of elements that don't support sub-entity selection in addition to those that do.

virtual void _SetLocateCriteria ( )
overrideprotectedvirtual

Disable coordinate lock overrides when picking sub-entities.

Reimplemented from DgnElementSetTool.

virtual bool _WantAccuSnap ( )
overrideprotectedvirtual

Disable AccuSnap when locating sub-entities.

Reimplemented from DgnElementSetTool.

virtual bool _WantAdditionalSubEntities ( DgnButtonEventCR  ev)
protectedvirtual

A data button completes the tool if at least one sub-entity is selected. Allows ctrl+data to identify additional sub-entities.

virtual bool _WantDynamics ( )
overrideprotectedvirtual

Enable dynamics to use locate boresite to display sub-entity at the cursor location.

Reimplemented from DgnElementSetTool.

virtual bool _WantSubEntityDisplay ( )
protectedvirtual

Whether to display sub-entity dynamics and accepted sub-entities as view transients.

QvElem* CreateSubEntityQvElem ( ElementHandleCR  eh,
ISubEntityCR  subEntity,
ViewContextR  context 
)
protected

Return QvElem representing sub-entity geometry. NOTE: To be freed by caller with IViewOutput::DeleteCacheElement.

bool DoPickFace ( ElementHandleCR  eh,
ISubEntityCR  subEntity,
DgnButtonEventCR  ev,
bvector< DPoint3d > &  intersectPts,
bvector< DPoint2d > &  intersectParams 
)
protected

Boresite to a single face returning hit information.

bool DoPickSubEntities ( ElementHandleCR  eh,
DgnButtonEventCR  ev,
bvector< ISubEntityPtr > &  intersectEntities,
bvector< DPoint3d > &  intersectPts,
bvector< DPoint2d > &  intersectParams 
)
protected

Boresite to face/edge/vertex and return hit sub-entities.

bool DoPickSurfaces ( ElementHandleCR  eh,
DgnButtonEventCR  ev,
bvector< ISubEntityPtr > &  intersectEntities,
bvector< DPoint3d > &  intersectPts,
bvector< DPoint2d > &  intersectParams 
)
protected

Boresite to surfaces and return face hit information.

BentleyStatus EvaluateFace ( ISubEntityCR  subEntity,
DPoint3dR  point,
DVec3dR  normal,
DVec3dR  uDir,
DVec3dR  vDir,
DPoint2dCR  uvParam 
)
protected

Evaluate a uv parameter location on a sub-entity representing a face.

EditElementHandleP FindAgendaEntry ( ISubEntityCR  subEntity)
protected

Return entry from tool agenda that produced the supplied subEntity.

bvector<ISubEntityPtr>& GetAcceptedSubEntities ( )
protected

Return vector of accepted sub-entities.

bool GetClosestFace ( ElementHandleCR  eh,
DgnButtonEventCR  ev,
ISubEntityPtr closeEntity,
DPoint3dR  closePoint,
DPoint2dR  closeParam 
)
protected

Return closest face on element to supplied location.

DisplayPathPtr GetDisplayPath ( IElementGraphicsPtr geomPtr)
protected

Return the display path that produced the cached geometry.

BentleyStatus GetElementGraphicsCache ( ElementHandleCR  eh,
bvector< IElementGraphicsPtr > &  geomCache 
)
protected

Return vector of geometry collected by asking the element to draw itself (cached as ElementRefAppData).

size_t GetElementGraphicsCacheCount ( ElementHandleCR  eh)
protected

Convenience method to quickly return the size of the graphics cache. Modify tools typically require that there be only a single piece of geometry and nothing was excluded (IsGeometryMissing returns false).

BentleyStatus GetFaceParameterRange ( ISubEntityCR  subEntity,
DRange1dR  uRange,
DRange1dR  vRange 
)
protected

Get parameter range (uv box) for a sub-entity representing a face.

IElementGraphicsPtr GetIElementGraphicsPtr ( ISubEntityCR  subEntity)
protected

Return IElementGraphicsPtr entry that produced the supplied subEntity.

DisplayPathPtr GetLocatedComponentPath ( ElementHandleCR  eh)
protected

Return the display path to this top-level element's located component (_BuildLocateAgenda) when collecting geometry for complex components.

static void GetLocateInfo ( DPoint3dR  spacePoint,
DMatrix4dR  viewToLocal,
double &  maxDistance,
DgnButtonEventCR  ev,
DisplayPathCP  path 
)
static

Compute locate information from button event GetRawPoint (adjusted to eye). The spacePoint and maxDistance are returned in local coordinates of path.

static void GetSpacePoint ( DPoint3dR  spacePoint,
DgnButtonEventCR  ev,
DisplayPathCP  path 
)
static

Compute space point from button event GetPoint. The spacePoint is returned in local coordinates of path.

BentleyStatus GetSubEntityGeometry ( IGeometryPtr geom,
ISubEntityCR  subEntity 
)
protected

Get an IGeometryPtr that holds the geometric representation for the supplied sub-entity.

static void InitBoresite ( DRay3dR  boresite,
DPoint3dCR  spacePoint,
DMatrix4dCR  worldToLocal 
)
static

Compute boresite ray from space point and world to local matrix. (See GetLocateInfo).

bool IsFromLocatedComponent ( IElementGraphicsPtr geomPtr)
protected

Return whether this geometry was output from the same display path as the locate path (_BuildLocateAgenda) when collecting geometry for complex components.

bool IsGeometryMissing ( ElementHandleCR  eh)
protected

Return true if geometry cache does not contain all geometry output by this element. Geometry could have been filtered by type, or failed promotion to BRep, etc.

bool IsGeometrySheet ( IElementGraphicsPtr geomPtr)
protected

Return true if the geometry is or would be represented by a sheet body. Accepted geometry includes BRep sheets, un-capped SolidPrimitives, region CurveVectors, Bspline Surfaces, and unclosed Polyfaces.

bool IsGeometrySolid ( IElementGraphicsPtr geomPtr)
protected

Return true if the geometry is or would be represented by a solid body. Accepted geometry includes BRep solids, capped SolidPrimitves, and closed Polyfaces.

bool IsGeometryWire ( IElementGraphicsPtr geomPtr)
protected

Return true if the geometry is or would be represented by a wire body. Accepted geometry includes BRep wires and CurveVectors.

bool IsSolidKernelSubEntity ( ISubEntityCR  subEntity)
protected

Return true if the supplied subEntity represents an face, edge, or vertex of an ISolidKernelEntity and is valid for the solid modelling api.

void ResetSubEntityLocate ( )
protected

Clear result from prior locate to invalidate list reset uses to cycling between overlapping sub-entities. Does not affect accepted entities.

ISolidKernelEntityPtr TryGetAsBRep ( IElementGraphicsPtr geomPtr)
protected

Get a specific geometry type. Invalid ptr returned if geometry is not ISolidKernelEntityPtr.

bool TryGetAsCurveLocationDetail ( CurveLocationDetail location,
ISubEntityCR  subEntity 
)
protected

Return true if the supplied subEntity represents a CurveLocationDetail for an edge or vertex of a CurveVector, ISolidPrimitive, or MSBsplineSurface.

CurveVectorPtr TryGetAsCurveVector ( IElementGraphicsPtr geomPtr)
protected

Get a specific geometry type. Invalid ptr returned if geometry is not CurveVectorPtr.

bool TryGetAsFacetLocationDetail ( FacetLocationDetail location,
ISubEntityCR  subEntity 
)
protected

Return true if the supplied subEntity represents a FaceLocationDetail for an face, edge, or vertex of a PolyfaceHeader.

PolyfaceHeaderPtr TryGetAsPolyface ( IElementGraphicsPtr geomPtr)
protected

Get a specific geometry type. Invalid ptr returned if geometry is not PolyfaceHeaderPtr.

ISolidPrimitivePtr TryGetAsPrimitive ( IElementGraphicsPtr geomPtr)
protected

Get a specific geometry type. Invalid ptr returned if geometry is not ISolidPrimitivePtr.

bool TryGetAsSolidLocationDetail ( SolidLocationDetail location,
ISubEntityCR  subEntity 
)
protected

Return true if the supplied subEntity represents a SolidLocationDetail for the face of an ISolidPrimitive.

MSBsplineSurfacePtr TryGetAsSurface ( IElementGraphicsPtr geomPtr)
protected

Get a specific geometry type. Invalid ptr returned if geometry is not MSBsplineSurfacePtr.

Variable Documentation

bvector<ElementRefP> m_graphicsCache
protected

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.