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.
extensions
Extends
Extended by
Methods
Name | Description | |
---|---|---|
constructor(from: HitDetail, snapMode: SnapMode = SnapMode.Nearest, heat: SnapHeat = SnapHeat.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: boolean = true): 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 | undefined | HitGeomType | The HitGeomType of this SnapDetail | |
heat | SnapHeat | ||
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 SnapDetail.adjustedPoint is different than the SnapDetail.snapPoint. | |
normal | undefined | Vector3d | Surface normal at snapPoint | |
parentGeomType | undefined | HitParentGeomType | The HitGeomType of this SnapDetail | |
primitive | undefined | CurvePrimitive | Curve primitive for snap. | |
snapMode | SnapMode | ||
snapPoint Readonly | Point3d | HitPoint adjusted by snap | |
sprite | undefined | Sprite | A sprite to show the user the type of snap performed |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
distFraction Readonly | number | HitDetail | |
distXY Readonly | number | HitDetail | |
geometryClass Readonly | undefined | GeometryClass | HitDetail | |
hitPoint Readonly | Point3d | HitDetail | |
hitSource Readonly | HitSource | HitDetail | |
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 Readonly | undefined | string | HitDetail | |
priority Readonly | HitPriority | HitDetail | |
sourceId Readonly | string | HitDetail | |
subCategoryId Readonly | undefined | string | HitDetail | |
testPoint Readonly | Point3d | HitDetail | |
viewport Readonly | ScreenViewport | HitDetail |
Defined in
- core/frontend/src/HitDetail.ts Line 202
Last Updated: 30 November, 2023