@itwin/editor-frontend 3.3.0-dev.48 → 3.3.0-dev.50

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SolidPrimitiveTools.d.ts","sourceRoot":"","sources":["../../src/SolidPrimitiveTools.ts"],"names":[],"mappings":"AAKA,OAAO,EAA6B,aAAa,EAAQ,QAAQ,EAAE,OAAO,EAAwD,MAAM,sBAAsB,CAAC;AAC/J,OAAO,EAAyB,4BAA4B,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC9K,OAAO,EAAuB,aAAa,EAA6E,yBAAyB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1L,OAAO,EAAE,2BAA2B,EAAuB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,sBAAsB,EAA6B,MAAM,uBAAuB,CAAC;AAEtH,0EAA0E;AAC1E,8BAAsB,kBAAmB,SAAQ,6BAA6B;IAC5E,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAM;IAC5C,SAAS,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC;IAClC,SAAS,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC;IAClC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE/B,SAAS,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ;IAChB,oBAAoB,CAAC,EAAE,EAAE,QAAQ,GAAG,SAAS,EAAE,oBAAoB,EAAE,OAAO,GAAG,OAAO;cAEtF,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;WAMjC,WAAW,CAAC,CAAC,SAAS,MAAM,2BAA2B,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE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AIvB;IAED,IAAW,KAAK,IAAI,MAAM,CAAqC;IAC/D,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAuC;IAErE,OAAO,CAAC,eAAe,CAAsC;IAC7D,IAAW,cAAc,4BAKxB;IAED,IAAW,MAAM,IAAI,OAAO,CAAsC;IAClE,IAAW,MAAM,CAAC,KAAK,EAAE,OAAO,EAAwC;cAErD,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO;cAIjC,iBAAiB,CAAC,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;cAoH9E,4BAA4B,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,SAAS;IAUzF,8BAA8B,CAAC,YAAY,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5F,4BAA4B,IAAI,UAAU,EAAE,GAAG,SAAS;IAsB3D,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAK5C"}
@@ -3,9 +3,9 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  import { BentleyError } from "@itwin/core-bentley";
6
- import { Arc3d, Cone, FrameBuilder, Loop, Matrix3d, Sphere, Vector3d, YawPitchRollAngles } from "@itwin/core-geometry";
6
+ import { Angle, Arc3d, Box, Cone, FrameBuilder, LineSegment3d, LineString3d, Loop, Matrix3d, Sphere, TorusPipe, Vector3d, YawPitchRollAngles } from "@itwin/core-geometry";
7
7
  import { Code, ElementGeometry } from "@itwin/core-common";
8
- import { AccuDrawHintBuilder, IModelApp, LengthDescription, NotifyMessageDetails, OutputMessagePriority } from "@itwin/core-frontend";
8
+ import { AccuDrawHintBuilder, AngleDescription, IModelApp, LengthDescription, NotifyMessageDetails, OutputMessagePriority } from "@itwin/core-frontend";
9
9
  import { editorBuiltInCmdIds } from "@itwin/editor-common";
10
10
  import { CreateElementWithDynamicsTool } from "./CreateElementTool";
11
11
  import { EditTools } from "./EditTool";
@@ -27,9 +27,10 @@ export class SolidPrimitiveTool extends CreateElementWithDynamicsTool {
27
27
  return EditTools.callCommand(method, ...args);
28
28
  }
