SnapDetail Class
A SnapDetail is generated from the result of a snap request. In addition to the HitDetail about the reason the element was picked, it holds the exact point on the element from the snapping logic, plus additional information that varies with the type of element and snap mode.
Extends
Extended by
Methods
Name | Description | |
---|---|---|
constructor(from: HitDetail, snapMode: SnapModeSnapMode.Nearest, heat: SnapHeatSnapHeat.None, snapPoint?: XYZProps): SnapDetail | Constructor for SnapDetail. | |
clone(): SnapDetail | Make a copy of this SnapDetail. | |
draw(context: DecorateContext): void | Draw this HitDetail as a Decoration. | |
getCurvePrimitive(singleSegment: booleantrue): undefined | CurvePrimitive | ||
getHitType(): HitDetailType | Returns HitDetailType.Snap |
|
getPoint(): Point3d | Get the snap point if this SnapDetail is hot, the pick point otherwise. | |
setCurvePrimitive(primitive?: CurvePrimitive, localToWorld?: Transform, geomType?: HitGeomType): void | Set curve primitive and HitGeometryType for this SnapDetail. | |
setSnapPoint(point: Point3d, heat: SnapHeat): void | Change the snap point. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
getToolTip(): Promise<string | HTMLElement> | HitDetail | Get the tooltip content for this HitDetail. |
isSameHit(otherHit?: HitDetail): boolean | HitDetail | Determine if this HitPoint is from the same source as another HitDetail. |
Properties
Name | Type | Description | |
---|---|---|---|
adjustedPoint Readonly | Point3d | AccuSnap/AccuDraw can adjust the point after the snap. | |
geomType | HitGeomType | undefined | The HitGeomType of this SnapDetail | |
heat | SnapHeat | The SnapHeat of this SnapDetail | |
isHot Accessor ReadOnly | boolean | Return true if the pick point was closer than the snap aperture from the generated snap point. | |
isPointAdjusted Accessor ReadOnly | boolean | Determine whether the adjustedPoint is different than the snapPoint. | |
normal | Vector3d | undefined | Surface normal at snapPoint | |
parentGeomType | HitParentGeomType | undefined | The HitGeomType of this SnapDetail | |
primitive | CurvePrimitive | undefined | Curve primitive for snap. | |
snapMode | SnapMode | The SnapMode used to create this SnapDetail | |
snapPoint Readonly | Point3d | HitPoint adjusted by snap | |
sprite | Sprite | undefined | A sprite to show the user the type of snap performed |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
distFraction Accessor ReadOnly | number | HitDetail | The distance in view coordinates between the hit and the near plane. |
distXY Accessor ReadOnly | number | HitDetail | The xy distance to the hit in view coordinates. |
geometryClass Accessor ReadOnly | undefined | GeometryClass | HitDetail | The class of the hit geometry. |
hitPoint Accessor ReadOnly | Point3d | HitDetail | The approximate location in world coordinates on the geometry identified by this HitDetail. |
hitSource Accessor ReadOnly | HitSource | HitDetail | The procedure that requested the locate operation. |
iModel Accessor ReadOnly | IModelConnection | HitDetail | The IModelConnection from which the hit originated. In some cases this may not be the same as the iModel associated with the Viewport - for example, if a TiledGraphicsProvider is used to display graphics from a different iModel in the viewport. This HitDetail's element, subcategory, and model Ids are defined in the context of this IModelConnection. |
isElementHit Accessor ReadOnly | boolean | HitDetail | Return whether sourceId is for a persistent element and not a pickable decoration. |
isExternalIModelHit Accessor ReadOnly | boolean | HitDetail | Returns true if this hit originated from an IModelConnection other than the one associated with the Viewport. |
isMapHit Accessor ReadOnly | boolean | HitDetail | |
isModelHit Accessor ReadOnly | boolean | HitDetail | |
modelId Accessor ReadOnly | undefined | string | HitDetail | The Id of the ModelState from which the hit originated. |
path Accessor ReadOnly | undefined | HitPath | HitDetail | Describes the path by which the hit was located through a series of attached views. |
priority Accessor ReadOnly | HitPriority | HitDetail | The hit geometry priority/classification. |
sourceId Accessor ReadOnly | string | HitDetail | The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. |
subCategoryId Accessor ReadOnly | undefined | string | HitDetail | The SubCategory to which the hit geometry belongs. |
testPoint Accessor ReadOnly | Point3d | HitDetail | The point in world coordinates that was used as the initial locate point. |
viewAttachment Accessor ReadOnly | undefined | ViewAttachmentHitInfo | HitDetail | Information about the ViewAttachment within which the hit geometry resides, if any. |
viewport Accessor ReadOnly | ScreenViewport | HitDetail | The viewport in which the locate operation was performed. |
Defined in
Last Updated: 13 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.