@itwin/core-frontend 4.9.0-dev.24 → 4.9.0-dev.26
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/CHANGELOG.md +6 -1
- package/lib/cjs/tools/AccuDrawTool.d.ts +34 -22
- package/lib/cjs/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/cjs/tools/AccuDrawTool.js +151 -88
- package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
- package/lib/esm/tools/AccuDrawTool.d.ts +34 -22
- package/lib/esm/tools/AccuDrawTool.d.ts.map +1 -1
- package/lib/esm/tools/AccuDrawTool.js +151 -89
- package/lib/esm/tools/AccuDrawTool.js.map +1 -1
- package/lib/public/locales/en/CoreTools.json +5 -0
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Change Log - @itwin/core-frontend
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 13 Sep 2024 15:12:41 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.8.7
|
|
6
|
+
Fri, 13 Sep 2024 15:11:17 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
4
9
|
|
|
5
10
|
## 4.8.6
|
|
6
11
|
Fri, 06 Sep 2024 05:06:49 GMT
|
|
@@ -7,7 +7,7 @@ import { AccuDrawFlags, ItemField, RotationMode } from "../AccuDraw";
|
|
|
7
7
|
import { AuxCoordSystemState } from "../AuxCoordSys";
|
|
8
8
|
import { SnapDetail } from "../HitDetail";
|
|
9
9
|
import { DecorateContext } from "../ViewContext";
|
|
10
|
-
import { Viewport } from "../Viewport";
|
|
10
|
+
import { ScreenViewport, Viewport } from "../Viewport";
|
|
11
11
|
import { BeButtonEvent, EventHandled, InputCollector, Tool } from "./Tool";
|
|
12
12
|
/**
|
|
13
13
|
* A shortcut may require no user input (immediate) or it may install a tool to collect the needed input. AccuDrawShortcuts are how users control AccuDraw.
|
|
@@ -47,6 +47,7 @@ export declare class AccuDrawShortcuts {
|
|
|
47
47
|
static rotate90(axis: number): void;
|
|
48
48
|
static rotateAxes(aboutCurrentZ: boolean): Promise<boolean>;
|
|
49
49
|
static rotateToElement(): Promise<boolean>;
|
|
50
|
+
static rotatePerpendicular(): Promise<boolean>;
|
|
50
51
|
static defineACSByElement(): Promise<boolean>;
|
|
51
52
|
static defineACSByPoints(): Promise<boolean>;
|
|
52
53
|
static getACS(acsName: string | undefined, useOrigin: boolean, useRotation: boolean): BentleyStatus;
|
|
@@ -137,16 +138,20 @@ export declare class AccuDrawRotateViewTool extends Tool {
|
|
|
137
138
|
}
|
|
138
139
|
/** @internal */
|
|
139
140
|
declare abstract class AccuDrawShortcutsTool extends InputCollector {
|
|
140
|
-
private
|
|
141
|
-
|
|
141
|
+
private _complete;
|
|
142
|
+
protected get allowShortcut(): boolean;
|
|
143
|
+
protected get wantActivateOnStart(): boolean;
|
|
144
|
+
protected get wantClearSnapOnStart(): boolean;
|
|
145
|
+
protected get wantManipulationImmediate(): boolean;
|
|
146
|
+
protected get wantExitOnDataButtonUp(): boolean;
|
|
147
|
+
onInstall(): Promise<boolean>;
|
|
142
148
|
onPostInstall(): Promise<void>;
|
|
143
149
|
onCleanup(): Promise<void>;
|
|
150
|
+
exitTool(): Promise<void>;
|
|
144
151
|
onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled>;
|
|
152
|
+
onDataButtonUp(_ev: BeButtonEvent): Promise<EventHandled>;
|
|
145
153
|
onMouseMotion(ev: BeButtonEvent): Promise<void>;
|
|
146
|
-
|
|
147
|
-
activateAccuDrawOnStart(): boolean;
|
|
148
|
-
doManipulationStart(): void;
|
|
149
|
-
doManipulationStop(cancel: boolean): void;
|
|
154
|
+
onManipulationStart(): void;
|
|
150
155
|
onManipulationComplete(): AccuDrawFlags;
|
|
151
156
|
abstract doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
152
157
|
}
|
|
@@ -155,34 +160,43 @@ export declare class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
|
|
|
155
160
|
aboutCurrentZ: boolean;
|
|
156
161
|
static toolId: string;
|
|
157
162
|
static get maxArgs(): number;
|
|
158
|
-
protected _immediateMode: boolean;
|
|
159
163
|
constructor(aboutCurrentZ?: boolean);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
+
protected get allowShortcut(): boolean;
|
|
165
|
+
protected get wantActivateOnStart(): boolean;
|
|
166
|
+
protected get wantManipulationImmediate(): boolean;
|
|
167
|
+
onManipulationStart(): void;
|
|
164
168
|
doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
165
169
|
parseAndRun(...args: any[]): Promise<boolean>;
|
|
166
170
|
}
|
|
167
171
|
/** @internal */
|
|
168
172
|
export declare class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
|
|
169
173
|
static toolId: string;
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
private _moveOrigin;
|
|
175
|
+
protected get wantActivateOnStart(): boolean;
|
|
176
|
+
protected get wantManipulationImmediate(): boolean;
|
|
177
|
+
onManipulationStart(): void;
|
|
172
178
|
onManipulationComplete(): AccuDrawFlags;
|
|
173
|
-
|
|
174
|
-
updateOrientation(snap: SnapDetail, vp: Viewport): boolean;
|
|
179
|
+
updateOrientation(snap: SnapDetail, viewport: ScreenViewport, _isMotion: boolean): boolean;
|
|
175
180
|
doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
176
181
|
}
|
|
177
182
|
/** @internal */
|
|
183
|
+
export declare class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
|
|
184
|
+
static toolId: string;
|
|
185
|
+
protected _location?: {
|
|
186
|
+
point: Point3d;
|
|
187
|
+
viewport: ScreenViewport;
|
|
188
|
+
};
|
|
189
|
+
protected get wantExitOnDataButtonUp(): boolean;
|
|
190
|
+
onManipulationComplete(): AccuDrawFlags;
|
|
191
|
+
updateOrientation(snap: SnapDetail, viewport: ScreenViewport, isMotion: boolean): boolean;
|
|
192
|
+
}
|
|
193
|
+
/** @internal */
|
|
178
194
|
export declare class DefineACSByElementTool extends AccuDrawShortcutsTool {
|
|
179
195
|
static toolId: string;
|
|
180
196
|
private _origin;
|
|
181
197
|
private _rMatrix;
|
|
182
198
|
private _acs?;
|
|
183
|
-
|
|
184
|
-
onManipulationComplete(): AccuDrawFlags;
|
|
185
|
-
doManipulationStart(): void;
|
|
199
|
+
onManipulationStart(): void;
|
|
186
200
|
updateOrientation(snap: SnapDetail, vp: Viewport): boolean;
|
|
187
201
|
doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
188
202
|
decorate(context: DecorateContext): void;
|
|
@@ -192,9 +206,7 @@ export declare class DefineACSByPointsTool extends AccuDrawShortcutsTool {
|
|
|
192
206
|
static toolId: string;
|
|
193
207
|
private readonly _points;
|
|
194
208
|
private _acs?;
|
|
195
|
-
|
|
196
|
-
onManipulationComplete(): AccuDrawFlags;
|
|
197
|
-
doManipulationStart(): void;
|
|
209
|
+
onManipulationStart(): void;
|
|
198
210
|
doManipulation(ev: BeButtonEvent | undefined, isMotion: boolean): boolean;
|
|
199
211
|
decorate(context: DecorateContext): void;
|
|
200
212
|
}
|
|
@@ -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,EAAiC,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAY,aAAa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B,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,GAAG,OAAO;IAS1D,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO;IAuBhE,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAQzD;AAED,gBAAgB;AAChB,qBAAa,qBAAsB,SAAQ,qBAAqB;IAC9D,OAAuB,MAAM,SAAgC;IAC7D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,IAAI,CAAC,CAAsB;IAEnB,mBAAmB,IAAI,IAAI;IAapC,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO;IAyBhE,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;CAezD"}
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
* @module Tools
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.DefineACSByPointsTool = exports.DefineACSByElementTool = exports.AccuDrawRotateElementTool = exports.AccuDrawRotateAxesTool = 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;
|
|
10
|
+
exports.DefineACSByPointsTool = exports.DefineACSByElementTool = exports.AccuDrawRotatePerpendicularTool = exports.AccuDrawRotateElementTool = exports.AccuDrawRotateAxesTool = 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");
|
|
16
17
|
const IModelApp_1 = require("../IModelApp");
|
|
17
18
|
const Tool_1 = require("./Tool");
|
|
18
19
|
// cSpell:ignore dont unlockedz
|
|
@@ -753,6 +754,9 @@ class AccuDrawShortcuts {
|
|
|
753
754
|
static async rotateToElement() {
|
|
754
755
|
return IModelApp_1.IModelApp.tools.run("AccuDraw.RotateElement");
|
|
755
756
|
}
|
|
757
|
+
static async rotatePerpendicular() {
|
|
758
|
+
return IModelApp_1.IModelApp.tools.run("AccuDraw.RotatePerpendicular");
|
|
759
|
+
}
|
|
756
760
|
static async defineACSByElement() {
|
|
757
761
|
return IModelApp_1.IModelApp.tools.run("AccuDraw.DefineACSByElement");
|
|
758
762
|
}
|
|
@@ -901,6 +905,8 @@ class AccuDrawShortcuts {
|
|
|
901
905
|
return AccuDrawShortcuts.rotateAxes(true);
|
|
902
906
|
case "e":
|
|
903
907
|
return AccuDrawShortcuts.rotateToElement();
|
|
908
|
+
case "p":
|
|
909
|
+
return AccuDrawShortcuts.rotatePerpendicular();
|
|
904
910
|
case "r":
|
|
905
911
|
return AccuDrawShortcuts.defineACSByPoints();
|
|
906
912
|
}
|
|
@@ -1055,38 +1061,65 @@ AccuDrawRotateViewTool.toolId = "AccuDraw.RotateView";
|
|
|
1055
1061
|
/** @internal */
|
|
1056
1062
|
class AccuDrawShortcutsTool extends Tool_1.InputCollector {
|
|
1057
1063
|
constructor() {
|
|
1058
|
-
super();
|
|
1059
|
-
this.
|
|
1064
|
+
super(...arguments);
|
|
1065
|
+
this._complete = false;
|
|
1066
|
+
}
|
|
1067
|
+
get allowShortcut() { return this.wantActivateOnStart ? IModelApp_1.IModelApp.accuDraw.isEnabled : true; }
|
|
1068
|
+
get wantActivateOnStart() { return false; } // Whether to automatically enable AccuDraw before the 1st data button...
|
|
1069
|
+
get wantClearSnapOnStart() { return false; } // Whether to preserve active Tentative/AccuSnap on install...
|
|
1070
|
+
get wantManipulationImmediate() { return false; } // Whether additional input is required to process on install...
|
|
1071
|
+
get wantExitOnDataButtonUp() { return false; } // Whether to exit on button up instead of down (see rotate perpendicular)...
|
|
1072
|
+
async onInstall() {
|
|
1073
|
+
if (!this.allowShortcut)
|
|
1074
|
+
return false;
|
|
1075
|
+
return super.onInstall();
|
|
1060
1076
|
}
|
|
1061
1077
|
async onPostInstall() {
|
|
1062
1078
|
await super.onPostInstall();
|
|
1063
|
-
this.
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1079
|
+
if (this.wantActivateOnStart)
|
|
1080
|
+
IModelApp_1.IModelApp.accuDraw.activate();
|
|
1081
|
+
this.onManipulationStart();
|
|
1082
|
+
if (this.wantManipulationImmediate && this.doManipulation(undefined, false)) {
|
|
1083
|
+
this._complete = true;
|
|
1084
|
+
return this.exitTool();
|
|
1085
|
+
}
|
|
1086
|
+
// NOTE: InputCollector inherits suspended primitive's state, set everything...
|
|
1087
|
+
if (this.wantClearSnapOnStart) {
|
|
1088
|
+
this.initLocateElements(false, true, undefined, Tool_1.CoordinateLockOverrides.None); // This clears the active Tentative/AccuSnap, some shortcuts have special behavior when invoked with an active snap...
|
|
1089
|
+
}
|
|
1090
|
+
else {
|
|
1091
|
+
IModelApp_1.IModelApp.locateManager.initLocateOptions();
|
|
1092
|
+
this.changeLocateState(false, true, undefined, Tool_1.CoordinateLockOverrides.None);
|
|
1093
|
+
}
|
|
1094
|
+
this.doManipulation(undefined, true);
|
|
1095
|
+
;
|
|
1096
|
+
}
|
|
1097
|
+
async onCleanup() {
|
|
1098
|
+
if (this._complete)
|
|
1099
|
+
IModelApp_1.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
|
|
1100
|
+
}
|
|
1101
|
+
async exitTool() {
|
|
1102
|
+
await super.exitTool();
|
|
1103
|
+
AccuDrawShortcuts.requestInputFocus(); // re-grab focus when auto-focus tool setting set...
|
|
1104
|
+
}
|
|
1067
1105
|
async onDataButtonDown(ev) {
|
|
1068
1106
|
if (this.doManipulation(ev, false)) {
|
|
1069
|
-
this.
|
|
1070
|
-
|
|
1107
|
+
this._complete = true;
|
|
1108
|
+
if (!this.wantExitOnDataButtonUp)
|
|
1109
|
+
await this.exitTool();
|
|
1071
1110
|
}
|
|
1072
1111
|
return Tool_1.EventHandled.No;
|
|
1073
1112
|
}
|
|
1074
|
-
async
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
} // re-grab focus when auto-focus tool setting set...
|
|
1079
|
-
activateAccuDrawOnStart() { return true; }
|
|
1080
|
-
doManipulationStart() {
|
|
1081
|
-
if (this.activateAccuDrawOnStart())
|
|
1082
|
-
IModelApp_1.IModelApp.accuDraw.activate();
|
|
1083
|
-
this.doManipulation(undefined, true);
|
|
1113
|
+
async onDataButtonUp(_ev) {
|
|
1114
|
+
if (this._complete && this.wantExitOnDataButtonUp)
|
|
1115
|
+
await this.exitTool();
|
|
1116
|
+
return Tool_1.EventHandled.No;
|
|
1084
1117
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
IModelApp_1.IModelApp.accuDraw.savedStateInputCollector.ignoreFlags = this.onManipulationComplete();
|
|
1118
|
+
async onMouseMotion(ev) {
|
|
1119
|
+
this.doManipulation(ev, true);
|
|
1088
1120
|
}
|
|
1089
|
-
|
|
1121
|
+
onManipulationStart() { }
|
|
1122
|
+
onManipulationComplete() { return AccuDraw_1.AccuDrawFlags.SetRMatrix; }
|
|
1090
1123
|
}
|
|
1091
1124
|
/** @internal */
|
|
1092
1125
|
class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
|
|
@@ -1094,45 +1127,33 @@ class AccuDrawRotateAxesTool extends AccuDrawShortcutsTool {
|
|
|
1094
1127
|
constructor(aboutCurrentZ = true) {
|
|
1095
1128
|
super();
|
|
1096
1129
|
this.aboutCurrentZ = aboutCurrentZ;
|
|
1097
|
-
this._immediateMode = false;
|
|
1098
1130
|
}
|
|
1099
|
-
|
|
1131
|
+
get allowShortcut() { return IModelApp_1.IModelApp.accuDraw.isActive; } // Require compass to already be active for this shortcut...
|
|
1132
|
+
get wantActivateOnStart() { return true; } // State is demoted to inactive when a tool install, still need this...
|
|
1133
|
+
get wantManipulationImmediate() {
|
|
1134
|
+
if (AccuSnap_1.TentativeOrAccuSnap.isHot)
|
|
1135
|
+
return true;
|
|
1100
1136
|
const accudraw = IModelApp_1.IModelApp.accuDraw;
|
|
1101
|
-
if (
|
|
1102
|
-
return
|
|
1103
|
-
|
|
1104
|
-
accudraw.changeBaseRotationMode(AccuDraw_1.RotationMode.Context); // Establish current orientation as base; base Z is used when defining compass rotation by x axis...
|
|
1105
|
-
if (accudraw.clearTentative() || IModelApp_1.IModelApp.accuSnap.isHot ||
|
|
1106
|
-
(AccuDraw_1.CompassMode.Polar === accudraw.compassMode && accudraw.getFieldLock(AccuDraw_1.ItemField.ANGLE_Item)) ||
|
|
1107
|
-
(AccuDraw_1.CompassMode.Polar !== accudraw.compassMode && accudraw.getFieldLock(AccuDraw_1.ItemField.X_Item) && accudraw.getFieldLock(AccuDraw_1.ItemField.Y_Item))) {
|
|
1108
|
-
if (AccuDrawShortcuts.rotateAxesByPoint(true, this.aboutCurrentZ)) {
|
|
1109
|
-
AccuDrawShortcuts.itemFieldUnlockAll();
|
|
1110
|
-
accudraw.refreshDecorationsAndDynamics();
|
|
1111
|
-
this._immediateMode = true;
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
return true;
|
|
1137
|
+
if (AccuDraw_1.CompassMode.Polar === accudraw.compassMode)
|
|
1138
|
+
return accudraw.getFieldLock(AccuDraw_1.ItemField.ANGLE_Item);
|
|
1139
|
+
return accudraw.getFieldLock(AccuDraw_1.ItemField.X_Item) && accudraw.getFieldLock(AccuDraw_1.ItemField.Y_Item);
|
|
1115
1140
|
}
|
|
1116
|
-
|
|
1117
|
-
if (this.
|
|
1118
|
-
|
|
1119
|
-
return;
|
|
1120
|
-
}
|
|
1121
|
-
return super.onPostInstall();
|
|
1122
|
-
}
|
|
1123
|
-
onManipulationComplete() { return AccuDraw_1.AccuDrawFlags.SetRMatrix; }
|
|
1124
|
-
doManipulationStart() {
|
|
1125
|
-
super.doManipulationStart();
|
|
1141
|
+
onManipulationStart() {
|
|
1142
|
+
if (this.aboutCurrentZ)
|
|
1143
|
+
IModelApp_1.IModelApp.accuDraw.changeBaseRotationMode(AccuDraw_1.RotationMode.Context); // Establish current orientation as base for when defining compass rotation by x axis...
|
|
1126
1144
|
Tool_1.CoreTools.outputPromptByKey("AccuDraw.RotateAxes.Prompts.FirstPoint");
|
|
1127
1145
|
}
|
|
1128
1146
|
doManipulation(ev, isMotion) {
|
|
1129
1147
|
const vp = ev ? ev.viewport : IModelApp_1.IModelApp.accuDraw.currentView;
|
|
1130
1148
|
if (!vp)
|
|
1131
|
-
return
|
|
1132
|
-
AccuDrawShortcuts.rotateAxesByPoint(AccuSnap_1.TentativeOrAccuSnap.isHot, this.aboutCurrentZ)
|
|
1149
|
+
return false;
|
|
1150
|
+
if (!AccuDrawShortcuts.rotateAxesByPoint(AccuSnap_1.TentativeOrAccuSnap.isHot, this.aboutCurrentZ))
|
|
1151
|
+
return false;
|
|
1133
1152
|
vp.invalidateDecorations();
|
|
1134
|
-
if (!isMotion)
|
|
1153
|
+
if (!isMotion) {
|
|
1135
1154
|
AccuDrawShortcuts.itemFieldUnlockAll();
|
|
1155
|
+
IModelApp_1.IModelApp.tentativePoint.clear(true);
|
|
1156
|
+
}
|
|
1136
1157
|
return true;
|
|
1137
1158
|
}
|
|
1138
1159
|
async parseAndRun(...args) {
|
|
@@ -1149,57 +1170,103 @@ AccuDrawRotateAxesTool.toolId = "AccuDraw.RotateAxes";
|
|
|
1149
1170
|
class AccuDrawRotateElementTool extends AccuDrawShortcutsTool {
|
|
1150
1171
|
constructor() {
|
|
1151
1172
|
super(...arguments);
|
|
1152
|
-
this.
|
|
1173
|
+
this._moveOrigin = !IModelApp_1.IModelApp.accuDraw.isActive || IModelApp_1.IModelApp.tentativePoint.isActive; // Preserve current origin if AccuDraw already active and not tentative snap...
|
|
1174
|
+
}
|
|
1175
|
+
get wantActivateOnStart() { return true; }
|
|
1176
|
+
get wantManipulationImmediate() { return IModelApp_1.IModelApp.tentativePoint.isSnapped; }
|
|
1177
|
+
onManipulationStart() {
|
|
1178
|
+
IModelApp_1.IModelApp.accuDraw.setContext(AccuDraw_1.AccuDrawFlags.FixedOrigin); // Don't move compass when updateOrientation returns false...
|
|
1179
|
+
Tool_1.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
|
|
1153
1180
|
}
|
|
1154
|
-
async onInstall() { return IModelApp_1.IModelApp.accuDraw.isEnabled; } // Require compass to be enabled for this session...
|
|
1155
1181
|
onManipulationComplete() {
|
|
1156
1182
|
let ignoreFlags = AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.Disable; // If AccuDraw wasn't active when the shortcut started, let it remain active for suspended tool when shortcut completes...
|
|
1157
|
-
if (this.
|
|
1183
|
+
if (this._moveOrigin)
|
|
1158
1184
|
ignoreFlags |= AccuDraw_1.AccuDrawFlags.SetOrigin;
|
|
1159
1185
|
return ignoreFlags;
|
|
1160
1186
|
}
|
|
1161
|
-
|
|
1162
|
-
super.doManipulationStart();
|
|
1163
|
-
Tool_1.CoreTools.outputPromptByKey("AccuDraw.RotateElement.Prompts.FirstPoint");
|
|
1164
|
-
}
|
|
1165
|
-
updateOrientation(snap, vp) {
|
|
1187
|
+
updateOrientation(snap, viewport, _isMotion) {
|
|
1166
1188
|
const accudraw = IModelApp_1.IModelApp.accuDraw;
|
|
1167
|
-
const rMatrix = AccuDraw_1.AccuDraw.getSnapRotation(snap,
|
|
1189
|
+
const rMatrix = AccuDraw_1.AccuDraw.getSnapRotation(snap, viewport);
|
|
1168
1190
|
if (undefined === rMatrix)
|
|
1169
1191
|
return false;
|
|
1170
|
-
const
|
|
1171
|
-
accudraw.setContext(AccuDraw_1.AccuDrawFlags.
|
|
1192
|
+
const point = this._moveOrigin ? snap.snapPoint : accudraw.origin;
|
|
1193
|
+
accudraw.setContext(AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.AlwaysSetOrigin, point, rMatrix);
|
|
1172
1194
|
return true;
|
|
1173
1195
|
}
|
|
1174
1196
|
doManipulation(ev, isMotion) {
|
|
1175
|
-
const
|
|
1176
|
-
if (!
|
|
1177
|
-
return
|
|
1178
|
-
const
|
|
1179
|
-
if (undefined ===
|
|
1180
|
-
return
|
|
1197
|
+
const viewport = ev ? ev.viewport : IModelApp_1.IModelApp.accuDraw.currentView;
|
|
1198
|
+
if (!viewport)
|
|
1199
|
+
return false;
|
|
1200
|
+
const snap = AccuSnap_1.TentativeOrAccuSnap.getCurrentSnap(false);
|
|
1201
|
+
if (undefined === snap || !this.updateOrientation(snap, viewport, isMotion))
|
|
1202
|
+
return false;
|
|
1181
1203
|
if (undefined === ev)
|
|
1182
|
-
AccuDrawShortcuts.processPendingHints();
|
|
1204
|
+
AccuDrawShortcuts.processPendingHints(); // Would normally be processed after button down, necessary when called from post install...
|
|
1183
1205
|
if (!isMotion)
|
|
1184
|
-
IModelApp_1.IModelApp.accuDraw.changeBaseRotationMode(AccuDraw_1.RotationMode.Context); // Hold temporary rotation for tool duration
|
|
1206
|
+
IModelApp_1.IModelApp.accuDraw.changeBaseRotationMode(AccuDraw_1.RotationMode.Context); // Hold temporary rotation for tool duration...
|
|
1185
1207
|
return true;
|
|
1186
1208
|
}
|
|
1187
1209
|
}
|
|
1188
1210
|
exports.AccuDrawRotateElementTool = AccuDrawRotateElementTool;
|
|
1189
1211
|
AccuDrawRotateElementTool.toolId = "AccuDraw.RotateElement";
|
|
1190
1212
|
/** @internal */
|
|
1213
|
+
class AccuDrawRotatePerpendicularTool extends AccuDrawRotateElementTool {
|
|
1214
|
+
get wantExitOnDataButtonUp() { return true; } // Complete on button up since button down clears tentative...
|
|
1215
|
+
onManipulationComplete() {
|
|
1216
|
+
if (undefined !== this._location) {
|
|
1217
|
+
// Use tentative to hold adjusted snap location for suspended tool...
|
|
1218
|
+
IModelApp_1.IModelApp.tentativePoint.setPoint(this._location.point);
|
|
1219
|
+
IModelApp_1.IModelApp.tentativePoint.viewport = this._location.viewport;
|
|
1220
|
+
IModelApp_1.IModelApp.tentativePoint.showTentative();
|
|
1221
|
+
}
|
|
1222
|
+
return AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.Disable;
|
|
1223
|
+
}
|
|
1224
|
+
updateOrientation(snap, viewport, isMotion) {
|
|
1225
|
+
const curve = snap.getCurvePrimitive();
|
|
1226
|
+
if (undefined === curve)
|
|
1227
|
+
return false;
|
|
1228
|
+
const accudraw = IModelApp_1.IModelApp.accuDraw;
|
|
1229
|
+
const rMatrix = AccuDraw_1.AccuDraw.getSnapRotation(snap, viewport);
|
|
1230
|
+
if (undefined === rMatrix)
|
|
1231
|
+
return false;
|
|
1232
|
+
const zVec = rMatrix.getRow(2); // This is a row matrix...
|
|
1233
|
+
const spacePoint = AccuDraw_1.AccuDrawHintBuilder.projectPointToPlaneInView(accudraw.origin, snap.getPoint(), zVec, viewport, true);
|
|
1234
|
+
if (undefined === spacePoint)
|
|
1235
|
+
return false;
|
|
1236
|
+
const detail = curve.closestPoint(spacePoint, true);
|
|
1237
|
+
if (undefined === detail?.curve)
|
|
1238
|
+
return false;
|
|
1239
|
+
const point = AccuDraw_1.AccuDrawHintBuilder.projectPointToPlaneInView(detail.point, accudraw.origin, zVec, viewport, true);
|
|
1240
|
+
if (undefined === point)
|
|
1241
|
+
return false;
|
|
1242
|
+
const xVec = new core_geometry_1.Vector3d();
|
|
1243
|
+
if (normalizedDifference(point, accudraw.origin, xVec) < core_geometry_1.Geometry.smallAngleRadians)
|
|
1244
|
+
return false;
|
|
1245
|
+
; // Closest point and compass origin coincide...
|
|
1246
|
+
const yVec = xVec.unitCrossProduct(zVec);
|
|
1247
|
+
if (undefined === yVec)
|
|
1248
|
+
return false;
|
|
1249
|
+
rMatrix.setColumns(xVec, yVec, zVec);
|
|
1250
|
+
core_geometry_1.Matrix3d.createRigidFromMatrix3d(rMatrix, core_geometry_1.AxisOrder.XZY, rMatrix);
|
|
1251
|
+
rMatrix.transposeInPlace();
|
|
1252
|
+
snap.setSnapPoint(point, HitDetail_1.SnapHeat.InRange); // Force hot snap so that adjust point uses it for alignments...
|
|
1253
|
+
accudraw.setContext(AccuDraw_1.AccuDrawFlags.SetRMatrix | AccuDraw_1.AccuDrawFlags.AlwaysSetOrigin, accudraw.origin, rMatrix);
|
|
1254
|
+
accudraw.adjustPoint(point, viewport, false); // Update internals for new snap location...
|
|
1255
|
+
if (!isMotion)
|
|
1256
|
+
this._location = { point, viewport };
|
|
1257
|
+
return true;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
exports.AccuDrawRotatePerpendicularTool = AccuDrawRotatePerpendicularTool;
|
|
1261
|
+
AccuDrawRotatePerpendicularTool.toolId = "AccuDraw.RotatePerpendicular";
|
|
1262
|
+
/** @internal */
|
|
1191
1263
|
class DefineACSByElementTool extends AccuDrawShortcutsTool {
|
|
1192
1264
|
constructor() {
|
|
1193
1265
|
super(...arguments);
|
|
1194
1266
|
this._origin = core_geometry_1.Point3d.create();
|
|
1195
1267
|
this._rMatrix = core_geometry_1.Matrix3d.createIdentity();
|
|
1196
1268
|
}
|
|
1197
|
-
|
|
1198
|
-
onManipulationComplete() { return AccuDraw_1.AccuDrawFlags.SetRMatrix; }
|
|
1199
|
-
doManipulationStart() {
|
|
1200
|
-
super.doManipulationStart();
|
|
1201
|
-
Tool_1.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint");
|
|
1202
|
-
}
|
|
1269
|
+
onManipulationStart() { Tool_1.CoreTools.outputPromptByKey("AccuDraw.DefineACSByElement.Prompts.FirstPoint"); }
|
|
1203
1270
|
updateOrientation(snap, vp) {
|
|
1204
1271
|
const rMatrix = AccuDraw_1.AccuDraw.getSnapRotation(snap, vp);
|
|
1205
1272
|
if (undefined === rMatrix)
|
|
@@ -1211,10 +1278,10 @@ class DefineACSByElementTool extends AccuDrawShortcutsTool {
|
|
|
1211
1278
|
doManipulation(ev, isMotion) {
|
|
1212
1279
|
const vp = ev ? ev.viewport : undefined;
|
|
1213
1280
|
if (!vp)
|
|
1214
|
-
return
|
|
1281
|
+
return false;
|
|
1215
1282
|
const snapDetail = AccuSnap_1.TentativeOrAccuSnap.getCurrentSnap(false);
|
|
1216
1283
|
if (undefined === snapDetail || !this.updateOrientation(snapDetail, vp))
|
|
1217
|
-
return
|
|
1284
|
+
return false;
|
|
1218
1285
|
IModelApp_1.IModelApp.viewManager.invalidateDecorationsAllViews();
|
|
1219
1286
|
if (isMotion)
|
|
1220
1287
|
return true;
|
|
@@ -1243,24 +1310,20 @@ class DefineACSByPointsTool extends AccuDrawShortcutsTool {
|
|
|
1243
1310
|
super(...arguments);
|
|
1244
1311
|
this._points = [];
|
|
1245
1312
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
doManipulationStart() {
|
|
1249
|
-
super.doManipulationStart();
|
|
1250
|
-
const tentativePoint = IModelApp_1.IModelApp.tentativePoint;
|
|
1251
|
-
if (!tentativePoint.isActive) {
|
|
1313
|
+
onManipulationStart() {
|
|
1314
|
+
if (!IModelApp_1.IModelApp.tentativePoint.isActive) {
|
|
1252
1315
|
Tool_1.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.FirstPoint");
|
|
1253
1316
|
return;
|
|
1254
1317
|
}
|
|
1255
|
-
const origin = tentativePoint.getPoint().clone();
|
|
1318
|
+
const origin = IModelApp_1.IModelApp.tentativePoint.getPoint().clone();
|
|
1256
1319
|
Tool_1.CoreTools.outputPromptByKey("AccuDraw.DefineACSByPoints.Prompts.SecondPoint");
|
|
1257
1320
|
IModelApp_1.IModelApp.accuDraw.setContext(AccuDraw_1.AccuDrawFlags.SetOrigin | AccuDraw_1.AccuDrawFlags.FixedOrigin, origin);
|
|
1258
1321
|
this._points.push(origin);
|
|
1259
|
-
tentativePoint.clear(true);
|
|
1322
|
+
IModelApp_1.IModelApp.tentativePoint.clear(true);
|
|
1260
1323
|
}
|
|
1261
1324
|
doManipulation(ev, isMotion) {
|
|
1262
1325
|
if (!ev || !ev.viewport)
|
|
1263
|
-
return
|
|
1326
|
+
return false;
|
|
1264
1327
|
IModelApp_1.IModelApp.viewManager.invalidateDecorationsAllViews();
|
|
1265
1328
|
if (isMotion)
|
|
1266
1329
|
return false;
|