29
29
  getPlacementProps() {
30
+ var _a;
30
31
  if (undefined === this.current)
31
32
  return undefined;
32
- const localToWorld = ("solid" === this.current.geometryCategory ? this.current.getConstructiveFrame() : FrameBuilder.createRightHandedFrame(undefined, this.current));
33
+ const localToWorld = ("solid" === this.current.geometryCategory ? this.current.getConstructiveFrame() : FrameBuilder.createRightHandedFrame((_a = this.baseRotation) === null || _a === void 0 ? void 0 : _a.getColumn(2), this.current));
33
34
  if (undefined === localToWorld)
34
35
  return undefined;
35
36
  const origin = localToWorld.getOrigin();
@@ -111,9 +112,7 @@ export class CreateSphereTool extends SolidPrimitiveTool {
111
112
  this.accepted.push(ev.point.clone());
112
113
  return;
113
114
  }
114
- const pt1 = this.accepted[0];
115
- const pt2 = ev.point;
116
- const vector0 = Vector3d.createStartEnd(pt1, pt2);
115
+ const vector0 = Vector3d.createStartEnd(this.accepted[0], ev.point);
117
116
  const radius = (this.useRadius ? this.radius : vector0.magnitude());
118
117
  if (!this.useRadius) {
119
118
  this.radius = radius;
@@ -129,7 +128,7 @@ export class CreateSphereTool extends SolidPrimitiveTool {
129
128
  const vector90 = normal.crossProduct(vector0);
130
129
  const matrix = Matrix3d.createColumns(vector0, vector90, normal);
131
130
  this.baseRotation = Matrix3d.createRigidFromMatrix3d(matrix);
132
- this.current = Sphere.createFromAxesAndScales(pt1, this.baseRotation, radius, radius, radius, undefined, this.capped);
131
+ this.current = Sphere.createFromAxesAndScales(this.accepted[0], this.baseRotation, radius, radius, radius, undefined, this.capped);
133
132
  if (isDynamics || undefined === this.current)
134
133
  return;
135
134
  this.accepted.push(ev.point.clone());
@@ -263,7 +262,7 @@ export class CreateCylinderTool extends SolidPrimitiveTool {
263
262
  if (isDynamics)
264
263
  break;
265
264
  // Allow creating cylinder by 2 points when orthogonal and radius are locked...
266
- this.accepted.push(ev.point.clone());
265
+ this.accepted.push(pt2.clone());
267
266
  this.createPhase = (this.orthogonal && this.useRadius ? CreateCylinderPhase.AcceptLength : CreateCylinderPhase.AcceptRadius);
268
267
  break;
269
268
  }
@@ -285,7 +284,7 @@ export class CreateCylinderTool extends SolidPrimitiveTool {
285
284
  const arc = Arc3d.create(pt1, vector0, vector90);
286
285
  this.baseRotation = Matrix3d.createRigidFromMatrix3d(arc.matrixRef); // Update base rotation from result arc...
287
286
  this.current = (this.capped ? Loop.create(arc) : arc);
288
- if (isDynamics || undefined === this.current)
287
+ if (isDynamics)
289
288
  break;
290
289
  this.createPhase = CreateCylinderPhase.AcceptLength;
291
290
  break;
@@ -482,7 +481,7 @@ export class CreateConeTool extends SolidPrimitiveTool {
482
481
  if (isDynamics)
483
482
  break;
484
483
  // Allow creating cone by 2 points when orthogonal and base/top radii are locked...
485
- this.accepted.push(ev.point.clone());
484
+ this.accepted.push(pt2.clone());
486
485
  this.createPhase = (this.orthogonal && this.useBaseRadius ? CreateConePhase.AcceptLength : CreateConePhase.AcceptBaseRadius);
487
486
  break;
488
487
  }
@@ -504,7 +503,7 @@ export class CreateConeTool extends SolidPrimitiveTool {
504
503
  const arc = Arc3d.create(pt1, vector0, vector90);
505
504
  this.baseRotation = Matrix3d.createRigidFromMatrix3d(arc.matrixRef); // Update base rotation from result arc...
506
505
  this.current = (this.capped ? Loop.create(arc) : arc);
507
- if (isDynamics || undefined === this.current)
506
+ if (isDynamics)
508
507
  break;
509
508
  this.createPhase = CreateConePhase.AcceptLength;
510
509
  break;
@@ -545,14 +544,14 @@ export class CreateConeTool extends SolidPrimitiveTool {
545
544
  const cone = ("solid" === ((_a = this.current) === null || _a === void 0 ? void 0 : _a.geometryCategory) ? this.current : undefined);
546
545
  if (undefined === cone)
547
546
  break;
548
- const vector0 = Vector3d.createStartEnd(cone.getCenterB(), ev.point);
547
+ const vector0 = Vector3d.createStartEnd(cone.getCenterB(), pt2);
549
548
  const radius = (this.useTopRadius ? this.topRadius : vector0.magnitude());
550
549
  if (!this.useTopRadius) {
551
550
  this.topRadius = radius;
552
551
  this.syncToolSettingPropertyValue(this.topRadiusProperty);
553
552
  }
554
553
  this.current = Cone.createBaseAndTarget(cone.getCenterA(), cone.getCenterB(), cone.getVectorX(), cone.getVectorY(), cone.getRadiusA(), radius, this.capped);
555
- if (isDynamics || undefined === this.current)
554
+ if (isDynamics)
556
555
  break;
557
556
  this.createPhase = CreateConePhase.AcceptResult;
558
557
  break;
@@ -578,7 +577,7 @@ export class CreateConeTool extends SolidPrimitiveTool {
578
577
  const useBaseRadiusLock = this.useBaseRadiusProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });
579
578
  toolSettings.push(this.baseRadiusProperty.toDialogItem({ rowPriority: 1, columnIndex: 1 }, useBaseRadiusLock));
580
579
  this.topRadiusProperty.isDisabled = !this.useTopRadius;
581
- const useTopRadiusLock = this.useTopRadiusProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });
580
+ const useTopRadiusLock = this.useTopRadiusProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });
582
581
  toolSettings.push(this.topRadiusProperty.toDialogItem({ rowPriority: 2, columnIndex: 1 }, useTopRadiusLock));
583
582
  this.lengthProperty.isDisabled = !this.useLength;
584
583
  const useLengthLock = this.useLengthProperty.toDialogItem({ rowPriority: 3, columnIndex: 0 });
@@ -595,4 +594,462 @@ export class CreateConeTool extends SolidPrimitiveTool {
595
594
  }
596
595
  CreateConeTool.toolId = "CreateCone";
597
596
  CreateConeTool.iconSpec = "icon-circle"; // TODO: Need better icon...
597
+ /** @alpha Creates a bix. Uses model and category from [[BriefcaseConnection.editorToolSettings]]. */
598
+ export class CreateBoxTool extends SolidPrimitiveTool {
599
+ provideToolAssistance(mainInstrText, additionalInstr) {
600
+ switch (this.accepted.length) {
601
+ case 0:
602
+ mainInstrText = EditTools.translate("CreateBox.Prompts.BasePoint");
603
+ break;
604
+ case 1:
605
+ mainInstrText = EditTools.translate("CreateBox.Prompts.LengthPoint");
606
+ break;
607
+ case 2:
608
+ mainInstrText = EditTools.translate("CreateBox.Prompts.WidthPoint");
609
+ break;
610
+ default:
611
+ mainInstrText = EditTools.translate("CreateBox.Prompts.HeightPoint");
612
+ break;
613
+ }
614
+ super.provideToolAssistance(mainInstrText, additionalInstr);
615
+ }
616
+ setupAccuDraw() {
617
+ const nPts = this.accepted.length;
618
+ if (0 === nPts)
619
+ return;
620
+ const hints = new AccuDrawHintBuilder();
621
+ hints.setModeRectangular();
622
+ hints.setOrigin(this.accepted[0]);
623
+ hints.setOriginFixed = true;
624
+ if (undefined !== this.baseRotation) {
625
+ if (2 === nPts) {
626
+ hints.setMatrix(this.baseRotation);
627
+ hints.setLockX = true;
628
+ hints.setLockZ = true;
629
+ }
630
+ else if (3 === nPts) {
631
+ hints.setXAxis2(this.baseRotation.getColumn(2));
632
+ if (this.orthogonal) {
633
+ hints.setLockY = true;
634
+ hints.setLockZ = true;
635
+ }
636
+ }
637
+ }
638
+ hints.sendHints();
639
+ }
640
+ get useLengthProperty() {
641
+ if (!this._useLengthProperty)
642
+ this._useLengthProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useBoxLength"), false);
643
+ return this._useLengthProperty;
644
+ }
645
+ get useLength() { return this.useLengthProperty.value; }
646
+ set useLength(value) { this.useLengthProperty.value = value; }
647
+ get lengthProperty() {
648
+ if (!this._lengthProperty)
649
+ this._lengthProperty = new DialogProperty(new LengthDescription("boxLength", EditTools.translate("CreateBox.Label.Length")), 0.1, undefined, !this.useLength);
650
+ return this._lengthProperty;
651
+ }
652
+ get length() { return this.lengthProperty.value; }
653
+ set length(value) { this.lengthProperty.value = value; }
654
+ get useWidthProperty() {
655
+ if (!this._useWidthProperty)
656
+ this._useWidthProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useBoxWidth"), false);
657
+ return this._useWidthProperty;
658
+ }
659
+ get useWidth() { return this.useWidthProperty.value; }
660
+ set useWidth(value) { this.useWidthProperty.value = value; }
661
+ get widthProperty() {
662
+ if (!this._widthProperty)
663
+ this._widthProperty = new DialogProperty(new LengthDescription("boxWidth", EditTools.translate("CreateBox.Label.Width")), 0.1, undefined, !this.useWidth);
664
+ return this._widthProperty;
665
+ }
666
+ get width() { return this.widthProperty.value; }
667
+ set width(value) { this.widthProperty.value = value; }
668
+ get useHeightProperty() {
669
+ if (!this._useHeightProperty)
670
+ this._useHeightProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useBoxHeight"), false);
671
+ return this._useHeightProperty;
672
+ }
673
+ get useHeight() { return this.useHeightProperty.value; }
674
+ set useHeight(value) { this.useHeightProperty.value = value; }
675
+ get heightProperty() {
676
+ if (!this._heightProperty)
677
+ this._heightProperty = new DialogProperty(new LengthDescription("boxHeight", EditTools.translate("CreateBox.Label.Height")), 0.1, undefined, !this.useHeight);
678
+ return this._heightProperty;
679
+ }
680
+ get height() { return this.heightProperty.value; }
681
+ set height(value) { this.heightProperty.value = value; }
682
+ get cappedProperty() {
683
+ if (!this._cappedProperty)
684
+ this._cappedProperty = new DialogProperty(PropertyDescriptionHelper.buildToggleDescription("boxCapped", EditTools.translate("CreateBox.Label.Capped")), true);
685
+ return this._cappedProperty;
686
+ }
687
+ get capped() { return this.cappedProperty.value; }
688
+ set capped(value) { this.cappedProperty.value = value; }
689
+ get orthogonalProperty() {
690
+ if (!this._orthogonalProperty)
691
+ this._orthogonalProperty = new DialogProperty(PropertyDescriptionHelper.buildToggleDescription("boxOrthogonal", EditTools.translate("CreateBox.Label.Orthogonal")), true);
692
+ return this._orthogonalProperty;
693
+ }
694
+ get orthogonal() { return this.orthogonalProperty.value; }
695
+ set orthogonal(value) { this.orthogonalProperty.value = value; }
696
+ isComplete(_ev) {
697
+ return (4 === this.accepted.length);
698
+ }
699
+ async updateElementData(ev, isDynamics) {
700
+ const vp = this.targetView;
701
+ if (undefined === vp)
702
+ return;
703
+ switch (this.accepted.length) {
704
+ case 0: {
705
+ if (!isDynamics)
706
+ this.accepted.push(ev.point.clone());
707
+ break;
708
+ }
709
+ case 1: {
710
+ const vector0 = Vector3d.createStartEnd(this.accepted[0], ev.point);
711
+ const length = (this.useLength ? this.length : vector0.magnitude());
712
+ if (!this.useLength) {
713
+ this.length = length;
714
+ this.syncToolSettingPropertyValue(this.lengthProperty);
715
+ }
716
+ if (undefined === vector0.scaleToLength(length, vector0)) {
717
+ this.current = undefined;
718
+ this.clearGraphics();
719
+ return;
720
+ }
721
+ this.baseRotation = AccuDrawHintBuilder.getCurrentRotation(vp, true, true);
722
+ const normal = this.baseRotation ? this.baseRotation.getColumn(2) : Vector3d.unitZ();
723
+ const vector90 = normal.crossProduct(vector0);
724
+ const matrix = Matrix3d.createColumns(vector0, vector90, normal);
725
+ this.baseRotation = Matrix3d.createRigidFromMatrix3d(matrix);
726
+ this.current = LineSegment3d.create(this.accepted[0], this.accepted[0].plus(vector0));
727
+ if (isDynamics)
728
+ return;
729
+ this.accepted.push(ev.point.clone());
730
+ break;
731
+ }
732
+ case 2: {
733
+ const vector90 = Vector3d.createStartEnd(this.accepted[0], ev.point);
734
+ const width = (this.useWidth ? this.width : vector90.magnitude());
735
+ if (!this.useWidth) {
736
+ this.width = width;
737
+ this.syncToolSettingPropertyValue(this.widthProperty);
738
+ }
739
+ const vector0 = this.baseRotation ? this.baseRotation.getColumn(0) : Vector3d.unitX();
740
+ const normal = vector90.crossProduct(vector0);
741
+ const matrix = Matrix3d.createColumns(vector0, vector90, normal);
742
+ if (undefined === vector90.scaleToLength(width, vector90) || undefined === Matrix3d.createRigidFromMatrix3d(matrix, undefined, matrix)) {
743
+ this.current = LineSegment3d.create(this.accepted[0], this.accepted[0].plusScaled(vector0, this.length));
744
+ return;
745
+ }
746
+ this.baseRotation = matrix; // Update base rotation from cross product...
747
+ const shapePts = [];
748
+ shapePts[0] = this.accepted[0].clone();
749
+ shapePts[1] = shapePts[0].plusScaled(this.baseRotation.getColumn(0), this.length);
750
+ shapePts[2] = shapePts[1].plusScaled(this.baseRotation.getColumn(1), width);
751
+ shapePts[3] = shapePts[0].plusScaled(this.baseRotation.getColumn(1), width);
752
+ shapePts[4] = shapePts[0].clone();
753
+ const base = LineString3d.create(shapePts);
754
+ this.current = (this.capped ? Loop.create(base) : base);
755
+ if (isDynamics)
756
+ return;
757
+ this.accepted.push(ev.point.clone());
758
+ break;
759
+ }
760
+ default: {
761
+ if (undefined === this.baseRotation)
762
+ return; // Should always have base rotation after width is defined...
763
+ const zAxis = Vector3d.createStartEnd(this.accepted[0], ev.point);
764
+ const height = (this.useHeight ? this.height : zAxis.magnitude());
765
+ if (!this.useHeight) {
766
+ this.height = height;
767
+ this.syncToolSettingPropertyValue(this.heightProperty);
768
+ }
769
+ if (undefined === zAxis.scaleToLength(height, zAxis)) {
770
+ const shapePts = [];
771
+ shapePts[0] = this.accepted[0].clone();
772
+ shapePts[1] = shapePts[0].plusScaled(this.baseRotation.getColumn(0), this.length);
773
+ shapePts[2] = shapePts[1].plusScaled(this.baseRotation.getColumn(1), this.width);
774
+ shapePts[3] = shapePts[0].plusScaled(this.baseRotation.getColumn(1), this.width);
775
+ shapePts[4] = shapePts[0].clone();
776
+ const base = LineString3d.create(shapePts);
777
+ this.current = (this.capped ? Loop.create(base) : base);
778
+ return;
779
+ }
780
+ if (this.orthogonal) {
781
+ const normal = this.baseRotation.getColumn(2);
782
+ normal.scaleToLength(normal.dotProduct(zAxis) >= 0.0 ? height : -height, zAxis);
783
+ }
784
+ this.current = Box.createDgnBoxWithAxes(this.accepted[0], this.baseRotation, this.accepted[0].plus(zAxis), this.length, this.width, this.length, this.width, this.capped);
785
+ if (isDynamics || undefined === this.current)
786
+ return;
787
+ this.accepted.push(ev.point.clone());
788
+ break;
789
+ }
790
+ }
791
+ }
792
+ getToolSettingPropertyLocked(property) {
793
+ if (property === this.useLengthProperty)
794
+ return this.lengthProperty;
795
+ else if (property === this.useWidthProperty)
796
+ return this.widthProperty;
797
+ else if (property === this.useHeightProperty)
798
+ return this.heightProperty;
799
+ return undefined;
800
+ }
801
+ async applyToolSettingPropertyChange(updatedValue) {
802
+ return this.changeToolSettingPropertyValue(updatedValue);
803
+ }
804
+ supplyToolSettingsProperties() {
805
+ this.initializeToolSettingPropertyValues([this.lengthProperty, this.useLengthProperty, this.widthProperty, this.useWidthProperty, this.heightProperty, this.useHeightProperty, this.orthogonalProperty, this.cappedProperty]);
806
+ const toolSettings = new Array();
807
+ this.lengthProperty.isDisabled = !this.useLength;
808
+ const useLengthLock = this.useLengthProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });
809
+ toolSettings.push(this.lengthProperty.toDialogItem({ rowPriority: 1, columnIndex: 1 }, useLengthLock));
810
+ this.widthProperty.isDisabled = !this.useWidth;
811
+ const useWidthLock = this.useWidthProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });
812
+ toolSettings.push(this.widthProperty.toDialogItem({ rowPriority: 2, columnIndex: 1 }, useWidthLock));
813
+ this.heightProperty.isDisabled = !this.useHeight;
814
+ const useHeightLock = this.useHeightProperty.toDialogItem({ rowPriority: 3, columnIndex: 0 });
815
+ toolSettings.push(this.heightProperty.toDialogItem({ rowPriority: 3, columnIndex: 1 }, useHeightLock));
816
+ toolSettings.push(this.orthogonalProperty.toDialogItem({ rowPriority: 4, columnIndex: 0 }));
817
+ toolSettings.push(this.cappedProperty.toDialogItem({ rowPriority: 5, columnIndex: 0 }));
818
+ return toolSettings;
819
+ }
820
+ async onRestartTool() {
821
+ const tool = new CreateBoxTool();
822
+ if (!await tool.run())
823
+ return this.exitTool();
824
+ }
825
+ }
826
+ CreateBoxTool.toolId = "CreateBox";
827
+ CreateBoxTool.iconSpec = "icon-circle"; // TODO: Need better icon...
828
+ /** @alpha Values for [[CreateTorusTool.createPhase]. */
829
+ export var CreateTorusPhase;
830
+ (function (CreateTorusPhase) {
831
+ /** Current tool phase to define start point */
832
+ CreateTorusPhase[CreateTorusPhase["AcceptStart"] = 0] = "AcceptStart";
833
+ /** Current tool phase to define center point */
834
+ CreateTorusPhase[CreateTorusPhase["AcceptCenter"] = 1] = "AcceptCenter";
835
+ /** Current tool phase to define sweep angle and secondary radius */
836
+ CreateTorusPhase[CreateTorusPhase["AcceptAngle"] = 2] = "AcceptAngle";
837
+ /** Current tool phase to accept result */
838
+ CreateTorusPhase[CreateTorusPhase["AcceptResult"] = 3] = "AcceptResult";
839
+ })(CreateTorusPhase || (CreateTorusPhase = {}));
840
+ /** @alpha Creates a torus pipe. Uses model and category from [[BriefcaseConnection.editorToolSettings]]. */
841
+ export class CreateTorusTool extends SolidPrimitiveTool {
842
+ constructor() {
843
+ super(...arguments);
844
+ this.createPhase = CreateTorusPhase.AcceptStart;
845
+ }
846
+ provideToolAssistance(mainInstrText, additionalInstr) {
847
+ switch (this.createPhase) {
848
+ case CreateTorusPhase.AcceptStart:
849
+ mainInstrText = EditTools.translate("CreateTorus.Prompts.StartPoint");
850
+ break;
851
+ case CreateTorusPhase.AcceptCenter:
852
+ mainInstrText = EditTools.translate("CreateTorus.Prompts.CenterPoint");
853
+ break;
854
+ default:
855
+ mainInstrText = EditTools.translate("CreateTorus.Prompts.AnglePoint");
856
+ break;
857
+ }
858
+ super.provideToolAssistance(mainInstrText, additionalInstr);
859
+ }
860
+ setupAccuDraw() {
861
+ const nPts = this.accepted.length;
862
+ if (0 === nPts)
863
+ return;
864
+ const hints = new AccuDrawHintBuilder();
865
+ if (CreateTorusPhase.AcceptCenter === this.createPhase) {
866
+ hints.setOrigin(this.accepted[0]);
867
+ }
868
+ else if (CreateTorusPhase.AcceptAngle === this.createPhase && 2 === nPts) {
869
+ hints.setModePolar();
870
+ hints.setOrigin(this.accepted[1]);
871
+ hints.setOriginFixed = true;
872
+ if (undefined !== this.baseRotation)
873
+ hints.setMatrix(this.baseRotation);
874
+ }
875
+ hints.sendHints();
876
+ }
877
+ get usePrimaryRadiusProperty() {
878
+ if (!this._usePrimaryRadiusProperty)
879
+ this._usePrimaryRadiusProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useTorusPrimaryRadius"), false);
880
+ return this._usePrimaryRadiusProperty;
881
+ }
882
+ get usePrimaryRadius() { return this.usePrimaryRadiusProperty.value; }
883
+ set usePrimaryRadius(value) { this.usePrimaryRadiusProperty.value = value; }
884
+ get primaryRadiusProperty() {
885
+ if (!this._primaryRadiusProperty)
886
+ this._primaryRadiusProperty = new DialogProperty(new LengthDescription("torusPrimaryRadius", EditTools.translate("CreateTorus.Label.PrimaryRadius")), 0.1, undefined, !this.usePrimaryRadius);
887
+ return this._primaryRadiusProperty;
888
+ }
889
+ get primaryRadius() { return this.primaryRadiusProperty.value; }
890
+ set primaryRadius(value) { this.primaryRadiusProperty.value = value; }
891
+ get useSecondaryRadiusProperty() {
892
+ if (!this._useSecondaryRadiusProperty)
893
+ this._useSecondaryRadiusProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useTorusSecondaryRadius"), false);
894
+ return this._useSecondaryRadiusProperty;
895
+ }
896
+ get useSecondaryRadius() { return this.useSecondaryRadiusProperty.value; }
897
+ set useSecondaryRadius(value) { this.useSecondaryRadiusProperty.value = value; }
898
+ get secondaryRadiusProperty() {
899
+ if (!this._secondaryRadiusProperty)
900
+ this._secondaryRadiusProperty = new DialogProperty(new LengthDescription("torusSecondaryRadius", EditTools.translate("CreateTorus.Label.SecondaryRadius")), 0.05, undefined, !this.useSecondaryRadius);
901
+ return this._secondaryRadiusProperty;
902
+ }
903
+ get secondaryRadius() { return this.secondaryRadiusProperty.value; }
904
+ set secondaryRadius(value) { this.secondaryRadiusProperty.value = value; }
905
+ get useAngleProperty() {
906
+ if (!this._useAngleProperty)
907
+ this._useAngleProperty = new DialogProperty(PropertyDescriptionHelper.buildLockPropertyDescription("useTorusAngle"), false);
908
+ return this._useAngleProperty;
909
+ }
910
+ get useAngle() { return this.useAngleProperty.value; }
911
+ set useAngle(value) { this.useAngleProperty.value = value; }
912
+ get angleProperty() {
913
+ if (!this._angleProperty)
914
+ this._angleProperty = new DialogProperty(new AngleDescription("torusAngle", EditTools.translate("CreateTorus.Label.Angle")), Math.PI / 2.0, undefined, !this.useAngle);
915
+ return this._angleProperty;
916
+ }
917
+ get angle() { return this.angleProperty.value; }
918
+ set angle(value) { this.angleProperty.value = value; }
919
+ get cappedProperty() {
920
+ if (!this._cappedProperty)
921
+ this._cappedProperty = new DialogProperty(PropertyDescriptionHelper.buildToggleDescription("torusCapped", EditTools.translate("CreateTorus.Label.Capped")), true);
922
+ return this._cappedProperty;
923
+ }
924
+ get capped() { return this.cappedProperty.value; }
925
+ set capped(value) { this.cappedProperty.value = value; }
926
+ isComplete(_ev) {
927
+ return (CreateTorusPhase.AcceptResult === this.createPhase);
928
+ }
929
+ async updateElementData(ev, isDynamics) {
930
+ const vp = this.targetView;
931
+ if (undefined === vp)
932
+ return;
933
+ switch (this.createPhase) {
934
+ case CreateTorusPhase.AcceptStart: {
935
+ if (isDynamics)
936
+ break;
937
+ this.accepted.push(ev.point.clone());
938
+ this.createPhase = CreateTorusPhase.AcceptCenter;
939
+ break;
940
+ }
941
+ case CreateTorusPhase.AcceptCenter: {
942
+ this.baseRotation = AccuDrawHintBuilder.getCurrentRotation(vp, true, true);
943
+ const normal = this.baseRotation ? this.baseRotation.getColumn(2) : Vector3d.unitZ();
944
+ const vector0 = Vector3d.createStartEnd(ev.point, this.accepted[0]);
945
+ const vector90 = normal.crossProduct(vector0);
946
+ const primaryRadius = (this.usePrimaryRadius ? this.primaryRadius : vector0.magnitude());
947
+ if (!this.usePrimaryRadius) {
948
+ this.primaryRadius = primaryRadius;
949
+ this.syncToolSettingPropertyValue(this.primaryRadiusProperty);
950
+ }
951
+ if (undefined === vector0.scaleToLength(primaryRadius, vector0) || undefined === vector90.scaleToLength(primaryRadius, vector90)) {
952
+ this.current = undefined;
953
+ this.clearGraphics();
954
+ return;
955
+ }
956
+ const center = this.accepted[0].plus(vector0.negate());
957
+ const allowComplete = (this.useSecondaryRadius && this.useAngle && (2 * Math.PI) === this.angle);
958
+ if (allowComplete) {
959
+ vector0.normalizeInPlace();
960
+ vector90.normalizeInPlace();
961
+ this.current = TorusPipe.createDgnTorusPipe(center, vector0, vector90, primaryRadius, this.secondaryRadius, Angle.createRadians(this.angle), this.capped);
962
+ if (undefined === this.current) {
963
+ this.clearGraphics();
964
+ break;
965
+ }
966
+ if (!isDynamics)
967
+ this.createPhase = CreateTorusPhase.AcceptResult;
968
+ break;
969
+ }
970
+ const arc = Arc3d.create(center, vector0, vector90);
971
+ this.baseRotation = Matrix3d.createRigidFromMatrix3d(arc.matrixRef); // Update base rotation from result arc...
972
+ this.current = arc;
973
+ if (isDynamics)
974
+ break;
975
+ this.accepted.push(arc.center); // Add center to accepted points for AccuDraw hints...
976
+ this.createPhase = CreateTorusPhase.AcceptAngle;
977
+ break;
978
+ }
979
+ case CreateTorusPhase.AcceptAngle: {
980
+ const vector90 = Vector3d.createStartEnd(this.accepted[1], ev.point);
981
+ const secondaryRadius = (this.useSecondaryRadius ? this.secondaryRadius : Math.min(this.primaryRadius, Math.abs(this.primaryRadius - vector90.magnitude())));
982
+ if (!this.useSecondaryRadius) {
983
+ this.secondaryRadius = secondaryRadius;
984
+ this.syncToolSettingPropertyValue(this.secondaryRadiusProperty);
985
+ }
986
+ const xAxis = this.baseRotation ? this.baseRotation.getColumn(0) : Vector3d.unitX();
987
+ const yAxis = this.baseRotation ? this.baseRotation.getColumn(1) : Vector3d.unitY();
988
+ const zAxis = this.baseRotation ? this.baseRotation.getColumn(2) : Vector3d.unitZ();
989
+ const prevSweep = Angle.createRadians(this.angle);
990
+ const sweep = xAxis.planarAngleTo(vector90, zAxis);
991
+ if (Math.abs(sweep.radians) < Angle.createDegrees(30.0).radians && prevSweep.isFullCircle && ((sweep.radians < 0.0 && prevSweep.radians > 0.0) || (sweep.radians > 0.0 && prevSweep.radians < 0.0)))
992
+ prevSweep.setRadians(-prevSweep.radians); // Reverse direction...
993
+ if (sweep.isAlmostZero)
994
+ sweep.setDegrees(prevSweep.radians < 0.0 ? -360.0 : 360.0); // Create full sweep...
995
+ if (this.useAngle) {
996
+ if ((sweep.radians < 0.0 && this.angle > 0.0) || (sweep.radians > 0.0 && this.angle < 0.0))
997
+ sweep.setRadians(-this.angle);
998
+ else
999
+ sweep.setRadians(this.angle);
1000
+ }
1001
+ else {
1002
+ if (sweep.radians < 0.0 && prevSweep.radians > 0.0)
1003
+ sweep.setRadians(Angle.pi2Radians + sweep.radians);
1004
+ else if (sweep.radians > 0.0 && prevSweep.radians < 0.0)
1005
+ sweep.setRadians(-(Angle.pi2Radians - sweep.radians));
1006
+ this.angle = sweep.radians;
1007
+ this.syncToolSettingPropertyValue(this.angleProperty);
1008
+ }
1009
+ this.current = TorusPipe.createDgnTorusPipe(this.accepted[1], xAxis, yAxis, this.primaryRadius, secondaryRadius, sweep, this.capped);
1010
+ if (undefined === this.current) {
1011
+ this.clearGraphics();
1012
+ break;
1013
+ }
1014
+ if (!isDynamics)
1015
+ this.createPhase = CreateTorusPhase.AcceptResult;
1016
+ break;
1017
+ }
1018
+ }
1019
+ }
1020
+ getToolSettingPropertyLocked(property) {
1021
+ if (property === this.usePrimaryRadiusProperty)
1022
+ return this.primaryRadiusProperty;
1023
+ else if (property === this.useSecondaryRadiusProperty)
1024
+ return this.secondaryRadiusProperty;
1025
+ else if (property === this.useAngleProperty)
1026
+ return this.angleProperty;
1027
+ return undefined;
1028
+ }
1029
+ async applyToolSettingPropertyChange(updatedValue) {
1030
+ return this.changeToolSettingPropertyValue(updatedValue);
1031
+ }
1032
+ supplyToolSettingsProperties() {
1033
+ this.initializeToolSettingPropertyValues([this.primaryRadiusProperty, this.usePrimaryRadiusProperty, this.secondaryRadiusProperty, this.useSecondaryRadiusProperty, this.angleProperty, this.useAngleProperty, this.cappedProperty]);
1034
+ const toolSettings = new Array();
1035
+ this.primaryRadiusProperty.isDisabled = !this.usePrimaryRadius;
1036
+ const usePrimaryRadiusLock = this.usePrimaryRadiusProperty.toDialogItem({ rowPriority: 1, columnIndex: 0 });
1037
+ toolSettings.push(this.primaryRadiusProperty.toDialogItem({ rowPriority: 1, columnIndex: 1 }, usePrimaryRadiusLock));
1038
+ this.secondaryRadiusProperty.isDisabled = !this.useSecondaryRadius;
1039
+ const useSecondaryRadiusLock = this.useSecondaryRadiusProperty.toDialogItem({ rowPriority: 2, columnIndex: 0 });
1040
+ toolSettings.push(this.secondaryRadiusProperty.toDialogItem({ rowPriority: 2, columnIndex: 1 }, useSecondaryRadiusLock));
1041
+ this.angleProperty.isDisabled = !this.useAngle;
1042
+ const useAngleLock = this.useAngleProperty.toDialogItem({ rowPriority: 3, columnIndex: 0 });
1043
+ toolSettings.push(this.angleProperty.toDialogItem({ rowPriority: 3, columnIndex: 1 }, useAngleLock));
1044
+ toolSettings.push(this.cappedProperty.toDialogItem({ rowPriority: 4, columnIndex: 0 }));
1045
+ return toolSettings;
1046
+ }
1047
+ async onRestartTool() {
1048
+ const tool = new CreateTorusTool();
1049
+ if (!await tool.run())
1050
+ return this.exitTool();
1051
+ }
1052
+ }
1053
+ CreateTorusTool.toolId = "CreateTorus";
1054
+ CreateTorusTool.iconSpec = "icon-circle"; // TODO: Need better icon...
598
1055
  //# sourceMappingURL=SolidPrimitiveTools.js.map