Namespaces | Functions
HitPaths

Namespaces

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

Functions

StatusInt mdlHitPath_Linear_getParameters (HitPathCP path, DSegment3dP hitSeg, int *vertex, int *segmentNumber)
 HitPathFuncs ( mdlHitPath_getView, mdlHitPath_getHitPoint, mdlHitPath_getSource, mdlHitPath_Linear_getParameters, mdlHitPath_Multiline_getParameters, mdlHitPath_BSpline_getParameters, mdlHitPath_Dimension_getParameters ) More...
 
StatusInt mdlHitPath_Multiline_getParameters (HitPathCP path, DSegment3dP hitSeg, int *vertex, int *segmentNumber, int *lineNumber, int *capNumber, int *patIndex)
 Get the parameters from a DgnPlatform::HitPath, iff it is a hit of a Multiline element. More...
 
StatusInt mdlHitPath_Dimension_getParameters (HitPathCP path, UInt32 *partName, int *pointNo, UInt32 *segment, UInt32 *partType, UInt32 *partSubType)
 Get the parameters from a Hitpath, iff it is a hit of a Dimension. More...
 
StatusInt mdlHitPath_BSpline_getParameters (HitPathCP path, double *u, double *v)
 Get the parameters from a Hitpath, iff it is a hit of a Bspline. More...
 
void mdlHitPath_getHitPoint (HitPathCP path, DPoint3dR hitPoint)
 Get the Hit Point (the point on the element closest to the test point) for this hitpath. More...
 
DgnPlatform::HitSource mdlHitPath_getSource (HitPathCP path)
 Get the source for this DgnPlatform::HitPath. More...
 
int mdlHitPath_getView (HitPathCP path)
 Get the viewNumber of the view that was used to generate this DgnPlatform::HitPath. More...
 
void mdlHitPath_setHitPoint (HitPathCP path, DPoint3dCP newPoint)
 Change the Hit Point for this DgnPlatform::HitPath. More...
 
void mdlHitPath_setSource (HitPathCP path, DgnPlatform::HitSource source)
 Change the source for this DgnPlatform::HitPath. More...
 
DPoint3dCP mdlSnapPath_getSnapPoint (SnapPathCP path)
 Get the snapped point from the snap path. More...
 
DPoint3dCP mdlSnapPath_getAdjustedPoint (SnapPathP path)
 Get the snapped point from the snap path. More...
 

Detailed Description

Hit Paths

MicroStation's internal Element Picking logic finds all elements in a view that are near a test point. The each element within the Search Tolerance of the test point generates a Hit. Hits are stored in a sorted list called a Hit List. Each entry in the Hit List is a DgnPlatform::HitPath.

HitPaths include all of the information of ~s"Display Paths" . In addition to the full path of the element that caused the Hit, they hold:

The most common way to obtain a DgnPlatform::HitPath is to query the ~s"Current Hit" .

Function Documentation

StatusInt mdlHitPath_BSpline_getParameters ( HitPathCP  path,
double *  u,
double *  v 
)

Get the parameters from a Hitpath, iff it is a hit of a Bspline.

Parameters
[in]paththe path of interest.
[out]uu
[out]vv
Returns
SUCCESS or ERROR
See also
mdlLocate_BSpline_getParameters
StatusInt mdlHitPath_Dimension_getParameters ( HitPathCP  path,
UInt32 partName,
int *  pointNo,
UInt32 segment,
UInt32 partType,
UInt32 partSubType 
)

Get the parameters from a Hitpath, iff it is a hit of a Dimension.

Parameters
[in]paththe path of interest.
[out]partNamecomplete part identifier for part of dimension located, use ADIM_GETTYPE, ADIM_GETSUB and ADIM_GETSEG to decompose.
[out]pointNoClosest point on dimension element.
[out]segmentSelected dimension segment.
[out]partTypeType of selected part of dim, one of ADTYPE_xxx defined in mdldim.h.
[out]partSubTypeSub Type of selected part of dim, one of ADSUB_xxx defined in mdldim.h.
Returns
SUCCESS or ERROR
See also
mdlLocate_Dimension_getParameters
void mdlHitPath_getHitPoint ( HitPathCP  path,
DPoint3dR  hitPoint 
)

