@itwin/core-frontend 5.0.0-dev.104 → 5.0.0-dev.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/AccuSnap.d.ts +1 -0
- package/lib/cjs/AccuSnap.d.ts.map +1 -1
- package/lib/cjs/AccuSnap.js +72 -1
- package/lib/cjs/AccuSnap.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +4 -1
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +7 -0
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.d.ts +0 -12
- package/lib/cjs/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +2 -60
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/AccuSnap.d.ts +1 -0
- package/lib/esm/AccuSnap.d.ts.map +1 -1
- package/lib/esm/AccuSnap.js +73 -2
- package/lib/esm/AccuSnap.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +4 -1
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +7 -0
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/tools/AccuDrawTool.d.ts +0 -12
- package/lib/esm/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +3 -60
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/public/locales/en/CoreTools.json +0 -5
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/public/sprites/SnapPerpendicularPoint.png +0 -0
- package/lib/public/sprites/SnapTangentPoint.png +0 -0
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HitDetail.d.ts","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,E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GAAG,SAAS;IAO5C,uFAAuF;IAChF,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI;IAMzC,SAAS,IAAI,IAAI;IAOjB,UAAU,IAAI,CAAC,GAAG,SAAS;IAK3B,aAAa,IAAI,CAAC,GAAG,SAAS;IAE9B,aAAa,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI;IAQlC,4CAA4C;IACrC,gBAAgB;IAEvB,gCAAgC;IACzB,SAAS,CAAC,MAAM,EAAE,MAAM;IAa/B,mFAAmF;IAC5E,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAchD,OAAO,CAAC,oBAAoB;IAgB5B,gDAAgD;IACzC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAkCpF,2FAA2F;IACpF,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM;IAiBhC,4DAA4D;IACrD,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI;CAM1C"}
|
package/lib/cjs/HitDetail.js
CHANGED
|
@@ -27,6 +27,7 @@ var SnapMode;
|
|
|
27
27
|
SnapMode[SnapMode["Origin"] = 16] = "Origin";
|
|
28
28
|
SnapMode[SnapMode["Bisector"] = 32] = "Bisector";
|
|
29
29
|
SnapMode[SnapMode["Intersection"] = 64] = "Intersection";
|
|
30
|
+
SnapMode[SnapMode["PerpendicularPoint"] = 128] = "PerpendicularPoint";
|
|
30
31
|
})(SnapMode || (exports.SnapMode = SnapMode = {}));
|
|
31
32
|
/**
|
|
32
33
|
* @public
|
|
@@ -302,6 +303,11 @@ class SnapDetail extends HitDetail {
|
|
|
302
303
|
this.adjustedPoint.setFrom(point);
|
|
303
304
|
this.heat = heat;
|
|
304
305
|
}
|
|
306
|
+
/** Change the snap mode. */
|
|
307
|
+
setSnapMode(snapMode) {
|
|
308
|
+
this.snapMode = snapMode;
|
|
309
|
+
this.sprite = Sprites_1.IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));
|
|
310
|
+
}
|
|
305
311
|
/** Set curve primitive and HitGeometryType for this SnapDetail. */
|
|
306
312
|
setCurvePrimitive(primitive, localToWorld, geomType) {
|
|
307
313
|
this.primitive = primitive;
|
|
@@ -393,6 +399,7 @@ class SnapDetail extends HitDetail {
|
|
|
393
399
|
case SnapMode.Origin: return `${IModelApp_1.IModelApp.publicPath}sprites/SnapOrigin.png`;
|
|
394
400
|
case SnapMode.Bisector: return `${IModelApp_1.IModelApp.publicPath}sprites/SnapBisector.png`;
|
|
395
401
|
case SnapMode.Intersection: return `${IModelApp_1.IModelApp.publicPath}sprites/SnapIntersection.png`;
|
|
402
|
+
case SnapMode.PerpendicularPoint: return `${IModelApp_1.IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;
|
|
396
403
|
}
|
|
397
404
|
return "";
|
|
398
405
|
}
|
package/lib/cjs/HitDetail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HitDetail.js","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA+D;AAC/D,wDAAwI;AACxI,oDAA+D;AAC/D,2CAAwC;AAExC,uCAAgD;AAGhD,6DAA0D;AAE1D;;;GAGG;AACH,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,6CAAW,CAAA;IACX,6DAAwB,CAAA;IACxB,+CAAiB,CAAA;IACjB,2CAAe,CAAA;IACf,4CAAe,CAAA;IACf,gDAAiB,CAAA;IACjB,wDAAqB,CAAA;AACvB,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED;;;GAGG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,mDAAc,CAAA;IACd,6C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M;YAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAEpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;CACF;AA9JD,0BA8JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module LocatingElements\n */\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Arc3d, CurvePrimitive, LineSegment3d, LineString3d, Path, Point3d, Transform, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { GeometryClass, LinePixels } from \"@itwin/core-common\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IconSprites, Sprite } from \"./Sprites\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport, Viewport } from \"./Viewport\";\nimport { GraphicType } from \"./common/render/GraphicType\";\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapMode {\n Nearest = 1,\n NearestKeypoint = 1 << 1,\n MidPoint = 1 << 2,\n Center = 1 << 3,\n Origin = 1 << 4,\n Bisector = 1 << 5,\n Intersection = 1 << 6,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapHeat {\n None = 0,\n NotInRange = 1, // \"of interest\", but out of range\n InRange = 2,\n}\n\n/** The procedure that generated this Hit.\n * @public\n * @extensions\n */\nexport enum HitSource {\n None = 0,\n FromUser = 1,\n MotionLocate = 2,\n AccuSnap = 3,\n TentativeSnap = 4,\n DataPoint = 5,\n Application = 6,\n EditAction = 7,\n EditActionSS = 8,\n}\n\n/** What was being tested to generate this hit. This is not the element or\n * GeometricPrimitive that generated the Hit, it is an indication of whether it is an edge or interior hit.\n * @public\n * @extensions\n */\nexport enum HitGeomType {\n None = 0,\n Point = 1,\n Segment = 2,\n Curve = 3,\n Arc = 4,\n Surface = 5,\n}\n\n/** Classification of GeometricPrimitive that generated the Hit.\n * @public\n * @extensions\n */\nexport enum HitParentGeomType {\n None = 0,\n Wire = 1,\n Sheet = 2,\n Solid = 3,\n Mesh = 4,\n Text = 5,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitPriority {\n WireEdge = 0,\n PlanarEdge = 1,\n NonPlanarEdge = 2,\n SilhouetteEdge = 3,\n PlanarSurface = 4,\n NonPlanarSurface = 5,\n Unknown = 6,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitDetailType {\n Hit = 1,\n Snap = 2,\n Intersection = 3,\n}\n\n/** As part of a [[HitPath]], describes the [ViewAttachment]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface ViewAttachmentHitInfo {\n /** The element Id of the [ViewAttachment]($backend) from which the hit originated. */\n readonly id: Id64String;\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitPath]], describes the [SectionDrawing]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface SectionDrawingAttachmentHitInfo {\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitDetail]], describes a series of \"attached\" views through which the hit was located.\n * Typically, the contents of a view are rendered directly to the screen via [[HitDetail.viewport]].\n * However, in some contexts one view might be \"attached\" to the viewport's view via a [ViewAttachment]($backend), [SectionDrawing]($backend), or both.\n * HitPath captures this information in one of the following possible ways:\n * 1. A [[SheetViewState]] renders another view through a [ViewAttachment]($backend), in which case [[viewAttachment]] will be defined.\n * 2. A [[DrawingViewState]] renders a [[SpatialViewState]] through a [SectionDrawing]($backend) attachment, in which case [[sectionDrawingAttachment]] will be defined; or\n * 3. A combination of 1 and 2 where a [ViewAttachment]($backend) on a sheet renders a [SectionDrawing]($backend) with an attached [[SpatialViewState]], in which both [viewAttachment]] and [[sectionDrawingAttachment]] will be defined.\n * @beta\n */\nexport interface HitPath {\n /** Details about the [ViewAttachment]($backend) through which the hit was obtained. */\n viewAttachment?: ViewAttachmentHitInfo;\n /** Details about the [SectionDrawing]($backend) attachment through which the hit was obtained. */\n sectionDrawingAttachment?: SectionDrawingAttachmentHitInfo;\n};\n\n/** Arguments supplied to the [[HitDetail]] constructor.\n * @public\n */\nexport interface HitDetailProps {\n /** The point in world coordinates that was used as the initial locate point. */\n readonly testPoint: Point3d;\n /** The viewport in which the locate operation was performed. */\n readonly viewport: ScreenViewport;\n /** The procedure that requested the locate operation. */\n readonly hitSource: HitSource;\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n readonly hitPoint: Point3d;\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n readonly sourceId: Id64String;\n /** The hit geometry priority/classification. */\n readonly priority: HitPriority;\n /** The xy distance to the hit in view coordinates. */\n readonly distXY: number;\n /** The distance in view coordinates between the hit and the near plane. */\n readonly distFraction: number;\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n readonly subCategoryId?: Id64String;\n /** The class of the hit geometry. */\n readonly geometryClass?: GeometryClass;\n /** The Id of the [[ModelState]] from which the hit originated. */\n readonly modelId?: string;\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n readonly sourceIModel?: IModelConnection;\n /** @internal */\n readonly transformFromSourceIModel?: Transform;\n /** @internal chiefly for debugging */\n readonly tileId?: string;\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n readonly isClassifier?: boolean;\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n readonly path?: HitPath;\n}\n\n/** A HitDetail stores the result when locating geometry displayed in a view.\n * It holds an approximate location on an element (or decoration) from a *pick*.\n * @public\n * @extensions\n */\nexport class HitDetail {\n private readonly _props: HitDetailProps;\n\n /** The point in world coordinates that was used as the initial locate point. */\n public get testPoint(): Point3d { return this._props.testPoint; }\n /** The viewport in which the locate operation was performed. */\n public get viewport(): ScreenViewport { return this._props.viewport; }\n /** The procedure that requested the locate operation. */\n public get hitSource(): HitSource { return this._props.hitSource; }\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n public get hitPoint(): Point3d { return this._props.hitPoint; }\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n public get sourceId(): Id64String { return this._props.sourceId; }\n /** The hit geometry priority/classification. */\n public get priority(): HitPriority { return this._props.priority; }\n /** The xy distance to the hit in view coordinates. */\n public get distXY(): number { return this._props.distXY; }\n /** The distance in view coordinates between the hit and the near plane. */\n public get distFraction(): number { return this._props.distFraction; }\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n public get subCategoryId(): Id64String | undefined { return this._props.subCategoryId; }\n /** The class of the hit geometry. */\n public get geometryClass(): GeometryClass | undefined { return this._props.geometryClass; }\n /** The Id of the [[ModelState]] from which the hit originated. */\n public get modelId(): string | undefined { return this._props.modelId; }\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n public get sourceIModel(): IModelConnection | undefined { return this._props.sourceIModel; }\n /** @internal */\n public get transformFromSourceIModel(): Transform | undefined { return this._props.transformFromSourceIModel; }\n /** @internal chiefly for debugging */\n public get tileId(): string | undefined { return this._props.tileId; }\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n public get isClassifier(): boolean | undefined { return this._props.isClassifier; }\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\n * @note Only [[SheetViewState]]s can have view attachments.\n * @beta\n */\n public get viewAttachment(): ViewAttachmentHitInfo | undefined { return this._props.path?.viewAttachment; }\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n public get path(): HitPath | undefined { return this._props.path; }\n\n /** Create a new HitDetail from the inputs to and results of a locate operation. */\n public constructor(props: HitDetailProps);\n\n /** @deprecated in 4.1. Use the overload that takes a [[HitDetailProps]]. */\n public constructor(testPoint: Point3d, viewport: ScreenViewport, hitSource: HitSource, hitPoint: Point3d, sourceId: string, priority: HitPriority, distXY: number, distFraction: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean);\n\n /** @internal */\n public constructor(arg0: Point3d | HitDetailProps, viewport?: ScreenViewport, hitSource?: HitSource, hitPoint?: Point3d, sourceId?: string, priority?: HitPriority, distXY?: number, distFraction?: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean) {\n if (arg0 instanceof Point3d) {\n assert(undefined !== viewport && undefined !== hitSource && undefined !== hitPoint && undefined !== sourceId);\n assert(undefined !== priority && undefined !== distXY && undefined !== distFraction);\n\n this._props = {\n testPoint: arg0,\n viewport,\n hitSource,\n hitPoint,\n sourceId,\n priority,\n distXY,\n distFraction,\n subCategoryId,\n geometryClass,\n modelId,\n sourceIModel,\n tileId,\n isClassifier,\n };\n } else {\n // Ignore an empty path.\n const path = arg0.path?.sectionDrawingAttachment || arg0.path?.viewAttachment ? arg0.path : undefined;\n\n // Tempting to use { ...arg0 } but spread operator omits getters so, e.g., if input is a HitDetail we would lose all the properties.\n this._props = {\n testPoint: arg0.testPoint,\n viewport: arg0.viewport,\n hitSource: arg0.hitSource,\n hitPoint: arg0.hitPoint,\n sourceId: arg0.sourceId,\n priority: arg0.priority,\n distXY: arg0.distXY,\n distFraction: arg0.distFraction,\n subCategoryId: arg0.subCategoryId,\n geometryClass: arg0.geometryClass,\n modelId: arg0.modelId,\n sourceIModel: arg0.sourceIModel,\n transformFromSourceIModel: arg0.transformFromSourceIModel,\n tileId: arg0.tileId,\n isClassifier: arg0.isClassifier,\n path,\n };\n }\n }\n\n /** Get the type of HitDetail.\n * @returns HitDetailType.Hit if this is a HitDetail, HitDetailType.Snap if it is a SnapDetail\n */\n public getHitType(): HitDetailType { return HitDetailType.Hit; }\n\n /** Get the *hit point* for this HitDetail. Returns the approximate point on the element that caused the hit when not a SnapDetail or IntersectDetail.\n * For a snap that is *hot*, the *exact* point on the Element for the snap mode is returned, otherwise the close point on the hit geometry is returned.\n */\n public getPoint(): Point3d { return this.hitPoint; }\n\n /** Determine if this HitPoint is from the same source as another HitDetail. */\n public isSameHit(otherHit?: HitDetail): boolean { return (undefined !== otherHit && this.sourceId === otherHit.sourceId && this.iModel === otherHit.iModel); }\n /** Return whether sourceId is for a persistent element and not a pickable decoration. */\n public get isElementHit(): boolean { return !Id64.isInvalid(this.sourceId) && !Id64.isTransient(this.sourceId); }\n // return whether the sourceId is for a model (reality models etc.)\n public get isModelHit(): boolean {\n return this.modelId === this.sourceId;\n }\n // return whether the hit point is from map.\n public get isMapHit(): boolean { return 0 !== this.viewport.mapLayerFromHit(this).length; }\n\n /** Create a deep copy of this HitDetail */\n public clone(): HitDetail {\n return new HitDetail(this);\n }\n\n /** Draw this HitDetail as a Decoration. Causes the picked element to *flash* */\n public draw(_context: DecorateContext) {\n this.viewport.flashedId = this.sourceId;\n }\n\n /** Get the tooltip content for this HitDetail. */\n public async getToolTip(): Promise<HTMLElement | string> {\n let toolTipPromise = this.isElementHit ? IModelApp.viewManager.overrideElementToolTip(this) : IModelApp.viewManager.getDecorationToolTip(this);\n for (const toolTipProvider of IModelApp.viewManager.toolTipProviders)\n toolTipPromise = toolTipProvider.augmentToolTip(this, toolTipPromise);\n return toolTipPromise;\n }\n\n /** The IModelConnection from which the hit originated. In some cases this may not be the same as the iModel associated with the Viewport -\n * for example, if a [[TiledGraphicsProvider]] is used to display graphics from a different iModel in the viewport.\n * This HitDetail's element, subcategory, and model Ids are defined in the context of this IModelConnection.\n */\n public get iModel(): IModelConnection {\n return this.sourceIModel ?? this.viewport.iModel;\n }\n\n /** Returns true if this hit originated from an [[IModelConnection]] other than the one associated with the [[Viewport]].\n * @see [[iModel]].\n */\n public get isExternalIModelHit(): boolean {\n return this.iModel !== this.viewport.iModel;\n }\n}\n\n/** A SnapDetail is generated from the result of a snap request. In addition to the HitDetail about the reason the element was *picked*,\n * 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.\n * @public\n * @extensions\n */\nexport class SnapDetail extends HitDetail {\n /** A sprite to show the user the type of snap performed */\n public sprite?: Sprite;\n /** HitPoint adjusted by snap */\n public readonly snapPoint: Point3d;\n /** AccuSnap/AccuDraw can adjust the point after the snap. */\n public readonly adjustedPoint: Point3d;\n /** Curve primitive for snap. */\n public primitive?: CurvePrimitive;\n /** Surface normal at snapPoint */\n public normal?: Vector3d;\n /** The HitGeomType of this SnapDetail */\n public geomType?: HitGeomType;\n /** The HitGeomType of this SnapDetail */\n public parentGeomType?: HitParentGeomType;\n\n /** Constructor for SnapDetail.\n * @param from The HitDetail that created this snap\n * @param snapMode The SnapMode used to create this SnapDetail\n * @param heat The SnapHeat of this SnapDetail\n * @param snapPoint The snapped point in the element\n */\n public constructor(from: HitDetail, public snapMode: SnapMode = SnapMode.Nearest, public heat: SnapHeat = SnapHeat.None, snapPoint?: XYZProps) {\n super(from);\n this.snapPoint = Point3d.fromJSON(snapPoint ? snapPoint : from.hitPoint);\n this.adjustedPoint = this.snapPoint.clone();\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Returns `HitDetailType.Snap` */\n public override getHitType(): HitDetailType { return HitDetailType.Snap; }\n /** Get the snap point if this SnapDetail is *hot*, the pick point otherwise. */\n public override getPoint(): Point3d { return this.isHot ? this.snapPoint : super.getPoint(); }\n /** Return true if the pick point was closer than the snap aperture from the generated snap point. */\n public get isHot(): boolean { return this.heat !== SnapHeat.None; }\n /** Determine whether the [[adjustedPoint]] is different than the [[snapPoint]]. This happens, for example, when points are adjusted for grids, acs plane snap, and AccuDraw. */\n public get isPointAdjusted(): boolean { return !this.adjustedPoint.isExactEqual(this.snapPoint); }\n /** Change the snap point. */\n public setSnapPoint(point: Point3d, heat: SnapHeat) {\n this.snapPoint.setFrom(point);\n this.adjustedPoint.setFrom(point);\n this.heat = heat;\n }\n\n /** Set curve primitive and HitGeometryType for this SnapDetail. */\n public setCurvePrimitive(primitive?: CurvePrimitive, localToWorld?: Transform, geomType?: HitGeomType): void {\n this.primitive = primitive;\n this.geomType = undefined;\n\n // Only HitGeomType.Point and HitGeomType.Surface are valid without a curve primitive.\n if (undefined === this.primitive) {\n if (HitGeomType.Point === geomType || HitGeomType.Surface === geomType)\n this.geomType = geomType;\n return;\n }\n\n if (undefined !== localToWorld)\n this.primitive.tryTransformInPlace(localToWorld);\n\n if (this.primitive instanceof Arc3d)\n this.geomType = HitGeomType.Arc;\n else if (this.primitive instanceof LineSegment3d)\n this.geomType = HitGeomType.Segment;\n else if (this.primitive instanceof LineString3d)\n this.geomType = HitGeomType.Segment;\n else\n this.geomType = HitGeomType.Curve;\n\n // Set curve primitive geometry type override...\n // - HitGeomType.Point with arc/ellipse denotes center.\n // - HitGeomType.Surface with any curve primitive denotes an interior hit.\n if (undefined !== geomType && HitGeomType.None !== geomType)\n this.geomType = geomType;\n }\n\n /** Make a copy of this SnapDetail. */\n public override clone(): SnapDetail {\n const val = new SnapDetail(this, this.snapMode, this.heat, this.snapPoint);\n val.sprite = this.sprite;\n val.geomType = this.geomType;\n val.parentGeomType = this.parentGeomType;\n val.adjustedPoint.setFrom(this.adjustedPoint);\n if (undefined !== this.primitive)\n val.primitive = this.primitive.clone();\n if (undefined !== this.normal)\n val.normal = this.normal.clone();\n return val;\n }\n\n public getCurvePrimitive(singleSegment: boolean = true): CurvePrimitive | undefined {\n if (!singleSegment || undefined === this.primitive)\n return this.primitive;\n\n if (this.primitive instanceof LineString3d) {\n const ls = this.primitive;\n if (ls.points.length > 2) {\n const loc = ls.closestPoint(this.snapPoint, false);\n const nSegments = ls.points.length - 1;\n const uSegRange = (1.0 / nSegments);\n let segmentNo = Math.floor(loc.fraction / uSegRange);\n if (segmentNo >= nSegments)\n segmentNo = nSegments - 1;\n return LineSegment3d.create(ls.points[segmentNo], ls.points[segmentNo + 1]);\n }\n }\n\n return this.primitive;\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive) {\n let singleSegment = false;\n switch (this.snapMode) {\n case SnapMode.Center:\n case SnapMode.Origin:\n case SnapMode.Bisector:\n break; // Snap point for these is computed using entire linestring, not just the hit segment...\n\n default: {\n singleSegment = true;\n break;\n }\n }\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path = Path.create(this.getCurvePrimitive(singleSegment)!);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n\n private static getSnapSpriteUrl(snapType: SnapMode): string {\n switch (snapType) {\n case SnapMode.Nearest: return `${IModelApp.publicPath}sprites/SnapPointOn.png`;\n case SnapMode.NearestKeypoint: return `${IModelApp.publicPath}sprites/SnapKeypoint.png`;\n case SnapMode.MidPoint: return `${IModelApp.publicPath}sprites/SnapMidpoint.png`;\n case SnapMode.Center: return `${IModelApp.publicPath}sprites/SnapCenter.png`;\n case SnapMode.Origin: return `${IModelApp.publicPath}sprites/SnapOrigin.png`;\n case SnapMode.Bisector: return `${IModelApp.publicPath}sprites/SnapBisector.png`;\n case SnapMode.Intersection: return `${IModelApp.publicPath}sprites/SnapIntersection.png`;\n }\n return \"\";\n }\n}\n\n/**\n * @public\n * @extensions\n */\nexport class IntersectDetail extends SnapDetail {\n public constructor(from: SnapDetail, heat: SnapHeat = SnapHeat.None, snapPoint: XYZProps, public readonly otherPrimitive: CurvePrimitive, public readonly otherId: string) {\n super(from, SnapMode.Intersection, heat, snapPoint);\n this.primitive = from.primitive;\n this.normal = from.normal; // Preserve normal from primary snap location for AccuDraw smart rotation...\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive && undefined !== this.otherPrimitive) {\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path1 = Path.create(this.primitive);\n const path2 = Path.create(this.otherPrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path1);\n builder.addPath(path2);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path1);\n builder.setSymbology(centerLine, centerLine, 2, LinePixels.Code2);\n builder.addPath(path2);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n}\n\n/** The result of a \"locate\" is a sorted list of objects that satisfied the search criteria (a HitList). Earlier hits in the list\n * are somehow *better* than those later on.\n * @public\n * @extensions\n */\nexport class HitList<T extends HitDetail> {\n public hits: T[] = [];\n public currHit = -1;\n public get length(): number { return this.hits.length; }\n public empty(): void {\n this.hits.length = 0;\n this.currHit = -1;\n }\n\n public resetCurrentHit(): void { this.currHit = -1; }\n\n /** Get a hit from a particular index into a HitList\n * return the requested hit from the HitList or undefined\n */\n public getHit(hitNum: number): T | undefined {\n if (hitNum < 0)\n hitNum = this.length - 1;\n\n return (hitNum >= this.length) ? undefined : this.hits[hitNum];\n }\n\n /** When setting one or more indices to undefined you must call dropNulls afterwards */\n public setHit(i: number, p: T | undefined): void {\n if (i < 0 || i >= this.length)\n return;\n this.hits[i] = p!;\n }\n\n public dropNulls(): void {\n const hits = this.hits;\n this.hits = [];\n for (const hit of hits)\n this.hits.push(hit);\n }\n\n public getNextHit(): T | undefined {\n this.currHit++;\n return this.getCurrentHit();\n }\n\n public getCurrentHit(): T | undefined { return -1 === this.currHit ? undefined : this.getHit(this.currHit); }\n\n public setCurrentHit(hit: T): void {\n this.resetCurrentHit();\n for (let thisHit; undefined !== (thisHit = this.getNextHit());) {\n if (thisHit === hit)\n return;\n }\n }\n\n /** remove the current hit from the list. */\n public removeCurrentHit() { this.removeHit(this.currHit); }\n\n /** remove a hit in the list. */\n public removeHit(hitNum: number) {\n if (hitNum < 0) // Support -1 == END\n hitNum = this.length - 1;\n\n if (hitNum <= this.currHit)\n this.currHit = -1;\n\n if (hitNum >= this.length) // Locate calls GetNextHit, which increments currHit, until it goes beyond the end of size of the array.\n return; // Then Reset call RemoteCurrentHit, which passes in currHit. When it is out of range, we do nothing.\n\n this.hits.splice(hitNum, 1);\n }\n\n /** search through list and remove any hits that contain a specified element id. */\n public removeHitsFrom(sourceId: string): boolean {\n let removedOne = false;\n\n // walk backwards through list so we don't have to worry about what happens on remove\n for (let i = this.length - 1; i >= 0; i--) {\n const thisHit = this.hits[i];\n if (thisHit && sourceId === thisHit.sourceId) {\n removedOne = true;\n this.removeHit(i);\n }\n }\n return removedOne;\n }\n\n private getPriorityZOverride(priority: HitPriority): number {\n switch (priority) {\n case HitPriority.WireEdge:\n case HitPriority.PlanarEdge:\n case HitPriority.NonPlanarEdge:\n return 0;\n case HitPriority.SilhouetteEdge:\n return 1;\n case HitPriority.PlanarSurface:\n case HitPriority.NonPlanarSurface:\n return 2;\n default:\n return 3;\n }\n }\n\n /** compare two hits for insertion into list. */\n public compare(hit1: HitDetail | undefined, hit2: HitDetail | undefined): -1 | 1 | 0 {\n if (!hit1 || !hit2)\n return 0;\n\n const zOverride1 = this.getPriorityZOverride(hit1.priority);\n const zOverride2 = this.getPriorityZOverride(hit2.priority);\n\n // Prefer edges over surfaces, this is more important than z because we know the edge isn't obscured...\n if (zOverride1 < zOverride2)\n return -1;\n if (zOverride1 > zOverride2)\n return 1;\n\n // Compare xy distance from pick point, prefer hits closer to center...\n if (hit1.distXY < hit2.distXY)\n return -1;\n if (hit1.distXY > hit2.distXY)\n return 1;\n\n // Compare distance fraction, prefer hits closer to eye...\n if (hit1.distFraction > hit2.distFraction)\n return -1;\n if (hit1.distFraction < hit2.distFraction)\n return 1;\n\n // Compare geometry class, prefer path/region hits over surface hits when all else is equal...\n if (hit1.priority < hit2.priority)\n return -1;\n if (hit1.priority > hit2.priority)\n return 1;\n\n return 0;\n }\n\n /** Add a new hit to the list. Hits are sorted according to their priority and distance. */\n public addHit(newHit: T): number {\n if (0 === this.hits.length) {\n this.hits.push(newHit);\n return 0;\n }\n let index = 0;\n for (; index < this.hits.length; ++index) {\n const oldHit = this.hits[index];\n const comparison = this.compare(newHit, oldHit);\n if (comparison < 0)\n break;\n }\n\n this.hits.splice(index, 0, newHit);\n return index;\n }\n\n /** Insert a new hit into the list at the supplied index. */\n public insertHit(i: number, hit: T): void {\n if (i < 0 || i >= this.length)\n this.hits.push(hit);\n else\n this.hits.splice(i, 0, hit);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HitDetail.js","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA+D;AAC/D,wDAAwI;AACxI,oDAA+D;AAC/D,2CAAwC;AAExC,uCAAgD;AAGhD,6DAA0D;AAE1D;;;GAGG;AACH,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,6CAAW,CAAA;IACX,6DAAwB,CAAA;IACxB,+CAAiB,CAAA;IACjB,2CAAe,CAAA;IACf,4CAAe,CAAA;IACf,gDAAiB,CAAA;IACjB,wDAAqB,CAAA;IACrB,qEAA2B,CAAA;AAC7B,CAAC,EATW,QAAQ,wBAAR,QAAQ,QASnB;AAED;;;GAGG;AACH,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,mDAAc,CAAA;IACd,6CAAW,CAAA;AACb,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAED;;;GAGG;AACH,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,yCAAQ,CAAA;IACR,iDAAY,CAAA;IACZ,yDAA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OAAO,KAAK,CAAC;IACf,CAAC;IAED,4DAA4D;IACrD,SAAS,CAAC,CAAS,EAAE,GAAM;QAChC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM;YAC3B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;;YAEpB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;CACF;AA9JD,0BA8JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module LocatingElements\n */\nimport { assert, Id64, Id64String } from \"@itwin/core-bentley\";\nimport { Arc3d, CurvePrimitive, LineSegment3d, LineString3d, Path, Point3d, Transform, Vector3d, XYZProps } from \"@itwin/core-geometry\";\nimport { GeometryClass, LinePixels } from \"@itwin/core-common\";\nimport { IModelApp } from \"./IModelApp\";\nimport { IModelConnection } from \"./IModelConnection\";\nimport { IconSprites, Sprite } from \"./Sprites\";\nimport { DecorateContext } from \"./ViewContext\";\nimport { ScreenViewport, Viewport } from \"./Viewport\";\nimport { GraphicType } from \"./common/render/GraphicType\";\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapMode {\n Nearest = 1,\n NearestKeypoint = 1 << 1,\n MidPoint = 1 << 2,\n Center = 1 << 3,\n Origin = 1 << 4,\n Bisector = 1 << 5,\n Intersection = 1 << 6,\n PerpendicularPoint = 1 << 7,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum SnapHeat {\n None = 0,\n NotInRange = 1, // \"of interest\", but out of range\n InRange = 2,\n}\n\n/** The procedure that generated this Hit.\n * @public\n * @extensions\n */\nexport enum HitSource {\n None = 0,\n FromUser = 1,\n MotionLocate = 2,\n AccuSnap = 3,\n TentativeSnap = 4,\n DataPoint = 5,\n Application = 6,\n EditAction = 7,\n EditActionSS = 8,\n}\n\n/** What was being tested to generate this hit. This is not the element or\n * GeometricPrimitive that generated the Hit, it is an indication of whether it is an edge or interior hit.\n * @public\n * @extensions\n */\nexport enum HitGeomType {\n None = 0,\n Point = 1,\n Segment = 2,\n Curve = 3,\n Arc = 4,\n Surface = 5,\n}\n\n/** Classification of GeometricPrimitive that generated the Hit.\n * @public\n * @extensions\n */\nexport enum HitParentGeomType {\n None = 0,\n Wire = 1,\n Sheet = 2,\n Solid = 3,\n Mesh = 4,\n Text = 5,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitPriority {\n WireEdge = 0,\n PlanarEdge = 1,\n NonPlanarEdge = 2,\n SilhouetteEdge = 3,\n PlanarSurface = 4,\n NonPlanarSurface = 5,\n Unknown = 6,\n}\n\n/**\n * @public\n * @extensions\n */\nexport enum HitDetailType {\n Hit = 1,\n Snap = 2,\n Intersection = 3,\n}\n\n/** As part of a [[HitPath]], describes the [ViewAttachment]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface ViewAttachmentHitInfo {\n /** The element Id of the [ViewAttachment]($backend) from which the hit originated. */\n readonly id: Id64String;\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitPath]], describes the [SectionDrawing]($backend), if any, from which the hit represented by a [[HitDetail]] originated.\n * @beta\n */\nexport interface SectionDrawingAttachmentHitInfo {\n /** The viewport that renders the contents of the attached view into the [[ScreenViewport]].\n * @note Do not alter the state of this viewport.\n * @alpha\n */\n readonly viewport: Viewport;\n}\n\n/** As part of a [[HitDetail]], describes a series of \"attached\" views through which the hit was located.\n * Typically, the contents of a view are rendered directly to the screen via [[HitDetail.viewport]].\n * However, in some contexts one view might be \"attached\" to the viewport's view via a [ViewAttachment]($backend), [SectionDrawing]($backend), or both.\n * HitPath captures this information in one of the following possible ways:\n * 1. A [[SheetViewState]] renders another view through a [ViewAttachment]($backend), in which case [[viewAttachment]] will be defined.\n * 2. A [[DrawingViewState]] renders a [[SpatialViewState]] through a [SectionDrawing]($backend) attachment, in which case [[sectionDrawingAttachment]] will be defined; or\n * 3. A combination of 1 and 2 where a [ViewAttachment]($backend) on a sheet renders a [SectionDrawing]($backend) with an attached [[SpatialViewState]], in which both [viewAttachment]] and [[sectionDrawingAttachment]] will be defined.\n * @beta\n */\nexport interface HitPath {\n /** Details about the [ViewAttachment]($backend) through which the hit was obtained. */\n viewAttachment?: ViewAttachmentHitInfo;\n /** Details about the [SectionDrawing]($backend) attachment through which the hit was obtained. */\n sectionDrawingAttachment?: SectionDrawingAttachmentHitInfo;\n};\n\n/** Arguments supplied to the [[HitDetail]] constructor.\n * @public\n */\nexport interface HitDetailProps {\n /** The point in world coordinates that was used as the initial locate point. */\n readonly testPoint: Point3d;\n /** The viewport in which the locate operation was performed. */\n readonly viewport: ScreenViewport;\n /** The procedure that requested the locate operation. */\n readonly hitSource: HitSource;\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n readonly hitPoint: Point3d;\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n readonly sourceId: Id64String;\n /** The hit geometry priority/classification. */\n readonly priority: HitPriority;\n /** The xy distance to the hit in view coordinates. */\n readonly distXY: number;\n /** The distance in view coordinates between the hit and the near plane. */\n readonly distFraction: number;\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n readonly subCategoryId?: Id64String;\n /** The class of the hit geometry. */\n readonly geometryClass?: GeometryClass;\n /** The Id of the [[ModelState]] from which the hit originated. */\n readonly modelId?: string;\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n readonly sourceIModel?: IModelConnection;\n /** @internal */\n readonly transformFromSourceIModel?: Transform;\n /** @internal chiefly for debugging */\n readonly tileId?: string;\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n readonly isClassifier?: boolean;\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n readonly path?: HitPath;\n}\n\n/** A HitDetail stores the result when locating geometry displayed in a view.\n * It holds an approximate location on an element (or decoration) from a *pick*.\n * @public\n * @extensions\n */\nexport class HitDetail {\n private readonly _props: HitDetailProps;\n\n /** The point in world coordinates that was used as the initial locate point. */\n public get testPoint(): Point3d { return this._props.testPoint; }\n /** The viewport in which the locate operation was performed. */\n public get viewport(): ScreenViewport { return this._props.viewport; }\n /** The procedure that requested the locate operation. */\n public get hitSource(): HitSource { return this._props.hitSource; }\n /** The approximate location in world coordinates on the geometry identified by this HitDetail. */\n public get hitPoint(): Point3d { return this._props.hitPoint; }\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\n public get sourceId(): Id64String { return this._props.sourceId; }\n /** The hit geometry priority/classification. */\n public get priority(): HitPriority { return this._props.priority; }\n /** The xy distance to the hit in view coordinates. */\n public get distXY(): number { return this._props.distXY; }\n /** The distance in view coordinates between the hit and the near plane. */\n public get distFraction(): number { return this._props.distFraction; }\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\n public get subCategoryId(): Id64String | undefined { return this._props.subCategoryId; }\n /** The class of the hit geometry. */\n public get geometryClass(): GeometryClass | undefined { return this._props.geometryClass; }\n /** The Id of the [[ModelState]] from which the hit originated. */\n public get modelId(): string | undefined { return this._props.modelId; }\n /** The IModelConnection from which the hit originated.\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\n * other than the one associated with the viewport.\n * @internal\n */\n public get sourceIModel(): IModelConnection | undefined { return this._props.sourceIModel; }\n /** @internal */\n public get transformFromSourceIModel(): Transform | undefined { return this._props.transformFromSourceIModel; }\n /** @internal chiefly for debugging */\n public get tileId(): string | undefined { return this._props.tileId; }\n /** True if the hit originated from a reality model classifier.\n * @alpha\n */\n public get isClassifier(): boolean | undefined { return this._props.isClassifier; }\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\n * @note Only [[SheetViewState]]s can have view attachments.\n * @beta\n */\n public get viewAttachment(): ViewAttachmentHitInfo | undefined { return this._props.path?.viewAttachment; }\n /** Describes the path by which the hit was located through a series of attached views.\n * @beta\n */\n public get path(): HitPath | undefined { return this._props.path; }\n\n /** Create a new HitDetail from the inputs to and results of a locate operation. */\n public constructor(props: HitDetailProps);\n\n /** @deprecated in 4.1. Use the overload that takes a [[HitDetailProps]]. */\n public constructor(testPoint: Point3d, viewport: ScreenViewport, hitSource: HitSource, hitPoint: Point3d, sourceId: string, priority: HitPriority, distXY: number, distFraction: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean);\n\n /** @internal */\n public constructor(arg0: Point3d | HitDetailProps, viewport?: ScreenViewport, hitSource?: HitSource, hitPoint?: Point3d, sourceId?: string, priority?: HitPriority, distXY?: number, distFraction?: number, subCategoryId?: string, geometryClass?: GeometryClass, modelId?: string, sourceIModel?: IModelConnection, tileId?: string, isClassifier?: boolean) {\n if (arg0 instanceof Point3d) {\n assert(undefined !== viewport && undefined !== hitSource && undefined !== hitPoint && undefined !== sourceId);\n assert(undefined !== priority && undefined !== distXY && undefined !== distFraction);\n\n this._props = {\n testPoint: arg0,\n viewport,\n hitSource,\n hitPoint,\n sourceId,\n priority,\n distXY,\n distFraction,\n subCategoryId,\n geometryClass,\n modelId,\n sourceIModel,\n tileId,\n isClassifier,\n };\n } else {\n // Ignore an empty path.\n const path = arg0.path?.sectionDrawingAttachment || arg0.path?.viewAttachment ? arg0.path : undefined;\n\n // Tempting to use { ...arg0 } but spread operator omits getters so, e.g., if input is a HitDetail we would lose all the properties.\n this._props = {\n testPoint: arg0.testPoint,\n viewport: arg0.viewport,\n hitSource: arg0.hitSource,\n hitPoint: arg0.hitPoint,\n sourceId: arg0.sourceId,\n priority: arg0.priority,\n distXY: arg0.distXY,\n distFraction: arg0.distFraction,\n subCategoryId: arg0.subCategoryId,\n geometryClass: arg0.geometryClass,\n modelId: arg0.modelId,\n sourceIModel: arg0.sourceIModel,\n transformFromSourceIModel: arg0.transformFromSourceIModel,\n tileId: arg0.tileId,\n isClassifier: arg0.isClassifier,\n path,\n };\n }\n }\n\n /** Get the type of HitDetail.\n * @returns HitDetailType.Hit if this is a HitDetail, HitDetailType.Snap if it is a SnapDetail\n */\n public getHitType(): HitDetailType { return HitDetailType.Hit; }\n\n /** Get the *hit point* for this HitDetail. Returns the approximate point on the element that caused the hit when not a SnapDetail or IntersectDetail.\n * For a snap that is *hot*, the *exact* point on the Element for the snap mode is returned, otherwise the close point on the hit geometry is returned.\n */\n public getPoint(): Point3d { return this.hitPoint; }\n\n /** Determine if this HitPoint is from the same source as another HitDetail. */\n public isSameHit(otherHit?: HitDetail): boolean { return (undefined !== otherHit && this.sourceId === otherHit.sourceId && this.iModel === otherHit.iModel); }\n /** Return whether sourceId is for a persistent element and not a pickable decoration. */\n public get isElementHit(): boolean { return !Id64.isInvalid(this.sourceId) && !Id64.isTransient(this.sourceId); }\n // return whether the sourceId is for a model (reality models etc.)\n public get isModelHit(): boolean {\n return this.modelId === this.sourceId;\n }\n // return whether the hit point is from map.\n public get isMapHit(): boolean { return 0 !== this.viewport.mapLayerFromHit(this).length; }\n\n /** Create a deep copy of this HitDetail */\n public clone(): HitDetail {\n return new HitDetail(this);\n }\n\n /** Draw this HitDetail as a Decoration. Causes the picked element to *flash* */\n public draw(_context: DecorateContext) {\n this.viewport.flashedId = this.sourceId;\n }\n\n /** Get the tooltip content for this HitDetail. */\n public async getToolTip(): Promise<HTMLElement | string> {\n let toolTipPromise = this.isElementHit ? IModelApp.viewManager.overrideElementToolTip(this) : IModelApp.viewManager.getDecorationToolTip(this);\n for (const toolTipProvider of IModelApp.viewManager.toolTipProviders)\n toolTipPromise = toolTipProvider.augmentToolTip(this, toolTipPromise);\n return toolTipPromise;\n }\n\n /** The IModelConnection from which the hit originated. In some cases this may not be the same as the iModel associated with the Viewport -\n * for example, if a [[TiledGraphicsProvider]] is used to display graphics from a different iModel in the viewport.\n * This HitDetail's element, subcategory, and model Ids are defined in the context of this IModelConnection.\n */\n public get iModel(): IModelConnection {\n return this.sourceIModel ?? this.viewport.iModel;\n }\n\n /** Returns true if this hit originated from an [[IModelConnection]] other than the one associated with the [[Viewport]].\n * @see [[iModel]].\n */\n public get isExternalIModelHit(): boolean {\n return this.iModel !== this.viewport.iModel;\n }\n}\n\n/** A SnapDetail is generated from the result of a snap request. In addition to the HitDetail about the reason the element was *picked*,\n * 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.\n * @public\n * @extensions\n */\nexport class SnapDetail extends HitDetail {\n /** A sprite to show the user the type of snap performed */\n public sprite?: Sprite;\n /** HitPoint adjusted by snap */\n public readonly snapPoint: Point3d;\n /** AccuSnap/AccuDraw can adjust the point after the snap. */\n public readonly adjustedPoint: Point3d;\n /** Curve primitive for snap. */\n public primitive?: CurvePrimitive;\n /** Surface normal at snapPoint */\n public normal?: Vector3d;\n /** The HitGeomType of this SnapDetail */\n public geomType?: HitGeomType;\n /** The HitGeomType of this SnapDetail */\n public parentGeomType?: HitParentGeomType;\n\n /** Constructor for SnapDetail.\n * @param from The HitDetail that created this snap\n * @param snapMode The SnapMode used to create this SnapDetail\n * @param heat The SnapHeat of this SnapDetail\n * @param snapPoint The snapped point in the element\n */\n public constructor(from: HitDetail, public snapMode: SnapMode = SnapMode.Nearest, public heat: SnapHeat = SnapHeat.None, snapPoint?: XYZProps) {\n super(from);\n this.snapPoint = Point3d.fromJSON(snapPoint ? snapPoint : from.hitPoint);\n this.adjustedPoint = this.snapPoint.clone();\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Returns `HitDetailType.Snap` */\n public override getHitType(): HitDetailType { return HitDetailType.Snap; }\n /** Get the snap point if this SnapDetail is *hot*, the pick point otherwise. */\n public override getPoint(): Point3d { return this.isHot ? this.snapPoint : super.getPoint(); }\n /** Return true if the pick point was closer than the snap aperture from the generated snap point. */\n public get isHot(): boolean { return this.heat !== SnapHeat.None; }\n /** Determine whether the [[adjustedPoint]] is different than the [[snapPoint]]. This happens, for example, when points are adjusted for grids, acs plane snap, and AccuDraw. */\n public get isPointAdjusted(): boolean { return !this.adjustedPoint.isExactEqual(this.snapPoint); }\n\n /** Change the snap point. */\n public setSnapPoint(point: Point3d, heat: SnapHeat) {\n this.snapPoint.setFrom(point);\n this.adjustedPoint.setFrom(point);\n this.heat = heat;\n }\n\n /** Change the snap mode. */\n public setSnapMode(snapMode: SnapMode) {\n this.snapMode = snapMode;\n this.sprite = IconSprites.getSpriteFromUrl(SnapDetail.getSnapSpriteUrl(snapMode));\n }\n\n /** Set curve primitive and HitGeometryType for this SnapDetail. */\n public setCurvePrimitive(primitive?: CurvePrimitive, localToWorld?: Transform, geomType?: HitGeomType): void {\n this.primitive = primitive;\n this.geomType = undefined;\n\n // Only HitGeomType.Point and HitGeomType.Surface are valid without a curve primitive.\n if (undefined === this.primitive) {\n if (HitGeomType.Point === geomType || HitGeomType.Surface === geomType)\n this.geomType = geomType;\n return;\n }\n\n if (undefined !== localToWorld)\n this.primitive.tryTransformInPlace(localToWorld);\n\n if (this.primitive instanceof Arc3d)\n this.geomType = HitGeomType.Arc;\n else if (this.primitive instanceof LineSegment3d)\n this.geomType = HitGeomType.Segment;\n else if (this.primitive instanceof LineString3d)\n this.geomType = HitGeomType.Segment;\n else\n this.geomType = HitGeomType.Curve;\n\n // Set curve primitive geometry type override...\n // - HitGeomType.Point with arc/ellipse denotes center.\n // - HitGeomType.Surface with any curve primitive denotes an interior hit.\n if (undefined !== geomType && HitGeomType.None !== geomType)\n this.geomType = geomType;\n }\n\n /** Make a copy of this SnapDetail. */\n public override clone(): SnapDetail {\n const val = new SnapDetail(this, this.snapMode, this.heat, this.snapPoint);\n val.sprite = this.sprite;\n val.geomType = this.geomType;\n val.parentGeomType = this.parentGeomType;\n val.adjustedPoint.setFrom(this.adjustedPoint);\n if (undefined !== this.primitive)\n val.primitive = this.primitive.clone();\n if (undefined !== this.normal)\n val.normal = this.normal.clone();\n return val;\n }\n\n public getCurvePrimitive(singleSegment: boolean = true): CurvePrimitive | undefined {\n if (!singleSegment || undefined === this.primitive)\n return this.primitive;\n\n if (this.primitive instanceof LineString3d) {\n const ls = this.primitive;\n if (ls.points.length > 2) {\n const loc = ls.closestPoint(this.snapPoint, false);\n const nSegments = ls.points.length - 1;\n const uSegRange = (1.0 / nSegments);\n let segmentNo = Math.floor(loc.fraction / uSegRange);\n if (segmentNo >= nSegments)\n segmentNo = nSegments - 1;\n return LineSegment3d.create(ls.points[segmentNo], ls.points[segmentNo + 1]);\n }\n }\n\n return this.primitive;\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive) {\n let singleSegment = false;\n switch (this.snapMode) {\n case SnapMode.Center:\n case SnapMode.Origin:\n case SnapMode.Bisector:\n break; // Snap point for these is computed using entire linestring, not just the hit segment...\n\n default: {\n singleSegment = true;\n break;\n }\n }\n\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path = Path.create(this.getCurvePrimitive(singleSegment)!);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n\n private static getSnapSpriteUrl(snapType: SnapMode): string {\n switch (snapType) {\n case SnapMode.Nearest: return `${IModelApp.publicPath}sprites/SnapPointOn.png`;\n case SnapMode.NearestKeypoint: return `${IModelApp.publicPath}sprites/SnapKeypoint.png`;\n case SnapMode.MidPoint: return `${IModelApp.publicPath}sprites/SnapMidpoint.png`;\n case SnapMode.Center: return `${IModelApp.publicPath}sprites/SnapCenter.png`;\n case SnapMode.Origin: return `${IModelApp.publicPath}sprites/SnapOrigin.png`;\n case SnapMode.Bisector: return `${IModelApp.publicPath}sprites/SnapBisector.png`;\n case SnapMode.Intersection: return `${IModelApp.publicPath}sprites/SnapIntersection.png`;\n case SnapMode.PerpendicularPoint: return `${IModelApp.publicPath}sprites/SnapPerpendicularPoint.png`;\n }\n return \"\";\n }\n}\n\n/**\n * @public\n * @extensions\n */\nexport class IntersectDetail extends SnapDetail {\n public constructor(from: SnapDetail, heat: SnapHeat = SnapHeat.None, snapPoint: XYZProps, public readonly otherPrimitive: CurvePrimitive, public readonly otherId: string) {\n super(from, SnapMode.Intersection, heat, snapPoint);\n this.primitive = from.primitive;\n this.normal = from.normal; // Preserve normal from primary snap location for AccuDraw smart rotation...\n }\n\n public override draw(context: DecorateContext) {\n if (undefined !== this.primitive && undefined !== this.otherPrimitive) {\n const builder = context.createGraphicBuilder(GraphicType.WorldOverlay);\n const outline = context.viewport.hilite.color.adjustedForContrast(context.viewport.view.backgroundColor, 50);\n const centerLine = context.viewport.hilite.color.adjustedForContrast(outline, 175);\n const path1 = Path.create(this.primitive);\n const path2 = Path.create(this.otherPrimitive);\n\n builder.setSymbology(outline, outline, 6);\n builder.addPath(path1);\n builder.addPath(path2);\n\n builder.setSymbology(centerLine, centerLine, 2);\n builder.addPath(path1);\n builder.setSymbology(centerLine, centerLine, 2, LinePixels.Code2);\n builder.addPath(path2);\n\n context.addDecorationFromBuilder(builder);\n return;\n }\n super.draw(context);\n }\n}\n\n/** The result of a \"locate\" is a sorted list of objects that satisfied the search criteria (a HitList). Earlier hits in the list\n * are somehow *better* than those later on.\n * @public\n * @extensions\n */\nexport class HitList<T extends HitDetail> {\n public hits: T[] = [];\n public currHit = -1;\n public get length(): number { return this.hits.length; }\n public empty(): void {\n this.hits.length = 0;\n this.currHit = -1;\n }\n\n public resetCurrentHit(): void { this.currHit = -1; }\n\n /** Get a hit from a particular index into a HitList\n * return the requested hit from the HitList or undefined\n */\n public getHit(hitNum: number): T | undefined {\n if (hitNum < 0)\n hitNum = this.length - 1;\n\n return (hitNum >= this.length) ? undefined : this.hits[hitNum];\n }\n\n /** When setting one or more indices to undefined you must call dropNulls afterwards */\n public setHit(i: number, p: T | undefined): void {\n if (i < 0 || i >= this.length)\n return;\n this.hits[i] = p!;\n }\n\n public dropNulls(): void {\n const hits = this.hits;\n this.hits = [];\n for (const hit of hits)\n this.hits.push(hit);\n }\n\n public getNextHit(): T | undefined {\n this.currHit++;\n return this.getCurrentHit();\n }\n\n public getCurrentHit(): T | undefined { return -1 === this.currHit ? undefined : this.getHit(this.currHit); }\n\n public setCurrentHit(hit: T): void {\n this.resetCurrentHit();\n for (let thisHit; undefined !== (thisHit = this.getNextHit());) {\n if (thisHit === hit)\n return;\n }\n }\n\n /** remove the current hit from the list. */\n public removeCurrentHit() { this.removeHit(this.currHit); }\n\n /** remove a hit in the list. */\n public removeHit(hitNum: number) {\n if (hitNum < 0) // Support -1 == END\n hitNum = this.length - 1;\n\n if (hitNum <= this.currHit)\n this.currHit = -1;\n\n if (hitNum >= this.length) // Locate calls GetNextHit, which increments currHit, until it goes beyond the end of size of the array.\n return; // Then Reset call RemoteCurrentHit, which passes in currHit. When it is out of range, we do nothing.\n\n this.hits.splice(hitNum, 1);\n }\n\n /** search through list and remove any hits that contain a specified element id. */\n public removeHitsFrom(sourceId: string): boolean {\n let removedOne = false;\n\n // walk backwards through list so we don't have to worry about what happens on remove\n for (let i = this.length - 1; i >= 0; i--) {\n const thisHit = this.hits[i];\n if (thisHit && sourceId === thisHit.sourceId) {\n removedOne = true;\n this.removeHit(i);\n }\n }\n return removedOne;\n }\n\n private getPriorityZOverride(priority: HitPriority): number {\n switch (priority) {\n case HitPriority.WireEdge:\n case HitPriority.PlanarEdge:\n case HitPriority.NonPlanarEdge:\n return 0;\n case HitPriority.SilhouetteEdge:\n return 1;\n case HitPriority.PlanarSurface:\n case HitPriority.NonPlanarSurface:\n return 2;\n default:\n return 3;\n }\n }\n\n /** compare two hits for insertion into list. */\n public compare(hit1: HitDetail | undefined, hit2: HitDetail | undefined): -1 | 1 | 0 {\n if (!hit1 || !hit2)\n return 0;\n\n const zOverride1 = this.getPriorityZOverride(hit1.priority);\n const zOverride2 = this.getPriorityZOverride(hit2.priority);\n\n // Prefer edges over surfaces, this is more important than z because we know the edge isn't obscured...\n if (zOverride1 < zOverride2)\n return -1;\n if (zOverride1 > zOverride2)\n return 1;\n\n // Compare xy distance from pick point, prefer hits closer to center...\n if (hit1.distXY < hit2.distXY)\n return -1;\n if (hit1.distXY > hit2.distXY)\n return 1;\n\n // Compare distance fraction, prefer hits closer to eye...\n if (hit1.distFraction > hit2.distFraction)\n return -1;\n if (hit1.distFraction < hit2.distFraction)\n return 1;\n\n // Compare geometry class, prefer path/region hits over surface hits when all else is equal...\n if (hit1.priority < hit2.priority)\n return -1;\n if (hit1.priority > hit2.priority)\n return 1;\n\n return 0;\n }\n\n /** Add a new hit to the list. Hits are sorted according to their priority and distance. */\n public addHit(newHit: T): number {\n if (0 === this.hits.length) {\n this.hits.push(newHit);\n return 0;\n }\n let index = 0;\n for (; index < this.hits.length; ++index) {\n const oldHit = this.hits[index];\n const comparison = this.compare(newHit, oldHit);\n if (comparison < 0)\n break;\n }\n\n this.hits.splice(index, 0, newHit);\n return index;\n }\n\n /** Insert a new hit into the list at the supplied index. */\n public insertHit(i: number, hit: T): void {\n if (i < 0 || i >= this.length)\n this.hits.push(hit);\n else\n this.hits.splice(i, 0, hit);\n }\n}\n"]}
|
|
@@ -50,7 +50,6 @@ export declare class AccuDrawShortcuts {
|
|
|
50
50
|
static rotate90(axis: number): void;
|
|
51
51
|
static rotateAxes(aboutCurrentZ: boolean): Promise<boolean>;
|
|
52
52
|
static rotateToElement(): Promise<boolean>;
|
|
53
|
-
static rotatePerpendicular(): Promise<boolean>;
|
|
54
53
|
static defineACSByElement(): Promise<boolean>;
|
|
55
54
|
static defineACSByPoints(): Promise<boolean>;
|
|
56
55
|
static getACS(acsName: string | undefined, useOrigin: boolean, useRotation: boolean): BentleyStatus;
|
|
@@ -207,17 +206,6 @@ export declare class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
|
|
|
207
206
|
protected doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
208
207
|
}
|
|
209
208
|
/** @beta */
|
|
210
|
-
export declare class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
|
|
211
|
-
static toolId: string;
|
|
212
|
-
private _location?;
|
|
213
|
-
/** @internal */
|
|
214
|
-
protected get wantExitOnDataButtonUp(): boolean;
|
|
215
|
-
/** @internal */
|
|
216
|
-
protected onManipulationComplete(): AccuDrawFlags;
|
|
217
|
-
/** @internal */
|
|
218
|
-
protected updateOrientation(snap: SnapDetail, viewport: ScreenViewport, isMotion: boolean): boolean;
|
|
219
|
-
}
|
|
220
|
-
/** @beta */
|
|
221
209
|
export declare class DefineACSByElementTool extends AccuDrawShortcutsTool {
|
|
222
210
|
static toolId: string;
|
|
223
211
|
private _origin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccuDrawTool.d.ts","sourceRoot":"","sources":["../../../src/tools/AccuDrawTool.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"AccuDrawTool.d.ts","sourceRoot":"","sources":["../../../src/tools/AccuDrawTool.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAsB,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAY,aAAa,EAA4B,SAAS,EAA6B,YAAY,EAAa,MAAM,aAAa,CAAC;AAE/I,OAAO,EAAqB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAA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CAAsB;IAEnC,gBAAgB;cACG,mBAAmB,IAAI,IAAI;IAE9C,gBAAgB;IAChB,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,GAAG,OAAO;IASpE,gBAAgB;IAChB,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO;IAuBnF,gBAAgB;IACA,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAQzD;AAED,YAAY;AACZ,qBAAa,qBAAsB,SAAQ,qBAAqB;IAC9D,OAAuB,MAAM,SAAgC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,IAAI,CAAC,CAAsB;IAEnC,gBAAgB;cACG,mBAAmB,IAAI,IAAI;IAa9C,gBAAgB;IAChB,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO;IAyBnF,gBAAgB;IACA,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAezD"}
|
|
@@ -7,13 +7,12 @@
|
|
|
7
7
|
* @module Tools
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.DefineACSByPointsTool = exports.DefineACSByElementTool = exports.
|
|
10
|
+
exports.DefineACSByPointsTool = exports.DefineACSByElementTool = exports.AccuDrawRotateElementTool = exports.AccuDrawRotateAxesTool = exports.AccuDrawRotate90AboutZTool = exports.AccuDrawRotate90AboutYTool = exports.AccuDrawRotate90AboutXTool = exports.AccuDrawRotateViewTool = exports.AccuDrawRotateSideTool = exports.AccuDrawRotateFrontTool = exports.AccuDrawRotateTopTool = exports.AccuDrawRotateCycleTool = exports.AccuDrawChangeModeTool = exports.AccuDrawSetLockAngleTool = exports.AccuDrawSetLockDistanceTool = exports.AccuDrawSetLockZTool = exports.AccuDrawSetLockYTool = exports.AccuDrawSetLockXTool = exports.AccuDrawSetLockIndexTool = exports.AccuDrawSetLockSmartTool = exports.AccuDrawSetOriginTool = exports.AccuDrawSuspendToggleTool = exports.AccuDrawSessionToggleTool = exports.AccuDrawShortcuts = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const core_geometry_1 = require("@itwin/core-geometry");
|
|
13
13
|
const AccuDraw_1 = require("../AccuDraw");
|
|
14
14
|
const AccuSnap_1 = require("../AccuSnap");
|
|
15
15
|
const AuxCoordSys_1 = require("../AuxCoordSys");
|
|
16
|
-
const HitDetail_1 = require("../HitDetail");
|
|
17
16
|
const IModelApp_1 = require("../IModelApp");
|
|
18
17
|
const Tool_1 = require("./Tool");
|
|
19
18
|
// cSpell:ignore dont unlockedz
|
|
@@ -733,9 +732,6 @@ class AccuDrawShortcuts {
|
|
|
733
732
|
static async rotateToElement() {
|
|
734
733
|
return IModelApp_1.IModelApp.tools.run("AccuDraw.RotateElement");
|
|
735
734
|
}
|
|
736
|
-
static async rotatePerpendicular() {
|
|
737
|
-
return IModelApp_1.IModelApp.tools.run("AccuDraw.RotatePerpendicular");
|
|
738
|
-
}
|
|
739
735
|
static async defineACSByElement() {
|
|
740
736
|
return IModelApp_1.IModelApp.tools.run("AccuDraw.DefineACSByElement");
|
|
741
737
|
}
|
|
@@ -1012,7 +1008,7 @@ class AccuDrawShortcutsTool extends Tool_1.InputCollector {
|
|
|
1012
1008
|
get wantActivateOnStart() { return false; } // Whether to automatically enable AccuDraw before the 1st data button...
|
|
1013
1009
|
get wantClearSnapOnStart() { return false; } // Whether to preserve active Tentative/AccuSnap on install...
|
|
1014
1010
|
get wantManipulationImmediate() { return false; } // Whether additional input is required to process on install...
|
|
1015
|
-
get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down
|
|
1011
|
+
get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down...
|
|
1016
1012
|
async onInstall() {
|
|
1017
1013
|
if (!this.allowShortcut)
|
|
1018
1014
|
return false;
|
|
@@ -1163,60 +1159,6 @@ class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
|
|
|
1163
1159
|
}
|
|
1164
1160
|
exports.AccuDrawRotateElementTool = AccuDrawRotateElementTool;
|
|
1165
1161
|
/** @beta */
|
|
1166
|
-
class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
|
|
1167
|
-
static toolId = "AccuDraw.RotatePerpendicular";
|
|
1168
|
-
_location;
|
|
1169
|
-
/** @internal */
|
|
1170
|
-
get wantExitOnDataButtonUp() { return true; } // Complete on button up since button down clears tentative...
|
|
1171
|
-
/** @internal */
|
|
1172
|
-
onManipulationComplete() {
|
|
1173
|
-
if (undefined !== this._location) {
|
|
1174
|
-
// Use tentative to hold adjusted snap location for suspended tool...
|
|
1175
|
-
IModelApp_1.IModelApp.tentativePoint.setPoint(this._location.point);
|
|
1176
|
-
IModelApp_1.IModelApp.tentativePoint.viewport = this._location.viewport;
|
|
1177
|
-
IModelApp_1.IModelApp.tentativePoint.showTentative();
|
|
1178
|
-
}
|
|
1179
|
-
return AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.Disable;
|
|
1180
|
-
}
|
|
1181
|
-
/** @internal */
|
|
1182
|
-
updateOrientation(snap, viewport, isMotion) {
|
|
1183
|
-
const curve = snap.getCurvePrimitive();
|
|
1184
|
-
if (undefined === curve)
|
|
1185
|
-
return false;
|
|
1186
|
-
const accudraw = IModelApp_1.IModelApp.accuDraw;
|
|
1187
|
-
const rMatrix = AccuDraw_1.AccuDraw.getSnapRotation(snap, viewport);
|
|
1188
|
-
if (undefined === rMatrix)
|
|
1189
|
-
return false;
|
|
1190
|
-
const zVec = rMatrix.getRow(2); // This is a row matrix...
|
|
1191
|
-
const spacePoint = AccuDraw_1.AccuDrawHintBuilder.projectPointToPlaneInView(accudraw.origin, snap.getPoint(), zVec, viewport, true);
|
|
1192
|
-
if (undefined === spacePoint)
|
|
1193
|
-
return false;
|
|
1194
|
-
const detail = curve.closestPoint(spacePoint, true);
|
|
1195
|
-
if (undefined === detail?.curve)
|
|
1196
|
-
return false;
|
|
1197
|
-
const point = AccuDraw_1.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accudraw.origin, zVec, viewport, true);
|
|
1198
|
-
if (undefined === point)
|
|
1199
|
-
return false;
|
|
1200
|
-
const xVec = new core_geometry_1.Vector3d();
|
|
1201
|
-
if (normalizedDifference(point, accudraw.origin, xVec) < core_geometry_1.Geometry.smallAngleRadians)
|
|
1202
|
-
return false;
|
|
1203
|
-
; // Closest point and compass origin coincide...
|
|
1204
|
-
const yVec = xVec.unitCrossProduct(zVec);
|
|
1205
|
-
if (undefined === yVec)
|
|
1206
|
-
return false;
|
|
1207
|
-
rMatrix.setColumns(xVec, yVec, zVec);
|
|
1208
|
-
core_geometry_1.Matrix3d.createRigidFromMatrix3d(rMatrix, core_geometry_1.AxisOrder.XZY, rMatrix);
|
|
1209
|
-
rMatrix.transposeInPlace();
|
|
1210
|
-
snap.setSnapPoint(point, HitDetail_1.SnapHeat.InRange); // Force hot snap so that adjust point uses it for alignments...
|
|
1211
|
-
accudraw.setContext(AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.AlwaysSetOrigin, accudraw.origin, rMatrix);
|
|
1212
|
-
accudraw.adjustPoint(point, viewport, false); // Update internals for new snap location...
|
|
1213
|
-
if (!isMotion)
|
|
1214
|
-
this._location = { point, viewport };
|
|
1215
|
-
return true;
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
exports.AccuDrawRotatePerpendicularTool = AccuDrawRotatePerpendicularTool;
|
|
1219
|
-
/** @beta */
|
|
1220
1162
|
class DefineACSByElementTool extends AccuDrawShortcutsTool {
|
|
1221
1163
|
static toolId = "AccuDraw.DefineACSByElement";
|
|
1222
1164
|
_origin = core_geometry_1.Point3d.create();
|