mxcad 1.0.57 → 1.0.59

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/dist/mxcad.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import _D, { MxFun as d, MrxDbgUiPrPoint as M, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as L, MrxDbgUiPrBaseReturn as g, MxDbCircleShape as aD, MxDbLine as $, MxDbPolyline as QD, MxDbCircleArc as _, Mx3PointArc as ZD, MxDbEllipseShape as YD, McEdGetPointWorldDrawObject as XD, MxDbEllipse as DC } from "mxdraw";
1
+ import _D, { MxFun as d, MrxDbgUiPrPoint as T, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as S, MrxDbgUiPrBaseReturn as y, MxDbCircleShape as aD, MxDbLine as J, MxDbPolyline as ZD, MxDbCircleArc as q, Mx3PointArc as YD, MxDbEllipseShape as QD, McEdGetPointWorldDrawObject as XD, MxDbEllipse as DC } from "mxdraw";
2
2
  function uD(E) {
3
3
  return btoa(unescape(encodeURIComponent(E)));
4
4
  }
@@ -56,14 +56,15 @@ function pD(E, D) {
56
56
  B.href = window.URL.createObjectURL(C), B.download = D, B.click();
57
57
  });
58
58
  }
59
- const H = {
59
+ const N = {
60
60
  b64Encode: uD,
61
61
  b64Decode: lD,
62
62
  saveAsFileDialog: cD,
63
63
  downloadFile: mD,
64
64
  downloadFileFromUrl: pD
65
65
  };
66
- class p {
66
+ class m {
67
+ static kOrigin;
67
68
  imp;
68
69
  constructor(D, C, B) {
69
70
  this.imp = new i.mxcadassemblyimp.MdGePoint3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
@@ -71,8 +72,26 @@ class p {
71
72
  copy(D) {
72
73
  return this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z, this;
73
74
  }
75
+ transformBy(D) {
76
+ return this.imp.transformBy(D.imp), this;
77
+ }
78
+ addvec(D) {
79
+ return this.imp.addvec(D.imp), this;
80
+ }
81
+ subvec(D) {
82
+ return this.imp.subvec(D.imp), this;
83
+ }
84
+ sub(D) {
85
+ return new w(this.imp.sub(D.imp));
86
+ }
87
+ distanceTo(D) {
88
+ return this.imp.distanceTo(D.imp);
89
+ }
90
+ isEqualTo(D) {
91
+ return this.imp.isEqualTo(D.imp);
92
+ }
74
93
  clone() {
75
- return new p(this.imp);
94
+ return new m(this.imp);
76
95
  }
77
96
  get x() {
78
97
  return this.imp.x;
@@ -93,19 +112,22 @@ class p {
93
112
  this.imp.z = D;
94
113
  }
95
114
  }
96
- class G {
115
+ class w {
116
+ static kXAxis;
117
+ static kYAxis;
118
+ static kZAxis;
97
119
  imp;
98
120
  constructor(D, C, B) {
99
121
  this.imp = new i.mxcadassemblyimp.MdGeVector3d(), D instanceof Object ? (this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z) : (this.imp.x = D || 0, this.imp.y = C || 0, this.imp.z = B || 0);
100
122
  }
101
123
  copy(D) {
102
- return this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z, this;
124
+ return this.imp.x = D.imp.x, this.imp.y = D.imp.y, this.imp.z = D.imp.z, this;
103
125
  }
104
126
  clone() {
105
- return new G(this.imp);
127
+ return new w(this.imp);
106
128
  }
107
129
  rotateBy(D, C) {
108
- return this.imp.rotateBy(D, C), this;
130
+ return this.imp.rotateBy(D, C.imp), this;
109
131
  }
110
132
  negate() {
111
133
  return this.imp.negate(), this;
@@ -135,7 +157,7 @@ class G {
135
157
  return this.imp.dotProduct(D.imp);
136
158
  }
137
159
  crossProduct(D) {
138
- let C = new G();
160
+ let C = new w();
139
161
  return C.imp = this.imp.crossProduct(D.imp), C;
140
162
  }
141
163
  isEqualTo(D) {
@@ -160,7 +182,8 @@ class G {
160
182
  this.imp.z = D;
161
183
  }
162
184
  }
163
- class Z {
185
+ class W {
186
+ static kIdentity;
164
187
  imp;
165
188
  constructor(D) {
166
189
  this.imp = i.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
@@ -169,7 +192,7 @@ class Z {
169
192
  return this.imp.copy(D.imp), this;
170
193
  }
171
194
  clone() {
172
- return new Z(this.imp);
195
+ return new W(this.imp);
173
196
  }
174
197
  setToIdentity() {
175
198
  return this.imp.setToIdentity(), this;
@@ -266,11 +289,11 @@ class CC {
266
289
  return C;
267
290
  }
268
291
  }
269
- let y = new CC();
292
+ let x = new CC();
270
293
  const BC = new FinalizationRegistry((E) => {
271
294
  i.App.DestroyObject(E);
272
295
  }), EC = {};
273
- class v {
296
+ class O {
274
297
  imp = 0;
275
298
  constructor(D) {
276
299
  this.imp = D, this.imp && BC.register(this, D, EC);
@@ -289,15 +312,15 @@ class v {
289
312
  }
290
313
  getJson() {
291
314
  let D = this.imp.getJson();
292
- return y.decodeFromGb2312(D);
315
+ return x.decodeFromGb2312(D);
293
316
  }
294
317
  setJson(D) {
295
- let C = y.encodeToGb2312(D);
318
+ let C = x.encodeToGb2312(D);
296
319
  return this.imp.setJson(C);
297
320
  }
298
321
  }
299
- var x = /* @__PURE__ */ ((E) => (E[E.kMxCAD = 0] = "kMxCAD", E[E.kMxDraw = 1] = "kMxDraw", E[E.kInvalid = 2] = "kInvalid", E))(x || {});
300
- class f {
322
+ var b = /* @__PURE__ */ ((E) => (E[E.kMxCAD = 0] = "kMxCAD", E[E.kMxDraw = 1] = "kMxDraw", E[E.kInvalid = 2] = "kInvalid", E))(b || {});
323
+ class M {
301
324
  id;
302
325
  type;
303
326
  constructor(D, C) {
@@ -326,7 +349,7 @@ class f {
326
349
  return this.type == 1 ? d.getCurrentDraw().getMxEntity(this.id) : null;
327
350
  }
328
351
  }
329
- class S extends v {
352
+ class v extends O {
330
353
  constructor(D) {
331
354
  super(D);
332
355
  }
@@ -362,7 +385,7 @@ var BD;
362
385
  D[D.kLnWt000 = 0] = "kLnWt000", D[D.kLnWt005 = 5] = "kLnWt005", D[D.kLnWt009 = 9] = "kLnWt009", D[D.kLnWt013 = 13] = "kLnWt013", D[D.kLnWt015 = 15] = "kLnWt015", D[D.kLnWt018 = 18] = "kLnWt018", D[D.kLnWt020 = 20] = "kLnWt020", D[D.kLnWt025 = 25] = "kLnWt025", D[D.kLnWt030 = 30] = "kLnWt030", D[D.kLnWt035 = 35] = "kLnWt035", D[D.kLnWt040 = 40] = "kLnWt040", D[D.kLnWt050 = 50] = "kLnWt050", D[D.kLnWt053 = 53] = "kLnWt053", D[D.kLnWt060 = 60] = "kLnWt060", D[D.kLnWt070 = 70] = "kLnWt070", D[D.kLnWt080 = 80] = "kLnWt080", D[D.kLnWt090 = 90] = "kLnWt090", D[D.kLnWt100 = 100] = "kLnWt100", D[D.kLnWt106 = 106] = "kLnWt106", D[D.kLnWt120 = 120] = "kLnWt120", D[D.kLnWt140 = 140] = "kLnWt140", D[D.kLnWt158 = 158] = "kLnWt158", D[D.kLnWt200 = 200] = "kLnWt200", D[D.kLnWt211 = 211] = "kLnWt211", D[D.kLnWtByLayer = -1] = "kLnWtByLayer", D[D.kLnWtByBlock = -2] = "kLnWtByBlock", D[D.kLnWtByLwDefault = -3] = "kLnWtByLwDefault";
363
386
  })(E.LineWeight || (E.LineWeight = {}));
364
387
  })(BD || (BD = {}));
365
- class O {
388
+ class j {
366
389
  imp;
367
390
  constructor(D, C, B) {
368
391
  this.imp = new i.mxcadassemblyimp.MdCmColor(), D instanceof Object ? (this.imp.red = D.red, this.imp.green = D.green, this.imp.blue = D.blue, this.imp.method = D.method, this.imp.n = D.n, this.imp.colorIndex = D.colorIndex) : D && C && B && this.imp.setRGB(D, C, B);
@@ -374,7 +397,7 @@ class O {
374
397
  return this.imp.red = D.imp.red, this.imp.green = D.imp.green, this.imp.blue = D.imp.blue, this.imp.method = D.imp.method, this.imp.n = D.imp.n, this.imp.colorIndex = D.imp.colorIndex, this;
375
398
  }
376
399
  clone() {
377
- return new O(this.imp);
400
+ return new j(this.imp);
378
401
  }
379
402
  setColorIndex(D) {
380
403
  this.imp.setColorIndex(D);
@@ -419,7 +442,7 @@ class O {
419
442
  this.imp.colorIndex = D;
420
443
  }
421
444
  }
422
- class FC extends S {
445
+ class FC extends v {
423
446
  constructor(D) {
424
447
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLayerTableRecord());
425
448
  }
@@ -448,13 +471,13 @@ class FC extends S {
448
471
  this.imp.setIsLocked(D);
449
472
  }
450
473
  get color() {
451
- return new O(this.imp.color());
474
+ return new j(this.imp.color());
452
475
  }
453
476
  set color(D) {
454
477
  this.imp.setColor(D.getImp());
455
478
  }
456
479
  get linetypeObjectId() {
457
- return new f(this.imp.linetypeObjectId(), x.kMxCAD);
480
+ return new M(this.imp.linetypeObjectId(), b.kMxCAD);
458
481
  }
459
482
  set linetypeObjectId(D) {
460
483
  this.imp.setLinetypeObjectId(D.id);
@@ -466,22 +489,22 @@ class FC extends S {
466
489
  this.imp.setLineWeight(D);
467
490
  }
468
491
  }
469
- class dD extends S {
492
+ class dD extends v {
470
493
  constructor(D) {
471
494
  super(D);
472
495
  }
473
496
  }
474
- class hD extends S {
497
+ class hD extends v {
475
498
  constructor(D) {
476
499
  super(D);
477
500
  }
478
501
  }
479
- class wD extends S {
502
+ class wD extends v {
480
503
  constructor(D) {
481
504
  super(D);
482
505
  }
483
506
  }
484
- class ED extends v {
507
+ class ED extends O {
485
508
  constructor(D) {
486
509
  super(D);
487
510
  }
@@ -498,7 +521,7 @@ class ED extends v {
498
521
  return new xD(this.imp.GetBlockTable());
499
522
  }
500
523
  CurrentSpace() {
501
- return new Y(this.imp.CurrentSpace());
524
+ return new Q(this.imp.CurrentSpace());
502
525
  }
503
526
  GetCurrentlyLineTypeScale() {
504
527
  return this.imp.GetCurrentlyLineTypeScale();
@@ -508,22 +531,22 @@ class ED extends v {
508
531
  }
509
532
  GetCurrentlyLineTypeName() {
510
533
  let D = this.imp.GetCurrentlyLineTypeName();
511
- return y.decodeFromGb2312(D);
534
+ return x.decodeFromGb2312(D);
512
535
  }
513
536
  SetCurrentlyLineTypeName(D) {
514
- let C = y.encodeToGb2312(D);
537
+ let C = x.encodeToGb2312(D);
515
538
  this.imp.SetCurrentlyLineTypeName(C);
516
539
  }
517
540
  GetCurrentlyLayerName() {
518
541
  let D = this.imp.GetCurrentlyLayerName();
519
- return y.decodeFromGb2312(D);
542
+ return x.decodeFromGb2312(D);
520
543
  }
521
544
  SetCurrentlyLayerName(D) {
522
- let C = y.encodeToGb2312(D);
545
+ let C = x.encodeToGb2312(D);
523
546
  this.imp.SetCurrentlyLayerName(C);
524
547
  }
525
548
  GetCurrentlyTrueColor() {
526
- return new O(this.imp.GetCurrentlyTrueColor());
549
+ return new j(this.imp.GetCurrentlyTrueColor());
527
550
  }
528
551
  SetCurrentlyTrueColor(D) {
529
552
  return this.imp.SetCurrentlyTrueColor(D.getImp());
@@ -536,14 +559,14 @@ class ED extends v {
536
559
  }
537
560
  GetCurrentlyTextStyleName() {
538
561
  let D = this.imp.GetCurrentlyTextStyleName();
539
- return y.decodeFromGb2312(D);
562
+ return x.decodeFromGb2312(D);
540
563
  }
541
564
  SetCurrentlyTextStyle(D) {
542
- let C = y.encodeToGb2312(D);
565
+ let C = x.encodeToGb2312(D);
543
566
  this.imp.SetCurrentlyTextStyle(C);
544
567
  }
545
568
  }
546
- class gD extends v {
569
+ class gD extends O {
547
570
  constructor(D) {
548
571
  super(D);
549
572
  }
@@ -554,20 +577,20 @@ class gD extends v {
554
577
  return this.imp.done();
555
578
  }
556
579
  getEntityId() {
557
- return new f(this.imp.getEntityId(), x.kMxCAD);
580
+ return new M(this.imp.getEntityId(), b.kMxCAD);
558
581
  }
559
582
  step(D = !0, C = !0) {
560
583
  return this.imp.step(D, C);
561
584
  }
562
585
  }
563
- class Y extends S {
586
+ class Q extends v {
564
587
  constructor(D) {
565
588
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTableRecord());
566
589
  }
567
590
  appendAcDbEntity(D) {
568
- return new f(
591
+ return new M(
569
592
  this.imp.appendAcDbEntity(D.getImp()),
570
- x.kMxCAD
593
+ b.kMxCAD
571
594
  );
572
595
  }
573
596
  newIterator(D = !0, C = !0) {
@@ -575,13 +598,13 @@ class Y extends S {
575
598
  return new gD(B);
576
599
  }
577
600
  get origin() {
578
- return new p(this.imp.origin());
601
+ return new m(this.imp.origin());
579
602
  }
580
603
  set origin(D) {
581
604
  this.imp.setOrigin(D.imp);
582
605
  }
583
606
  }
584
- class yD extends v {
607
+ class yD extends O {
585
608
  constructor(D) {
586
609
  super(D);
587
610
  }
@@ -593,19 +616,19 @@ class yD extends v {
593
616
  }
594
617
  getRecord() {
595
618
  let D = this.imp.getRecord();
596
- return new Y(D);
619
+ return new Q(D);
597
620
  }
598
621
  step(D = !0, C = !0) {
599
622
  this.imp.start(D, C);
600
623
  }
601
624
  }
602
- class xD extends S {
625
+ class xD extends v {
603
626
  constructor(D) {
604
627
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTable());
605
628
  }
606
629
  getAt(D) {
607
630
  let C = this.getAt(D);
608
- return C && new Y(C);
631
+ return C && new Q(C);
609
632
  }
610
633
  has(D) {
611
634
  return this.imp.has(D);
@@ -618,16 +641,16 @@ class xD extends S {
618
641
  return this.imp.add(D.getImp());
619
642
  }
620
643
  }
621
- class z extends S {
644
+ class V extends v {
622
645
  constructor(D) {
623
646
  super(D);
624
647
  }
625
648
  explode() {
626
649
  let D = this.imp.explode();
627
- return new K(D);
650
+ return new H(D);
628
651
  }
629
652
  get trueColor() {
630
- return new O(this.imp.TrueColor());
653
+ return new j(this.imp.TrueColor());
631
654
  }
632
655
  set trueColor(D) {
633
656
  this.imp.SetTrueColor(D.getImp());
@@ -689,13 +712,13 @@ class z extends S {
689
712
  GetBoundingBox() {
690
713
  let D = this.imp.GetBoundingBox();
691
714
  if (D) {
692
- let C = { minPt: new p(D.AtPoint(0).val), maxPt: new p(D.AtPoint(1).val), ret: 0 };
715
+ let C = { minPt: new m(D.AtPoint(0).val), maxPt: new m(D.AtPoint(1).val), ret: 0 };
693
716
  return i.App.DestroyObject(D), C;
694
717
  } else
695
- return { minPt: new p(), maxPt: new p(), ret: 1 };
718
+ return { minPt: new m(), maxPt: new m(), ret: 1 };
696
719
  }
697
720
  }
698
- class N extends z {
721
+ class _ extends V {
699
722
  constructor(D) {
700
723
  super(D);
701
724
  }
@@ -715,77 +738,77 @@ class N extends z {
715
738
  return { val: this.imp.getDistAtPoint(D.imp), ret: i.getCallResult() };
716
739
  }
717
740
  getPointAtDist(D) {
718
- return { val: new p(this.imp.getPointAtDist(D)), ret: i.getCallResult() };
741
+ return { val: new m(this.imp.getPointAtDist(D)), ret: i.getCallResult() };
719
742
  }
720
743
  getStartPoint() {
721
- return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
744
+ return { val: new m(this.imp.getStartPoint()), ret: i.getCallResult() };
722
745
  }
723
746
  getEndPoint() {
724
- return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
747
+ return { val: new m(this.imp.getStartPoint()), ret: i.getCallResult() };
725
748
  }
726
749
  getPointAtParam(D) {
727
- return { val: new p(this.imp.getPointAtParam(D)), ret: i.getCallResult() };
750
+ return { val: new m(this.imp.getPointAtParam(D)), ret: i.getCallResult() };
728
751
  }
729
752
  getParamAtPoint(D) {
730
753
  return { val: this.imp.getParamAtPoint(D.imp), ret: i.getCallResult() };
731
754
  }
732
755
  getFirstDeriv(D) {
733
- return { val: new G(this.imp.getFirstDeriv(D)), ret: i.getCallResult() };
756
+ return { val: new w(this.imp.getFirstDeriv(D)), ret: i.getCallResult() };
734
757
  }
735
758
  getFirstDerivEx(D) {
736
- return { val: new G(this.imp.getFirstDerivEx(D.imp)), ret: i.getCallResult() };
759
+ return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: i.getCallResult() };
737
760
  }
738
761
  getClosestPointTo(D, C) {
739
- return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: i.getCallResult() };
762
+ return { val: new m(this.imp.getClosestPointTo(D.imp, C)), ret: i.getCallResult() };
740
763
  }
741
764
  offsetCurves(D, C) {
742
765
  let B = this.imp.offsetCurves(D, C.imp);
743
- return new K(B);
766
+ return new H(B);
744
767
  }
745
768
  splitCurves(D) {
746
769
  let C = this.imp.splitCurves(D);
747
- return new K(C);
770
+ return new H(C);
748
771
  }
749
772
  getArea() {
750
773
  return { val: this.imp.getArea(), ret: i.getCallResult() };
751
774
  }
752
775
  getSamplePoints(D) {
753
776
  let C = this.imp.getSamplePoints(D);
754
- return new K(C);
777
+ return new H(C);
755
778
  }
756
779
  getLength() {
757
780
  return { val: this.imp.getLength(), ret: i.getCallResult() };
758
781
  }
759
782
  }
760
- class J extends N {
783
+ class Z extends _ {
761
784
  constructor(D) {
762
785
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLine());
763
786
  }
764
787
  get startPoint() {
765
- return new p(this.imp.startPoint());
788
+ return new m(this.imp.startPoint());
766
789
  }
767
790
  set startPoint(D) {
768
791
  this.imp.setStartPoint(D.imp);
769
792
  }
770
793
  get endPoint() {
771
- return new p(this.imp.endPoint());
794
+ return new m(this.imp.endPoint());
772
795
  }
773
796
  set endPoint(D) {
774
797
  this.imp.setEndPoint(D.imp);
775
798
  }
776
799
  }
777
- class Q extends z {
800
+ class Y extends V {
778
801
  constructor(D) {
779
802
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbText());
780
803
  }
781
804
  get position() {
782
- return new p(this.imp.position());
805
+ return new m(this.imp.position());
783
806
  }
784
807
  set position(D) {
785
808
  this.imp.setPosition(D.imp);
786
809
  }
787
810
  get alignmentPoint() {
788
- return new p(this.imp.position());
811
+ return new m(this.imp.position());
789
812
  }
790
813
  set alignmentPoint(D) {
791
814
  this.imp.setAlignmentPoint(D.imp);
@@ -815,10 +838,10 @@ class Q extends z {
815
838
  this.imp.setWidthFactor(D);
816
839
  }
817
840
  get textString() {
818
- return y.decodeFromGb2312(this.imp.textString());
841
+ return x.decodeFromGb2312(this.imp.textString());
819
842
  }
820
843
  set textString(D) {
821
- this.imp.setTextString(y.encodeToGb2312(D));
844
+ this.imp.setTextString(x.encodeToGb2312(D));
822
845
  }
823
846
  get horizontalMode() {
824
847
  return this.imp.horizontalMode();
@@ -833,12 +856,12 @@ class Q extends z {
833
856
  this.imp.setVerticalMode(D);
834
857
  }
835
858
  }
836
- class FD extends z {
859
+ class FD extends V {
837
860
  constructor(D) {
838
861
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbMText());
839
862
  }
840
863
  get location() {
841
- return new p(this.imp.location());
864
+ return new m(this.imp.location());
842
865
  }
843
866
  set location(D) {
844
867
  this.imp.setLocation(D.imp);
@@ -868,21 +891,21 @@ class FD extends z {
868
891
  this.imp.setAttachment(D);
869
892
  }
870
893
  get contents() {
871
- return y.decodeFromGb2312(this.imp.contents());
894
+ return x.decodeFromGb2312(this.imp.contents());
872
895
  }
873
896
  set contents(D) {
874
- this.imp.setContents(y.encodeToGb2312(D));
897
+ this.imp.setContents(x.encodeToGb2312(D));
875
898
  }
876
899
  }
877
- class AD extends N {
900
+ class AD extends _ {
878
901
  constructor(D) {
879
902
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbCircle());
880
903
  }
881
904
  setCenter(D, C, B) {
882
- this.imp.setCenter(new p(D, C, B).imp);
905
+ this.imp.setCenter(new m(D, C, B).imp);
883
906
  }
884
907
  get center() {
885
- return new p(this.imp.center());
908
+ return new m(this.imp.center());
886
909
  }
887
910
  set center(D) {
888
911
  this.imp.setCenter(D.imp);
@@ -894,7 +917,7 @@ class AD extends N {
894
917
  this.imp.setRadius(D);
895
918
  }
896
919
  }
897
- class bD extends N {
920
+ class bD extends _ {
898
921
  constructor(D) {
899
922
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbPolyline());
900
923
  }
@@ -935,18 +958,18 @@ class bD extends N {
935
958
  return this.imp.setBulgeAt(D, C);
936
959
  }
937
960
  }
938
- class fD extends z {
961
+ class fD extends V {
939
962
  constructor(D) {
940
963
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockReference());
941
964
  }
942
965
  get blockTableRecordId() {
943
- return new f(this.imp.blockTableRecord(), x.kMxCAD);
966
+ return new M(this.imp.blockTableRecord(), b.kMxCAD);
944
967
  }
945
968
  set blockTableRecordId(D) {
946
969
  this.imp.setBlockTableRecordId(D.id);
947
970
  }
948
971
  get position() {
949
- return new p(this.imp.position());
972
+ return new m(this.imp.position());
950
973
  }
951
974
  set position(D) {
952
975
  this.imp.setPosition(D.imp);
@@ -964,18 +987,18 @@ class fD extends z {
964
987
  this.imp.setRotation(D);
965
988
  }
966
989
  get blockTransform() {
967
- return new Z(this.imp.blockTransform());
990
+ return new W(this.imp.blockTransform());
968
991
  }
969
992
  set blockTransform(D) {
970
993
  this.imp.setBlockTransform(D.imp);
971
994
  }
972
995
  }
973
- class tD extends z {
996
+ class tD extends V {
974
997
  constructor(D) {
975
998
  super(D);
976
999
  }
977
1000
  get textPosition() {
978
- return new p(this.imp.textPosition());
1001
+ return new m(this.imp.textPosition());
979
1002
  }
980
1003
  set textPosition(D) {
981
1004
  this.imp.setTextPosition(D.imp);
@@ -1008,7 +1031,7 @@ class tD extends z {
1008
1031
  this.imp.setTextRotation(D);
1009
1032
  }
1010
1033
  get dimensionStyle() {
1011
- return new f(this.imp.dimensionStyle(), x.kMxCAD);
1034
+ return new M(this.imp.dimensionStyle(), b.kMxCAD);
1012
1035
  }
1013
1036
  set dimensionStyle(D) {
1014
1037
  this.imp.setDimensionStyle(D.id);
@@ -1047,7 +1070,7 @@ class tD extends z {
1047
1070
  this.imp.SetDimVarString(D, C);
1048
1071
  }
1049
1072
  getDimVarObjectId(D) {
1050
- return new f(this.imp.GetDimVarObjectId(D), x.kMxCAD);
1073
+ return new M(this.imp.GetDimVarObjectId(D), b.kMxCAD);
1051
1074
  }
1052
1075
  setDimVarObjectId(D, C) {
1053
1076
  this.imp.SetDimVarObjectId(D, C.id);
@@ -1058,19 +1081,19 @@ class MD extends tD {
1058
1081
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbAlignedDimension());
1059
1082
  }
1060
1083
  get xLine1Point() {
1061
- return new p(this.imp.xLine1Point());
1084
+ return new m(this.imp.xLine1Point());
1062
1085
  }
1063
1086
  set xLine1Point(D) {
1064
1087
  this.imp.setXLine1Point(D.imp);
1065
1088
  }
1066
1089
  get xLine2Point() {
1067
- return new p(this.imp.xLine2Point());
1090
+ return new m(this.imp.xLine2Point());
1068
1091
  }
1069
1092
  set xLine2Point(D) {
1070
1093
  this.imp.setXLine2Point(D.imp);
1071
1094
  }
1072
1095
  get dimLinePoint() {
1073
- return new p(this.imp.dimLinePoint());
1096
+ return new m(this.imp.dimLinePoint());
1074
1097
  }
1075
1098
  set dimLinePoint(D) {
1076
1099
  this.imp.setDimLinePoint(D.imp);
@@ -1087,19 +1110,19 @@ class TD extends tD {
1087
1110
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbRotatedDimension());
1088
1111
  }
1089
1112
  get xLine1Point() {
1090
- return new p(this.imp.xLine1Point());
1113
+ return new m(this.imp.xLine1Point());
1091
1114
  }
1092
1115
  set xLine1Point(D) {
1093
1116
  this.imp.setXLine1Point(D.imp);
1094
1117
  }
1095
1118
  get xLine2Point() {
1096
- return new p(this.imp.xLine2Point());
1119
+ return new m(this.imp.xLine2Point());
1097
1120
  }
1098
1121
  set xLine2Point(D) {
1099
1122
  this.imp.setXLine2Point(D.imp);
1100
1123
  }
1101
1124
  get dimLinePoint() {
1102
- return new p(this.imp.dimLinePoint());
1125
+ return new m(this.imp.dimLinePoint());
1103
1126
  }
1104
1127
  set dimLinePoint(D) {
1105
1128
  this.imp.setDimLinePoint(D.imp);
@@ -1117,15 +1140,15 @@ class TD extends tD {
1117
1140
  this.imp.setRotation(D);
1118
1141
  }
1119
1142
  }
1120
- class PD extends N {
1143
+ class kD extends _ {
1121
1144
  constructor(D) {
1122
1145
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbArc());
1123
1146
  }
1124
1147
  setCenter(D, C, B) {
1125
- this.imp.setCenter(new p(D, C, B).imp);
1148
+ this.imp.setCenter(new m(D, C, B).imp);
1126
1149
  }
1127
1150
  get center() {
1128
- return new p(this.imp.center());
1151
+ return new m(this.imp.center());
1129
1152
  }
1130
1153
  set center(D) {
1131
1154
  this.imp.setCenter(D.imp);
@@ -1149,11 +1172,11 @@ class PD extends N {
1149
1172
  this.imp.setEndAngle(D);
1150
1173
  }
1151
1174
  }
1152
- function V(E = null) {
1175
+ function K(E = null) {
1153
1176
  let D;
1154
1177
  return E == null ? D = new i.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1155
1178
  }
1156
- class K extends v {
1179
+ class H extends O {
1157
1180
  constructor(D) {
1158
1181
  super(D), D || this.initTempObject(new i.mxcadassemblyimp.McDrawResbuf());
1159
1182
  }
@@ -1181,13 +1204,13 @@ class K extends v {
1181
1204
  this.imp.AddObject(D.getImp());
1182
1205
  }
1183
1206
  AtObjectId(D) {
1184
- return { val: new f(this.imp.AtObjectId(D), x.kMxCAD), ret: i.getCallResult() };
1207
+ return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: i.getCallResult() };
1185
1208
  }
1186
1209
  AtString(D) {
1187
- return { val: y.decodeFromGb2312(this.imp.AtString(D)), ret: i.getCallResult() };
1210
+ return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: i.getCallResult() };
1188
1211
  }
1189
1212
  AtPoint(D) {
1190
- return { val: new p(this.imp.AtPoint(D)), ret: i.getCallResult() };
1213
+ return { val: new m(this.imp.AtPoint(D)), ret: i.getCallResult() };
1191
1214
  }
1192
1215
  ItemDataType() {
1193
1216
  return this.imp.ItemDataType();
@@ -1214,7 +1237,7 @@ class K extends v {
1214
1237
  this.imp.Remove(D);
1215
1238
  }
1216
1239
  }
1217
- class kD {
1240
+ class PD {
1218
1241
  imp;
1219
1242
  constructor() {
1220
1243
  }
@@ -1226,12 +1249,12 @@ class kD {
1226
1249
  }
1227
1250
  findEntAtPoint(D, C, B, F = -1, A = null) {
1228
1251
  this.init();
1229
- let t = this.imp.findEntAtPoint(D, C, B, F, V(A));
1230
- return new f(t, x.kMxCAD);
1252
+ let t = this.imp.findEntAtPoint(D, C, B, F, K(A));
1253
+ return new M(t, b.kMxCAD);
1231
1254
  }
1232
1255
  selectEnt(D, C = null) {
1233
1256
  return this.init(), new Promise(async (B) => {
1234
- const F = new M();
1257
+ const F = new T();
1235
1258
  D && F.setMessage(D), F.setCursorType(qD.kRect);
1236
1259
  let A = await F.go();
1237
1260
  if (!A) {
@@ -1240,11 +1263,11 @@ class kD {
1240
1263
  }
1241
1264
  $D.findEntAtPoint(A).then((t) => {
1242
1265
  let e = [];
1243
- t.forEach((s) => {
1244
- e.push(new f(s, x.kMxDraw));
1266
+ t.forEach((r) => {
1267
+ e.push(new M(r, b.kMxDraw));
1245
1268
  });
1246
- let r = this.findEntAtPoint(A.x, A.y, A.z, -1, C);
1247
- r.isValid() && e.push(r), B(e);
1269
+ let s = this.findEntAtPoint(A.x, A.y, A.z, -1, C);
1270
+ s.isValid() && e.push(s), B(e);
1248
1271
  });
1249
1272
  });
1250
1273
  }
@@ -1252,28 +1275,28 @@ class kD {
1252
1275
  this.imp || (this.imp = new i.mxcadassemblyimp.McDrawUtility());
1253
1276
  }
1254
1277
  }
1255
- let eD = new kD();
1256
- class RD extends v {
1278
+ let eD = new PD();
1279
+ class RD extends O {
1257
1280
  constructor() {
1258
1281
  super(), this.initTempObject(new i.mxcadassemblyimp.McDrawSelSet());
1259
1282
  }
1260
1283
  allSelect(D = null) {
1261
- return this.imp.allSelect(V(D));
1284
+ return this.imp.allSelect(K(D));
1262
1285
  }
1263
1286
  pointSelect(D, C, B = null, F = -1) {
1264
- return this.imp.pointSelect(D, C, V(B), F);
1287
+ return this.imp.pointSelect(D, C, K(B), F);
1265
1288
  }
1266
1289
  crossingSelect(D, C, B, F, A = null) {
1267
- return this.imp.crossingSelect(D, C, B, F, V(A));
1290
+ return this.imp.crossingSelect(D, C, B, F, K(A));
1268
1291
  }
1269
1292
  count() {
1270
1293
  return this.imp.count();
1271
1294
  }
1272
1295
  item(D) {
1273
- return new f(this.imp.item(D), x.kMxCAD);
1296
+ return new M(this.imp.item(D), b.kMxCAD);
1274
1297
  }
1275
1298
  }
1276
- class W {
1299
+ class U {
1277
1300
  imp;
1278
1301
  mxObject;
1279
1302
  static currentFileName;
@@ -1298,15 +1321,15 @@ class W {
1298
1321
  openWebFile(D, C, B = !0) {
1299
1322
  let F = Math.round(Math.random() * 1e7);
1300
1323
  if (C) {
1301
- let A = this, t = (e, r) => {
1302
- A.mxObject.removeEventFuction("openFileComplete", t), F == r && C(e);
1324
+ let A = this, t = (e, s) => {
1325
+ A.mxObject.removeEventFuction("openFileComplete", t), F == s && C(e);
1303
1326
  };
1304
1327
  A.mxObject.addEvent("openFileComplete", t);
1305
1328
  }
1306
- return W.currentFileName = D.split("/").pop(), this.imp.openWebFile(D, B, F);
1329
+ return U.currentFileName = D.split("/").pop(), this.imp.openWebFile(D, B, F);
1307
1330
  }
1308
1331
  getCurrentFileName() {
1309
- return W.currentFileName;
1332
+ return U.currentFileName;
1310
1333
  }
1311
1334
  saveFileToUrl(D, C) {
1312
1335
  const B = window;
@@ -1320,9 +1343,9 @@ class W {
1320
1343
  return t.mx_saveFile_call = (e) => {
1321
1344
  if (C && C(e), !!e) {
1322
1345
  if (B) {
1323
- let r;
1324
- /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? r = new Blob([e.buffer], { type: "application/octet-stream" }) : r = new Blob([e.buffer], { type: "application/octet-binary" }), F ? H.saveAsFileDialog({
1325
- blob: r,
1346
+ let s;
1347
+ /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? s = new Blob([e.buffer], { type: "application/octet-stream" }) : s = new Blob([e.buffer], { type: "application/octet-binary" }), F ? N.saveAsFileDialog({
1348
+ blob: s,
1326
1349
  filename: A || D,
1327
1350
  types: [{
1328
1351
  description: "mxweb File",
@@ -1330,7 +1353,7 @@ class W {
1330
1353
  "application/octet-stream": [".mxweb"]
1331
1354
  }
1332
1355
  }]
1333
- }) : H.downloadFile(r, D);
1356
+ }) : N.downloadFile(s, D);
1334
1357
  }
1335
1358
  t.mx_saveFile_call = null;
1336
1359
  }
@@ -1358,7 +1381,7 @@ class W {
1358
1381
  return this.imp.SetSysVarLong(D, C);
1359
1382
  }
1360
1383
  get DrawColor() {
1361
- return new O(this.imp.GetDrawColor());
1384
+ return new j(this.imp.GetDrawColor());
1362
1385
  }
1363
1386
  set DrawColor(D) {
1364
1387
  this.imp.SetDrawColor(D.getImp());
@@ -1447,8 +1470,8 @@ class W {
1447
1470
  DrawPoint(D, C) {
1448
1471
  return this.imp.DrawPoint(D, C);
1449
1472
  }
1450
- DrawSolid(D, C, B, F, A, t, e, r) {
1451
- return this.imp.DrawSolid(D, C, B, F, A, t, e, r);
1473
+ DrawSolid(D, C, B, F, A, t, e, s) {
1474
+ return this.imp.DrawSolid(D, C, B, F, A, t, e, s);
1452
1475
  }
1453
1476
  DrawMText(D, C, B, F, A, t, e) {
1454
1477
  return this.imp.DrawMText(D, C, B, F, A, t, e);
@@ -1462,8 +1485,8 @@ class W {
1462
1485
  DrawDimAligned(D, C, B, F, A, t) {
1463
1486
  return this.imp.DrawDimAligned(D, C, B, F, A, t);
1464
1487
  }
1465
- DrawDimAngular(D, C, B, F, A, t, e, r) {
1466
- return this.imp.DrawDimAngular(D, C, B, F, A, t, e, r);
1488
+ DrawDimAngular(D, C, B, F, A, t, e, s) {
1489
+ return this.imp.DrawDimAngular(D, C, B, F, A, t, e, s);
1467
1490
  }
1468
1491
  DrawDimDiametric(D, C, B, F, A) {
1469
1492
  return this.imp.DrawDimDiametric(D, C, B, F, A);
@@ -1521,7 +1544,7 @@ class W {
1521
1544
  class LD {
1522
1545
  imp;
1523
1546
  init(D) {
1524
- this.imp = D;
1547
+ this.imp = D, w.kZAxis = new w(0, 0, 1), w.kXAxis = new w(1, 0, 0), w.kYAxis = new w(0, 1, 0), m.kOrigin = new m(0, 0, 0), W.kIdentity = new W();
1525
1548
  }
1526
1549
  getImp() {
1527
1550
  return this.imp;
@@ -1531,13 +1554,13 @@ class LD {
1531
1554
  }
1532
1555
  CreateMxCAD(D, C, B, F, A) {
1533
1556
  let t = this.imp.CreateMxDraw(D, C, B, F, A);
1534
- return new W(t);
1557
+ return new U(t);
1535
1558
  }
1536
1559
  DestroyObject(D) {
1537
1560
  this.imp.DestroyObject(D);
1538
1561
  }
1539
1562
  GetCurrentMxCAD() {
1540
- return new W(this.imp.GetCurrentMxDraw());
1563
+ return new U(this.imp.GetCurrentMxDraw());
1541
1564
  }
1542
1565
  mcedRGB2Index(D, C, B, F = !0) {
1543
1566
  return this.imp.mcedRGB2Index(D, C, B, F);
@@ -1548,10 +1571,10 @@ class LD {
1548
1571
  let C = this.imp.ObjectIdToObjectName(D);
1549
1572
  if (C == "McDbLine") {
1550
1573
  let B = this.imp.ObjectIdToMdDbLine(D);
1551
- return new J(B);
1574
+ return new Z(B);
1552
1575
  } else if (C == "McDbText") {
1553
1576
  let B = this.imp.ObjectIdToMdDbText(D);
1554
- return new Q(B);
1577
+ return new Y(B);
1555
1578
  } else if (C == "McDbPolyline") {
1556
1579
  let B = this.imp.ObjectIdToMdDbPolyline(D);
1557
1580
  return new bD(B);
@@ -1560,7 +1583,7 @@ class LD {
1560
1583
  return new AD(B);
1561
1584
  } else if (C == "McDbArc") {
1562
1585
  let B = this.imp.ObjectIdToMdDbArc(D);
1563
- return new PD(B);
1586
+ return new kD(B);
1564
1587
  } else if (C == "McDbBlockReference") {
1565
1588
  let B = this.imp.ObjectIdToMdDbBlockReference(D);
1566
1589
  return new fD(B);
@@ -1579,13 +1602,13 @@ class LD {
1579
1602
  CreateCloneObject(D) {
1580
1603
  let C = D.getObjectName();
1581
1604
  if (C == "McDbLine") {
1582
- let B = new J();
1605
+ let B = new Z();
1583
1606
  return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1584
1607
  } else if (C == "McDbText") {
1585
- let B = new Q();
1608
+ let B = new Y();
1586
1609
  return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1587
1610
  }
1588
- return console.log("Mx: Clone error type"), new S(D);
1611
+ return console.log("Mx: Clone error type"), new v(D);
1589
1612
  }
1590
1613
  }
1591
1614
  class SD {
@@ -1599,11 +1622,11 @@ class SD {
1599
1622
  let F = D.z || 0;
1600
1623
  D = d.getCurrentDraw().docCoord2Cad(D.x, D.y, F);
1601
1624
  }
1602
- let B = new p();
1625
+ let B = new m();
1603
1626
  return D && D.x && D.y && (B.x = D.x, B.y = D.y, D.z && (B.y = D.z)), B;
1604
1627
  }
1605
1628
  }
1606
- const iD = "1.0.57", AC = "SharedArrayBuffer" in window, X = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src), tC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d-st/${E}` : D + E, eC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d/${E}` : D + E, iC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/3d/${E}` : D + E, vD = (E) => new Promise((D, C) => {
1629
+ const iD = "1.0.58", AC = "SharedArrayBuffer" in window, X = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src), tC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d-st/${E}` : D + E, eC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/2d/${E}` : D + E, iC = (E, D = self.location.href) => X ? `https://unpkg.com/mxcad@${iD}/dist/wasm/3d/${E}` : D + E, vD = (E) => new Promise((D, C) => {
1607
1630
  const B = document.createElement("script");
1608
1631
  B.src = E, B.type = "text/javascript", B.crossOrigin = "anonymous", document.body.appendChild(B), B.onload = () => {
1609
1632
  D();
@@ -1626,7 +1649,7 @@ async function OD(E, D = AC || !X ? tC : eC, C) {
1626
1649
  });
1627
1650
  i.mxcadassemblyimp = t;
1628
1651
  let e = new t.McApp();
1629
- e.Init(), i.App.init(e), i.App.GetCurrentMxCAD(), E && E(i), B(i);
1652
+ e.Init(), i.App.init(e), E && E(i), B(i);
1630
1653
  } catch (A) {
1631
1654
  F(A);
1632
1655
  }
@@ -1661,19 +1684,18 @@ const sC = (E) => {
1661
1684
  });
1662
1685
  } } = E || {};
1663
1686
  await OD(() => {
1664
- }, D, C);
1665
- let r = d.getCurrentDraw();
1666
- e(), r._mxdrawObj || (r = await nC(B, F));
1667
- const s = d.getMxFunTHREE();
1668
- let o = new s.Vector2();
1669
- r.getRenderer().getSize(o);
1670
- const a = i.App.CreateMxCAD(o.width, o.height, r.getCanvas().id, r.isWebgl2(), r.getId());
1671
- return r.initMxCpp(a), r.addEvent("openFileComplete", () => {
1687
+ }, D, C), e();
1688
+ let s = await nC(B, F);
1689
+ const r = d.getMxFunTHREE();
1690
+ let o = new r.Vector2();
1691
+ s.getRenderer().getSize(o);
1692
+ const a = i.App.CreateMxCAD(o.width, o.height, s.getCanvas().id, s.isWebgl2(), s.getId());
1693
+ return s.initMxCpp(a), s.addEvent("openFileComplete", () => {
1672
1694
  A && A();
1673
1695
  }), t && a.openWebFile(t), a;
1674
1696
  };
1675
1697
  async function aC() {
1676
- const E = new M();
1698
+ const E = new T();
1677
1699
  E.setMessage(`
1678
1700
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
1679
1701
  let D = await E.go();
@@ -1683,7 +1705,7 @@ async function aC() {
1683
1705
  if (C.length <= 0)
1684
1706
  return;
1685
1707
  let B = d.screenCoordLong2Doc(50);
1686
- C = H.b64Encode(C);
1708
+ C = N.b64Encode(C);
1687
1709
  const F = {
1688
1710
  postx: D.x,
1689
1711
  posty: D.y,
@@ -1704,13 +1726,13 @@ class uC extends aD {
1704
1726
  }
1705
1727
  }
1706
1728
  const sD = (E) => {
1707
- const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: r, z: s } = C, { x: o, y: a, z: m } = B, n = A * s - r * t - A * m + a * t + r * m - a * s, u = -(F * s - e * t - F * m + o * t + e * m - o * s), h = F * r - e * A - F * a + o * A + e * a - o * r, w = -(F * r * m - F * a * s - e * A * m + e * a * t + o * A * s - o * r * t), l = 2 * (e - F), c = 2 * (r - A), T = 2 * (s - t), j = F * F + A * A + t * t - e * e - r * r - s * s, P = 2 * (o - F), k = 2 * (a - A), R = 2 * (m - t), I = F * F + A * A + t * t - o * o - a * a - m * m, KD = -(u * T * I - u * R * j - c * h * I + c * R * w + k * h * j - k * T * w) / (n * c * R - n * k * T - l * u * R + l * k * h + P * u * T - P * c * h), HD = (n * T * I - n * R * j - l * h * I + l * R * w + P * h * j - P * T * w) / (n * c * R - n * k * T - l * u * R + l * k * h + P * u * T - P * c * h), ND = -(n * c * I - n * k * j - l * u * I + l * k * w + P * u * j - P * c * w) / (n * c * R - n * k * T - l * u * R + l * k * h + P * u * T - P * c * h);
1729
+ const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: s, z: r } = C, { x: o, y: a, z: p } = B, n = A * r - s * t - A * p + a * t + s * p - a * r, u = -(F * r - e * t - F * p + o * t + e * p - o * r), h = F * s - e * A - F * a + o * A + e * a - o * s, g = -(F * s * p - F * a * r - e * A * p + e * a * t + o * A * r - o * s * t), l = 2 * (e - F), c = 2 * (s - A), k = 2 * (r - t), I = F * F + A * A + t * t - e * e - s * s - r * r, P = 2 * (o - F), R = 2 * (a - A), L = 2 * (p - t), G = F * F + A * A + t * t - o * o - a * a - p * p, KD = -(u * k * G - u * L * I - c * h * G + c * L * g + R * h * I - R * k * g) / (n * c * L - n * R * k - l * u * L + l * R * h + P * u * k - P * c * h), HD = (n * k * G - n * L * I - l * h * G + l * L * g + P * h * I - P * k * g) / (n * c * L - n * R * k - l * u * L + l * R * h + P * u * k - P * c * h), ND = -(n * c * G - n * R * I - l * u * G + l * R * g + P * u * I - P * c * g) / (n * c * L - n * R * k - l * u * L + l * R * h + P * u * k - P * c * h);
1708
1730
  return new THREE.Vector3(KD, HD, ND);
1709
1731
  };
1710
1732
  function jD() {
1711
- const E = new M();
1733
+ const E = new T();
1712
1734
  let D = new uC();
1713
- L.use(D), D.closed = !1;
1735
+ S.use(D), D.closed = !1;
1714
1736
  let C = 0, B = "default", F = !0;
1715
1737
  const A = () => {
1716
1738
  E.setUserDraw(
@@ -1720,7 +1742,7 @@ function jD() {
1720
1742
  );
1721
1743
  }, t = (n) => {
1722
1744
  if (B === "default") {
1723
- if (n === g.kOk) {
1745
+ if (n === y.kOk) {
1724
1746
  if (C === 0)
1725
1747
  E.setMessage(`
1726
1748
  \u6307\u5B9A\u5706\u7684\u534A\u5F84:`), E.setKeyWords("[\u76F4\u5F84(D)]"), D.center = E.value(), A();
@@ -1728,47 +1750,47 @@ function jD() {
1728
1750
  return i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1729
1751
  C++;
1730
1752
  }
1731
- n === g.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
1753
+ n === y.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
1732
1754
  \u6307\u5B9A\u5706\u7684\u76F4\u5F84:`), E.setKeyWords(""));
1733
1755
  }
1734
1756
  };
1735
1757
  let e = [];
1736
- const r = (n) => {
1758
+ const s = (n) => {
1737
1759
  if (B === "3P" && (E.setMessage(`
1738
- \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), n === g.kOk)) {
1760
+ \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E00\u4E2A\u70B9:`), n === y.kOk)) {
1739
1761
  if (C === 0 && (e.push(E.value()), E.setUserDraw((u, h) => {
1740
1762
  h.drawLine(e[0], u);
1741
1763
  }), E.setMessage(`
1742
1764
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), C === 1 && (e.push(E.value()), E.setUserDraw((u, h) => {
1743
- const [w, l] = e, c = u;
1765
+ const [g, l] = e, c = u;
1744
1766
  D.center = sD([
1745
- w,
1767
+ g,
1746
1768
  l,
1747
1769
  c
1748
- ]), D.radius = D.center.distanceTo(w), h.drawCustomEntity(D);
1770
+ ]), D.radius = D.center.distanceTo(g), h.drawCustomEntity(D);
1749
1771
  }), E.setMessage(`
1750
1772
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), C === 2)
1751
1773
  return e.push(E.value()), D.center = sD(e), D.radius = D.center.distanceTo(e[0]), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1752
1774
  C++;
1753
1775
  }
1754
1776
  };
1755
- let s;
1777
+ let r;
1756
1778
  const o = (n, u) => {
1757
1779
  new THREE.Line3(n, u).getCenter(D.center), D.radius = u.distanceTo(n) / 2;
1758
1780
  }, a = (n) => {
1759
1781
  if (B === "2P" && (E.setMessage(`
1760
- \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), n === g.kOk)) {
1761
- if (C === 0 && (s = E.value(), E.setUserDraw((u, h) => {
1762
- o(s, u), h.drawCustomEntity(D), h.drawLine(s, u);
1782
+ \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), n === y.kOk)) {
1783
+ if (C === 0 && (r = E.value(), E.setUserDraw((u, h) => {
1784
+ o(r, u), h.drawCustomEntity(D), h.drawLine(r, u);
1763
1785
  }), E.setMessage(`
1764
1786
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), C === 1)
1765
- return o(s, E.value()), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1787
+ return o(r, E.value()), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1766
1788
  C++;
1767
1789
  }
1768
- }, m = (n) => {
1790
+ }, p = (n) => {
1769
1791
  if (B === "T") {
1770
1792
  if (E.setMessage(`
1771
- \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), n === g.kOk) {
1793
+ \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), n === y.kOk) {
1772
1794
  if (C === 0) {
1773
1795
  const u = E.value();
1774
1796
  console.log(u), d.getCurrentDraw();
@@ -1783,17 +1805,17 @@ function jD() {
1783
1805
  \u6307\u5B9A\u5706\u7684\u5706\u5FC3\u6216[\u4E09\u70B9(3P)/\u4E24\u70B9(2P)/\u5207\u70B9\u3001\u5207\u70B9\u3001\u534A\u5F84(T)]:`
1784
1806
  ), E.setKeyWords("3P 2P T"), E.goWhile(
1785
1807
  (n) => {
1786
- if (n === g.kKeyWord && (E.isKeyWordPicked("3P") ? B = "3P" : E.isKeyWordPicked("2P") ? B = "2P" : E.isKeyWordPicked("T") && (B = "T")), t(n))
1808
+ if (n === y.kKeyWord && (E.isKeyWordPicked("3P") ? B = "3P" : E.isKeyWordPicked("2P") ? B = "2P" : E.isKeyWordPicked("T") && (B = "T")), t(n))
1787
1809
  return { exit: !0 };
1788
- if (r(n))
1810
+ if (s(n))
1789
1811
  return { exit: !0 };
1790
1812
  if (a(n))
1791
1813
  return { exit: !0 };
1792
- if (m(n))
1814
+ if (p(n))
1793
1815
  return { exit: !0 };
1794
1816
  },
1795
1817
  (n) => {
1796
- n === g.kCancel && i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1818
+ n === y.kCancel && i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1797
1819
  }
1798
1820
  );
1799
1821
  }
@@ -1807,8 +1829,8 @@ function DD(E, D, C, B) {
1807
1829
  return F == 0 ? t = Math.PI / 2 : t = Math.atan(Math.abs(A / F)), F < 0 && A >= 0 ? t = Math.PI - t : F < 0 && A < 0 ? t = Math.PI + t : F >= 0 && A < 0 && (t = Math.PI * 2 - t), t;
1808
1830
  }
1809
1831
  async function ID() {
1810
- const E = new M();
1811
- let D = new $(), C = [];
1832
+ const E = new T();
1833
+ let D = new J(), C = [];
1812
1834
  E.setMessage(`
1813
1835
  \u6307\u5B9A\u7B2C\u4E00\u70B9:`);
1814
1836
  let B = await E.go();
@@ -1823,29 +1845,29 @@ async function ID() {
1823
1845
  };
1824
1846
  F(), E.goWhile(
1825
1847
  (A) => {
1826
- if (A === g.kOk && (D = new $(), L.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === g.kKeyWord) {
1848
+ if (A === y.kOk && (D = new J(), S.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === y.kKeyWord) {
1827
1849
  if (E.isKeyWordPicked("E"))
1828
1850
  nD();
1829
1851
  else if (E.isKeyWordPicked("C")) {
1830
- const t = new $();
1831
- return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), L.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1852
+ const t = new J();
1853
+ return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), S.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1832
1854
  }
1833
1855
  }
1834
1856
  },
1835
- (A) => (A === g.kCancel && C.forEach((t) => {
1857
+ (A) => (A === y.kCancel && C.forEach((t) => {
1836
1858
  i.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1837
1859
  }), { exit: !0 })
1838
1860
  );
1839
1861
  }
1840
1862
  async function lC() {
1841
1863
  {
1842
- const E = new M();
1864
+ const E = new T();
1843
1865
  E.setMessage(`
1844
1866
  \u6307\u5B9A\u4E00\u70B9:`);
1845
1867
  let D = await E.go();
1846
1868
  if (!D)
1847
1869
  return;
1848
- let C = new J(), B = new Q();
1870
+ let C = new Z(), B = new Y();
1849
1871
  B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = i.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1850
1872
  C.endPoint = i.NewMcGePoint3d(A), B.position = i.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
1851
1873
  }), E.setMessage(`
@@ -1865,9 +1887,9 @@ async function cC() {
1865
1887
  if (t.GetCount() == 0)
1866
1888
  return;
1867
1889
  let e = t.GetCount();
1868
- for (let r = 0; r < e; r++) {
1869
- let s = t.AtObject(r).val;
1870
- s?.ObjectName == "McDbMText" && console.log(s.contents);
1890
+ for (let s = 0; s < e; s++) {
1891
+ let r = t.AtObject(s).val;
1892
+ r?.ObjectName == "McDbMText" && console.log(r.contents);
1871
1893
  }
1872
1894
  }
1873
1895
  }
@@ -1876,7 +1898,7 @@ d.on("init", () => {
1876
1898
  d.addCommand("Mx_Line", ID), d.addCommand("Mx_TestDraw", lC), d.addCommand("Mx_Test_GetDim", cC);
1877
1899
  });
1878
1900
  async function mC() {
1879
- const E = new M();
1901
+ const E = new T();
1880
1902
  E.setMessage(`
1881
1903
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
1882
1904
  let D = await E.go();
@@ -1887,7 +1909,7 @@ async function mC() {
1887
1909
  if (C.length <= 0)
1888
1910
  return;
1889
1911
  let B = d.screenCoordLong2Doc(50);
1890
- C = H.b64Encode(C);
1912
+ C = N.b64Encode(C);
1891
1913
  const F = {
1892
1914
  postx: D.x,
1893
1915
  posty: D.y,
@@ -1897,23 +1919,23 @@ async function mC() {
1897
1919
  d.call("Mx_MText", F);
1898
1920
  }
1899
1921
  async function GD() {
1900
- const E = new M(), D = new QD();
1901
- L.use(D), E.setMessage(`
1922
+ const E = new T(), D = new ZD();
1923
+ S.use(D), E.setMessage(`
1902
1924
  \u6307\u5B9A\u8D77\u70B9:`);
1903
1925
  let C;
1904
1926
  E.setUserDraw((B, F) => {
1905
1927
  F.drawCustomEntity(D), C && F.drawLine(C, B);
1906
1928
  }), E.goWhile(
1907
1929
  (B) => {
1908
- if (B === g.kOk) {
1930
+ if (B === y.kOk) {
1909
1931
  const F = E.value();
1910
1932
  D.points.push(E.value()), C = F, E.setMessage(`
1911
1933
  \u6307\u5B9A\u4E0B\u4E00\u4E2A\u70B9:`), E.setKeyWords("[\u5706\u5F27(A)/\u5BBD\u5EA6(W)]");
1912
1934
  } else
1913
- B === g.kKeyWord && (E.isKeyWordPicked("A"), E.isKeyWordPicked("W"));
1935
+ B === y.kKeyWord && (E.isKeyWordPicked("A"), E.isKeyWordPicked("W"));
1914
1936
  },
1915
1937
  (B) => {
1916
- if (B === g.kCancel) {
1938
+ if (B === y.kCancel) {
1917
1939
  let F = i.App.GetCurrentMxCAD();
1918
1940
  for (let A = 0; A < D.points.length; A++)
1919
1941
  A == 0 ? F.PathMoveTo(D.points[A].x, D.points[A].y) : F.PathLineTo(D.points[A].x, D.points[A].y);
@@ -1926,7 +1948,7 @@ d.on("init", () => {
1926
1948
  d.addCommand("Mx_Pline", GD);
1927
1949
  });
1928
1950
  async function WD() {
1929
- const E = new M();
1951
+ const E = new T();
1930
1952
  E.setMessage(`
1931
1953
  \u6307\u5B9A\u4E00\u70B9:`);
1932
1954
  let D = await E.go(), C = new AD();
@@ -1934,18 +1956,18 @@ async function WD() {
1934
1956
  let B = 5;
1935
1957
  E.setUserDraw((F, A) => {
1936
1958
  C.radius = D.distanceTo(F);
1937
- let t = C.getEndParam().val, r = C.getDistAtParam(t).val / B, s = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1938
- for (let m = 0; m < B; m++) {
1939
- let n = C.getPointAtDist(s).val;
1940
- s += r, m > 0 ? A.drawMcDbLine(n.x, n.y, n.z, o.x, o.y, o.z) : a = new THREE.Vector3(n.x, n.y, n.z), m == B - 1 && A.drawMcDbLine(n.x, n.y, n.z, a.x, a.y, a.z), o = new THREE.Vector3(n.x, n.y, n.z);
1959
+ let t = C.getEndParam().val, s = C.getDistAtParam(t).val / B, r = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1960
+ for (let p = 0; p < B; p++) {
1961
+ let n = C.getPointAtDist(r).val;
1962
+ r += s, p > 0 ? A.drawMcDbLine(n.x, n.y, n.z, o.x, o.y, o.z) : a = new THREE.Vector3(n.x, n.y, n.z), p == B - 1 && A.drawMcDbLine(n.x, n.y, n.z, a.x, a.y, a.z), o = new THREE.Vector3(n.x, n.y, n.z);
1941
1963
  }
1942
1964
  }), E.setMessage(`
1943
1965
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go(), E.drawReserve();
1944
1966
  }
1945
1967
  d.addCommand("Mx_Polygon", WD);
1946
1968
  function pC(E, D, C) {
1947
- const B = E.x, F = D.x, A = C.x, t = E.y, e = D.y, r = C.y, s = B - F, o = t - e, a = B - A, m = t - r, n = (B * B - F * F + (t * t - e * e)) / 2, u = (B * B - A * A + (t * t - r * r)) / 2, h = o * a - s * m, w = -(m * n - o * u) / h, l = -(s * u - a * n) / h;
1948
- return new THREE.Vector3(w, l, 0);
1969
+ const B = E.x, F = D.x, A = C.x, t = E.y, e = D.y, s = C.y, r = B - F, o = t - e, a = B - A, p = t - s, n = (B * B - F * F + (t * t - e * e)) / 2, u = (B * B - A * A + (t * t - s * s)) / 2, h = o * a - r * p, g = -(p * n - o * u) / h, l = -(r * u - a * n) / h;
1970
+ return new THREE.Vector3(g, l, 0);
1949
1971
  }
1950
1972
  function dC(E, D) {
1951
1973
  const C = E.x, B = E.y, F = D.x, A = D.y;
@@ -1959,17 +1981,17 @@ function hC(E, D, C) {
1959
1981
  }
1960
1982
  function CD(E, D, C) {
1961
1983
  const B = E.x, F = D.x, A = E.y, t = D.y;
1962
- let e, r, s;
1963
- return e = (A - t) / C, r = (B - F) / C, r >= 0.99999 && (r = 0.99999), r <= -0.99999 && (r = -0.99999), s = Math.acos(r), s = s / Math.PI * 180, e < -0.05 && (s = 360 - s), {
1984
+ let e, s, r;
1985
+ return e = (A - t) / C, s = (B - F) / C, s >= 0.99999 && (s = 0.99999), s <= -0.99999 && (s = -0.99999), r = Math.acos(s), r = r / Math.PI * 180, e < -0.05 && (r = 360 - r), {
1964
1986
  sin: e,
1965
- cos: r,
1966
- angle: s
1987
+ cos: s,
1988
+ angle: r
1967
1989
  };
1968
1990
  }
1969
- const q = _D.MrxDbgUiPrBaseReturn, b = (E, D, C) => {
1991
+ const $ = _D.MrxDbgUiPrBaseReturn, f = (E, D, C) => {
1970
1992
  const B = () => {
1971
1993
  E.go((F) => {
1972
- if (F === q.kKeyWord && C() && B(), F === q.kOk && D() && B(), F === q.kNone && B(), F === q.kCancel)
1994
+ if (F === $.kKeyWord && C() && B(), F === $.kOk && D() && B(), F === $.kNone && B(), F === $.kCancel)
1973
1995
  return { exit: !0 };
1974
1996
  });
1975
1997
  };
@@ -1994,13 +2016,13 @@ class rD extends aD {
1994
2016
  }
1995
2017
  getArcMidPoint(D, C, B, F, A) {
1996
2018
  const t = D, e = B * Math.PI / 180;
1997
- let r = F * Math.PI / 180;
1998
- const s = new THREE.Vector3(), o = new THREE.Vector3();
1999
- s.x = t.x + C * Math.cos(e), s.y = t.y + C * Math.sin(e), o.x = t.x + C * Math.cos(r), o.y = t.y + C * Math.sin(r);
2019
+ let s = F * Math.PI / 180;
2020
+ const r = new THREE.Vector3(), o = new THREE.Vector3();
2021
+ r.x = t.x + C * Math.cos(e), r.y = t.y + C * Math.sin(e), o.x = t.x + C * Math.cos(s), o.y = t.y + C * Math.sin(s);
2000
2022
  const a = C;
2001
- (A ? B < F : B > F) && (r += Math.PI * 2);
2002
- const m = new THREE.Vector3();
2003
- return m.x = t.x + a * Math.cos((e + r) / 2), m.y = t.y + a * Math.sin((e + r) / 2), [s, m, o, this.center];
2023
+ (A ? B < F : B > F) && (s += Math.PI * 2);
2024
+ const p = new THREE.Vector3();
2025
+ return p.x = t.x + a * Math.cos((e + s) / 2), p.y = t.y + a * Math.sin((e + s) / 2), [r, p, o, this.center];
2004
2026
  }
2005
2027
  getGripPoints() {
2006
2028
  return this.getArcMidPoint(
@@ -2021,22 +2043,22 @@ class rD extends aD {
2021
2043
  D[C].add(B);
2022
2044
  const [F, A, t] = D;
2023
2045
  this.center = pC(F, t, A), this.radius = dC(A, this.center);
2024
- const e = CD(F, this.center, this.radius), r = CD(t, this.center, this.radius), s = CD(A, this.center, this.radius);
2046
+ const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), r = CD(A, this.center, this.radius);
2025
2047
  this.clockwise = hC(
2026
- r.angle,
2048
+ s.angle,
2027
2049
  e.angle,
2028
- s.angle
2029
- ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(r.angle);
2050
+ r.angle
2051
+ ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(s.angle);
2030
2052
  }
2031
2053
  }
2032
2054
  async function UD() {
2033
- const E = new M();
2055
+ const E = new T();
2034
2056
  E.setMessage(`
2035
2057
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)]");
2036
2058
  let D = new rD();
2037
- D.closed = !1, L.use(D);
2059
+ D.closed = !1, S.use(D);
2038
2060
  let C, B, F;
2039
- const A = b(
2061
+ const A = f(
2040
2062
  E,
2041
2063
  () => {
2042
2064
  C = E.value(), E.setMessage(`
@@ -2046,7 +2068,7 @@ async function UD() {
2046
2068
  },
2047
2069
  () => {
2048
2070
  if (E.isKeyWordPicked("C")) {
2049
- const l = new _();
2071
+ const l = new q();
2050
2072
  D.center = E.value(), l.center = E.value(), E.setMessage(`
2051
2073
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), E.setKeyWords(""), e();
2052
2074
  } else
@@ -2054,10 +2076,10 @@ async function UD() {
2054
2076
  }
2055
2077
  );
2056
2078
  let t;
2057
- const e = b(
2079
+ const e = f(
2058
2080
  E,
2059
2081
  () => {
2060
- t = E.value(), F = new _(), F.closed = !1, L.use(F), F.center = t, D.center = t, E.setMessage(`
2082
+ t = E.value(), F = new q(), F.closed = !1, S.use(F), F.center = t, D.center = t, E.setMessage(`
2061
2083
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setUserDraw((l, c) => {
2062
2084
  c.drawCustomEntity(F), c.drawLine(t, l);
2063
2085
  }), o();
@@ -2065,25 +2087,25 @@ async function UD() {
2065
2087
  () => {
2066
2088
  }
2067
2089
  );
2068
- let r, s;
2069
- const o = b(
2090
+ let s, r;
2091
+ const o = f(
2070
2092
  E,
2071
2093
  () => {
2072
- r = E.value(), F.endPoint = r, E.setMessage(
2094
+ s = E.value(), F.endPoint = s, E.setMessage(
2073
2095
  `
2074
2096
  \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u89D2\u5EA6(A)/\u5F26\u957F(L)/\u4FEE\u6539\u534A\u5F84(R)]:`
2075
- ), E.setKeyWords("A L R"), s = new $(), s.setDashLineDisplay(!0), s.setDashArray(0.05), s.setLineWidth(2), s.setColor("#ffd30d"), s.pt1 = F.center, E.setUserDraw((l, c) => {
2076
- F.startPoint = l, s.pt2 = l, c.drawCustomEntity(F), c.drawCustomEntity(s);
2077
- }), m();
2097
+ ), E.setKeyWords("A L R"), r = new J(), r.setDashLineDisplay(!0), r.setDashArray(0.05), r.setLineWidth(2), r.setColor("#ffd30d"), r.pt1 = F.center, E.setUserDraw((l, c) => {
2098
+ F.startPoint = l, r.pt2 = l, c.drawCustomEntity(F), c.drawCustomEntity(r);
2099
+ }), p();
2078
2100
  },
2079
2101
  () => {
2080
2102
  }
2081
2103
  );
2082
2104
  let a;
2083
- const m = b(
2105
+ const p = f(
2084
2106
  E,
2085
2107
  () => {
2086
- a = E.value(), F.startPoint = a, F.endPoint = r, d.getCurrentDraw().addMxEntity(F);
2108
+ a = E.value(), F.startPoint = a, F.endPoint = s, d.getCurrentDraw().addMxEntity(F);
2087
2109
  },
2088
2110
  () => {
2089
2111
  if (E.isKeyWordPicked("A"))
@@ -2091,14 +2113,14 @@ async function UD() {
2091
2113
  `
2092
2114
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2093
2115
  ), E.setKeyWords("R"), E.setUserDraw((l, c) => {
2094
- F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(s);
2116
+ F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(r);
2095
2117
  }), !0;
2096
2118
  if (E.isKeyWordPicked("L"))
2097
2119
  return E.setMessage(
2098
2120
  `
2099
2121
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2100
2122
  ), E.setKeyWords("R"), E.setUserDraw((l, c) => {
2101
- F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(s);
2123
+ F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(r);
2102
2124
  }), !0;
2103
2125
  if (E.isKeyWordPicked("R"))
2104
2126
  E.setMessage(
@@ -2112,22 +2134,22 @@ async function UD() {
2112
2134
  }
2113
2135
  );
2114
2136
  let n;
2115
- const u = b(
2137
+ const u = f(
2116
2138
  E,
2117
2139
  () => {
2118
2140
  n = E.value(), E.setMessage(`
2119
- \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new ZD(), B.autoClockwise = !0, B.closed = !1, L.use(B), B.point1 = C, B.point3 = n, E.setUserDraw((l, c) => {
2141
+ \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new YD(), B.autoClockwise = !0, B.closed = !1, S.use(B), B.point1 = C, B.point3 = n, E.setUserDraw((l, c) => {
2120
2142
  B.point2 = l, c.drawCustomEntity(B);
2121
- }), w();
2143
+ }), g();
2122
2144
  },
2123
2145
  () => {
2124
2146
  if (E.isKeyWordPicked("C"))
2125
- F = new _(), F.closed = !1, L.use(F), E.setMessage(`
2147
+ F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2126
2148
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((l, c) => {
2127
2149
  F.startPoint = C, c.drawLine(l, F.startPoint);
2128
2150
  }), e();
2129
2151
  else if (E.isKeyWordPicked("E"))
2130
- F = new _(), F.closed = !1, L.use(F), E.setMessage(`
2152
+ F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2131
2153
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((l, c) => {
2132
2154
  F.startPoint = C, c.drawLine(l, F.startPoint);
2133
2155
  }), e();
@@ -2136,7 +2158,7 @@ async function UD() {
2136
2158
  }
2137
2159
  );
2138
2160
  let h = i.App.GetCurrentMxCAD();
2139
- const w = b(
2161
+ const g = f(
2140
2162
  E,
2141
2163
  () => {
2142
2164
  B.point1 = C, B.point2 = E.value(), B.point3 = n, h.DrawArc2(B.point1.x, B.point1.y, B.point3.x, B.point3.y, B.point2.x, B.point2.y);
@@ -2156,63 +2178,64 @@ d.on("init", () => {
2156
2178
  d.addCommand("Mx_Arc", UD);
2157
2179
  });
2158
2180
  function zD() {
2159
- const E = new M(), D = new YD();
2160
- D.closed = !1, L.use(D), E.setMessage(`
2181
+ const E = new T(), D = new QD();
2182
+ D.closed = !1, S.use(D), E.setMessage(`
2161
2183
  \u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), E.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
2162
2184
  let C, B = new THREE.Vector3();
2163
- b(
2185
+ f(
2164
2186
  E,
2165
2187
  () => {
2166
- C = E.value(), E.setUserDraw((s, o) => {
2167
- const a = new THREE.Line3(C, s);
2168
- a.getCenter(B), D.center = B, D.xRadius = a.distance() / 2, D.yRadius = D.xRadius, D.rotation = DD(s.x, s.y, B.x, B.y), o.drawLine(s, C);
2188
+ C = E.value(), E.setUserDraw((r, o) => {
2189
+ const a = new THREE.Line3(C, r);
2190
+ a.getCenter(B), D.center = B, D.xRadius = a.distance() / 2, D.yRadius = D.xRadius, D.rotation = DD(r.x, r.y, B.x, B.y), o.drawLine(r, C);
2169
2191
  }), E.setMessage(`
2170
2192
  \u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), E.setKeyWords(""), A();
2171
2193
  },
2172
2194
  () => {
2173
2195
  }
2174
2196
  )();
2175
- const A = b(
2197
+ const A = f(
2176
2198
  E,
2177
2199
  () => {
2178
- E.setUserDraw((s, o) => {
2179
- D.yRadius = B.distanceTo(s), o.drawLine(B, s), o.drawCustomEntity(D);
2200
+ E.setUserDraw((r, o) => {
2201
+ D.yRadius = B.distanceTo(r), o.drawLine(B, r), o.drawCustomEntity(D);
2180
2202
  }), E.setMessage(`
2181
2203
  \u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), E.setKeyWords(""), t();
2182
2204
  },
2183
2205
  () => {
2184
2206
  }
2185
- ), t = b(
2207
+ ), t = f(
2186
2208
  E,
2187
2209
  () => {
2188
2210
  E.setMessage(`
2189
- \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((s, o) => {
2190
- D.startAngle = DD(s.x, s.y, B.x, B.y) - D.rotation, o.drawLine(B, s), o.drawCustomEntity(D);
2211
+ \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((r, o) => {
2212
+ D.startAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2191
2213
  }), e();
2192
2214
  },
2193
2215
  () => {
2194
2216
  }
2195
- ), e = b(
2217
+ ), e = f(
2196
2218
  E,
2197
2219
  () => {
2198
- E.setUserDraw((s, o) => {
2199
- D.endAngle = DD(s.x, s.y, B.x, B.y) - D.rotation, o.drawLine(B, s), o.drawCustomEntity(D);
2220
+ E.setUserDraw((r, o) => {
2221
+ D.endAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2200
2222
  }), E.setMessage(`
2201
- \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), r();
2223
+ \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), s();
2202
2224
  },
2203
2225
  () => {
2204
2226
  }
2205
- ), r = b(
2227
+ ), s = f(
2206
2228
  E,
2207
2229
  () => {
2208
- d.getCurrentDraw().addMxEntity(D);
2230
+ let r = new w(D.xRadius, 0, 0);
2231
+ r.rotateBy(D.rotation, w.kZAxis), i.App.GetCurrentMxCAD().DrawEllipseArc(D.center.x, D.center.y, r.x, r.y, D.yRadius / D.xRadius, D.startAngle, D.endAngle);
2209
2232
  },
2210
2233
  () => {
2211
2234
  }
2212
2235
  );
2213
2236
  }
2214
2237
  function wC() {
2215
- const E = new M(), D = new XD(), C = new DC();
2238
+ const E = new T(), D = new XD(), C = new DC();
2216
2239
  E.setMessage(`
2217
2240
  \u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u692D\u5706:`), E.go(() => {
2218
2241
  C.point1 = E.value(), D.setDraw((B) => {
@@ -2260,13 +2283,13 @@ function bC(E, D) {
2260
2283
  }, D));
2261
2284
  };
2262
2285
  }
2263
- class U {
2286
+ class z {
2264
2287
  static onloadWasmMxDraw3dModel;
2265
2288
  canvas;
2266
2289
  constructor(D) {
2267
2290
  const C = () => {
2268
- const a = this.canvas.parentElement?.clientWidth || window.innerWidth, m = this.canvas.parentElement?.clientHeight || window.innerHeight;
2269
- let n = Math.min(a, window.screen.availWidth), u = Math.min(m, window.screen.availHeight);
2291
+ const a = this.canvas.parentElement?.clientWidth || window.innerWidth, p = this.canvas.parentElement?.clientHeight || window.innerHeight;
2292
+ let n = Math.min(a, window.screen.availWidth), u = Math.min(p, window.screen.availHeight);
2270
2293
  n = Math.max(A, n), u = Math.max(t, u), this.canvas.style.width = n + 1 + "px", this.canvas.style.height = u + "px";
2271
2294
  const h = window.devicePixelRatio || 1;
2272
2295
  this.canvas.width = n * h, this.canvas.height = u * h;
@@ -2275,27 +2298,27 @@ class U {
2275
2298
  minWidth: A = 300,
2276
2299
  minHeight: t = 300,
2277
2300
  updateCanvasSize: e = B,
2278
- ...r
2301
+ ...s
2279
2302
  } = D;
2280
- let s = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = s.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2281
- o == null && (o = s.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = s, this.ctx = o, r.canvas = this.canvas;
2282
- for (let a in r)
2283
- this[a] = r[a];
2303
+ let r = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = r.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2304
+ o == null && (o = r.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = r, this.ctx = o, s.canvas = this.canvas;
2305
+ for (let a in s)
2306
+ this[a] = s[a];
2284
2307
  if (this.canvas instanceof HTMLCanvasElement) {
2285
2308
  const a = this.canvas.parentElement || document.body;
2286
2309
  xC(a, e);
2287
2310
  } else
2288
2311
  console.error("createMxDraw3d canvas \u53C2\u6570\u4E0D\u6B63\u786E \u65E0\u6CD5\u83B7\u53D6\u5230canvas\u5143\u7D20");
2289
2312
  window.onresize = C, C(), gC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2290
- U.onloadWasmMxDraw3dModel && U.onloadWasmMxDraw3dModel(this), this.updateCanvasSize = e, this.open3DFile = (a) => {
2291
- const m = new FileReader();
2292
- m.onload = () => {
2293
- if (!!m.result && m.result instanceof ArrayBuffer) {
2294
- var n = new Uint8Array(m.result);
2313
+ z.onloadWasmMxDraw3dModel && z.onloadWasmMxDraw3dModel(this), this.updateCanvasSize = e, this.open3DFile = (a) => {
2314
+ const p = new FileReader();
2315
+ p.onload = () => {
2316
+ if (!!p.result && p.result instanceof ArrayBuffer) {
2317
+ var n = new Uint8Array(p.result);
2295
2318
  const u = this._malloc(n.length);
2296
2319
  this.HEAPU8.set(n, u), this.openFromMemory(a.name, u, n.length, !0), this.displayGround(!0), this.canvas.focus();
2297
2320
  }
2298
- }, m.readAsArrayBuffer(a);
2321
+ }, p.readAsArrayBuffer(a);
2299
2322
  };
2300
2323
  });
2301
2324
  }
@@ -2304,8 +2327,8 @@ function fC(E, D) {
2304
2327
  return new Promise(async (C, B) => {
2305
2328
  try {
2306
2329
  E.locateFile || (E.locateFile = iC);
2307
- const F = new U(E);
2308
- U.onloadWasmMxDraw3dModel = () => {
2330
+ const F = new z(E);
2331
+ z.onloadWasmMxDraw3dModel = () => {
2309
2332
  C(F), D && D(F);
2310
2333
  };
2311
2334
  } catch (F) {
@@ -2320,36 +2343,36 @@ const TC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2320
2343
  saveAsFileDialog: cD,
2321
2344
  downloadFile: mD,
2322
2345
  downloadFileFromUrl: pD,
2323
- MxTools: H,
2324
- McGePoint3d: p,
2325
- McGeVector3d: G,
2326
- McGeMatrix3d: Z,
2327
- getFilterImp: V,
2328
- McDrawResbuf: K,
2329
- McDrawUtilityClass: kD,
2346
+ MxTools: N,
2347
+ McGePoint3d: m,
2348
+ McGeVector3d: w,
2349
+ McGeMatrix3d: W,
2350
+ getFilterImp: K,
2351
+ McDrawResbuf: H,
2352
+ McDrawUtilityClass: PD,
2330
2353
  McDrawUtility: eD,
2331
2354
  McDrawSelSet: RD,
2332
- McRxObject: v,
2333
- McObjectIdType: x,
2334
- McObjectId: f,
2335
- McDbObject: S,
2355
+ McRxObject: O,
2356
+ McObjectIdType: b,
2357
+ McObjectId: M,
2358
+ McDbObject: v,
2336
2359
  get McDb() {
2337
2360
  return BD;
2338
2361
  },
2339
- McCmColor: O,
2362
+ McCmColor: j,
2340
2363
  McDbLayerTableRecord: FC,
2341
2364
  McDbLayerTable: dD,
2342
2365
  McDbLinetypeTable: hD,
2343
2366
  McDbTextStyleTable: wD,
2344
2367
  McDbDatabase: ED,
2345
2368
  McDbBlockTableRecordIterator: gD,
2346
- McDbBlockTableRecord: Y,
2369
+ McDbBlockTableRecord: Q,
2347
2370
  McDbBlockTableIterator: yD,
2348
2371
  McDbBlockTable: xD,
2349
- McDbEntity: z,
2350
- McDbCurve: N,
2351
- McDbLine: J,
2352
- McDbText: Q,
2372
+ McDbEntity: V,
2373
+ McDbCurve: _,
2374
+ McDbLine: Z,
2375
+ McDbText: Y,
2353
2376
  McDbMText: FD,
2354
2377
  McDbCircle: AD,
2355
2378
  McDbPolyline: bD,
@@ -2357,8 +2380,8 @@ const TC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2357
2380
  McDbDimension: tD,
2358
2381
  McDbAlignedDimension: MD,
2359
2382
  McDbRotatedDimension: TD,
2360
- McDbArc: PD,
2361
- McObject: W,
2383
+ McDbArc: kD,
2384
+ McObject: U,
2362
2385
  McAppType: LD,
2363
2386
  MxCppType: SD,
2364
2387
  get MxCpp() {
@@ -2375,50 +2398,50 @@ const TC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2375
2398
  drawArc: UD,
2376
2399
  drawEllipticalArc: zD,
2377
2400
  mxErase: VD,
2378
- MxDraw3d: U,
2401
+ MxDraw3d: z,
2379
2402
  loadMxCADassembly3d: fC
2380
2403
  }, Symbol.toStringTag, { value: "Module" }));
2381
2404
  export {
2382
2405
  LD as McAppType,
2383
- O as McCmColor,
2406
+ j as McCmColor,
2384
2407
  BD as McDb,
2385
2408
  MD as McDbAlignedDimension,
2386
- PD as McDbArc,
2409
+ kD as McDbArc,
2387
2410
  fD as McDbBlockReference,
2388
2411
  xD as McDbBlockTable,
2389
2412
  yD as McDbBlockTableIterator,
2390
- Y as McDbBlockTableRecord,
2413
+ Q as McDbBlockTableRecord,
2391
2414
  gD as McDbBlockTableRecordIterator,
2392
2415
  AD as McDbCircle,
2393
- N as McDbCurve,
2416
+ _ as McDbCurve,
2394
2417
  ED as McDbDatabase,
2395
2418
  tD as McDbDimension,
2396
- z as McDbEntity,
2419
+ V as McDbEntity,
2397
2420
  dD as McDbLayerTable,
2398
2421
  FC as McDbLayerTableRecord,
2399
- J as McDbLine,
2422
+ Z as McDbLine,
2400
2423
  hD as McDbLinetypeTable,
2401
2424
  FD as McDbMText,
2402
- S as McDbObject,
2425
+ v as McDbObject,
2403
2426
  bD as McDbPolyline,
2404
2427
  TD as McDbRotatedDimension,
2405
- Q as McDbText,
2428
+ Y as McDbText,
2406
2429
  wD as McDbTextStyleTable,
2407
- K as McDrawResbuf,
2430
+ H as McDrawResbuf,
2408
2431
  RD as McDrawSelSet,
2409
2432
  eD as McDrawUtility,
2410
- kD as McDrawUtilityClass,
2411
- Z as McGeMatrix3d,
2412
- p as McGePoint3d,
2413
- G as McGeVector3d,
2414
- W as McObject,
2415
- f as McObjectId,
2416
- x as McObjectIdType,
2417
- v as McRxObject,
2433
+ PD as McDrawUtilityClass,
2434
+ W as McGeMatrix3d,
2435
+ m as McGePoint3d,
2436
+ w as McGeVector3d,
2437
+ U as McObject,
2438
+ M as McObjectId,
2439
+ b as McObjectIdType,
2440
+ O as McRxObject,
2418
2441
  i as MxCpp,
2419
2442
  SD as MxCppType,
2420
- U as MxDraw3d,
2421
- H as MxTools,
2443
+ z as MxDraw3d,
2444
+ N as MxTools,
2422
2445
  lD as b64Decode,
2423
2446
  uD as b64Encode,
2424
2447
  oC as createMxCad,
@@ -2433,7 +2456,7 @@ export {
2433
2456
  GD as drawPolyLine,
2434
2457
  WD as drawPolygon,
2435
2458
  aC as drawText,
2436
- V as getFilterImp,
2459
+ K as getFilterImp,
2437
2460
  OD as loadMxCADassembly,
2438
2461
  fC as loadMxCADassembly3d,
2439
2462
  VD as mxErase,