Get the Hit Point (the point on the element closest to the test point) for this hitpath.

The point is in world coordinates for the view (that is,the coordinate system of the ModelRef of the view) that generated the hit.

Parameters
[in]paththe path of interest.
[out]hitPointthe hit point for this path.
See also
mdlHitPath_setHitPoint
DgnPlatform::HitSource mdlHitPath_getSource ( HitPathCP  path)

Get the source for this DgnPlatform::HitPath.

Parameters
[in]paththe path of interest.
Returns
the source for this DgnPlatform::HitPath.
int mdlHitPath_getView ( HitPathCP  path)

Get the viewNumber of the view that was used to generate this DgnPlatform::HitPath.

Parameters
[in]paththe path of interest.
Returns
The viewNumber of the view that was used to generate this DgnPlatform::HitPath.
StatusInt mdlHitPath_Linear_getParameters ( HitPathCP  path,
DSegment3dP  hitSeg,
int *  vertex,
int *  segmentNumber 
)

HitPathFuncs ( mdlHitPath_getView, mdlHitPath_getHitPoint, mdlHitPath_getSource, mdlHitPath_Linear_getParameters, mdlHitPath_Multiline_getParameters, mdlHitPath_BSpline_getParameters, mdlHitPath_Dimension_getParameters )

Get the parameters from a DgnPlatform::HitPath, iff it is a hit of a linear element

Parameters
[in]paththe path of interest.
[out]hitSegthe coordinates of the segment on the element that caused the hit.
[out]vertexthe vertex number of the closest vertex to the test point
[out]segmentNumberthe segment number of hitSeg.
Returns
SUCCESS or ERROR
See also
mdlLocate_Linear_getParameters
StatusInt mdlHitPath_Multiline_getParameters ( HitPathCP  path,
DSegment3dP  hitSeg,
int *  vertex,
int *  segmentNumber,
int *  lineNumber,
int *  capNumber,
int *  patIndex 
)

Get the parameters from a DgnPlatform::HitPath, iff it is a hit of a Multiline element.

Parameters
[in]paththe path of interest.
[out]hitSegthe coordinates of the segment on the element that caused the hit.
[out]vertexthe vertex number of the closest vertex to the test point
[out]segmentNumberthe segment number of hitSeg.
[out]lineNumberthe work line within the multiline.
[out]capNumberthe cap number on the multiline.
[out]patIndexpattern index.
See also
mdlLocate_Multiline_getParameters
Returns
SUCCESS or ERROR
void mdlHitPath_setHitPoint ( HitPathCP  path,
DPoint3dCP  newPoint 
)

Change the Hit Point for this DgnPlatform::HitPath.

This function should be used with care, since it will make future queries of this DgnPlatform::HitPath appear at the new point.

Parameters
[in]paththe path of interest.
[in]newPointthe new HitPoint for this DgnPlatform::HitPath.
See also
mdlHitPath_getHitPoint
void mdlHitPath_setSource ( HitPathCP  path,
DgnPlatform::HitSource  source 
)

Change the source for this DgnPlatform::HitPath.

Parameters
[in]paththe path of interest.
[in]sourcethe new source for this DgnPlatform::HitPath.
DPoint3dCP mdlSnapPath_getAdjustedPoint ( SnapPathP  path)

Get the snapped point from the snap path.

SnapPaths can be adjusted by external influences, like Accudraw.

Parameters
[in]paththe snapPath of interest.
Returns
snapped point from the snap path.
DPoint3dCP mdlSnapPath_getSnapPoint ( SnapPathCP  path)

Get the snapped point from the snap path.

This can be different than the adjusted point.

Returns
Snapped point from the snap path.
Parameters
[in]paththe snapPath of interest.

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