mxcad 1.0.63 → 1.0.64

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 T, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as L, 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";
1
+ import _D, { MxFun as d, MrxDbgUiPrPoint as T, MxCursorType as qD, MrxDbgUtils as $D, store as oD, loadCoreCode as JD, MxPaintBrush as v, 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,7 +56,7 @@ function pD(E, D) {
56
56
  B.href = window.URL.createObjectURL(C), B.download = D, B.click();
57
57
  });
58
58
  }
59
- const N = {
59
+ const H = {
60
60
  b64Encode: uD,
61
61
  b64Decode: lD,
62
62
  saveAsFileDialog: cD,
@@ -67,7 +67,7 @@ class p {
67
67
  static kOrigin;
68
68
  imp;
69
69
  constructor(D, C, B) {
70
- this.imp = new r.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);
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
71
  }
72
72
  copy(D) {
73
73
  return this.imp.x = D.x, this.imp.y = D.y, this.imp.z = D.z, this;
@@ -118,7 +118,7 @@ class w {
118
118
  static kZAxis;
119
119
  imp;
120
120
  constructor(D, C, B) {
121
- this.imp = new r.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);
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);
122
122
  }
123
123
  copy(D) {
124
124
  return this.imp.x = D.imp.x, this.imp.y = D.imp.y, this.imp.z = D.imp.z, this;
@@ -186,7 +186,7 @@ class W {
186
186
  static kIdentity;
187
187
  imp;
188
188
  constructor(D) {
189
- this.imp = r.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
189
+ this.imp = i.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
190
190
  }
191
191
  copy(D) {
192
192
  return this.imp.copy(D.imp), this;
@@ -291,7 +291,7 @@ class CC {
291
291
  }
292
292
  let x = new CC();
293
293
  const BC = new FinalizationRegistry((E) => {
294
- r.App.DestroyObject(E);
294
+ i.App.DestroyObject(E);
295
295
  }), EC = {};
296
296
  class O {
297
297
  imp = 0;
@@ -333,11 +333,11 @@ class M {
333
333
  this.type == 1 ? d.getCurrentDraw().eraseMxEntity(this.id) : this.type == 0 && eD.eraseEntity(this.id);
334
334
  }
335
335
  getMcDbObject() {
336
- return this.type == 0 ? r.App.ObjectIdToObject(this.id) : null;
336
+ return this.type == 0 ? i.App.ObjectIdToObject(this.id) : null;
337
337
  }
338
338
  getObjectName() {
339
339
  if (this.type == 0)
340
- return r.App.getImp().ObjectIdToObjectName(this.id);
340
+ return i.App.getImp().ObjectIdToObjectName(this.id);
341
341
  if (this.type == 1) {
342
342
  let D = d.getCurrentDraw().getMxEntity(this.id);
343
343
  if (D)
@@ -349,7 +349,7 @@ class M {
349
349
  return this.type == 1 ? d.getCurrentDraw().getMxEntity(this.id) : null;
350
350
  }
351
351
  }
352
- class v extends O {
352
+ class L extends O {
353
353
  constructor(D) {
354
354
  super(D);
355
355
  }
@@ -361,7 +361,7 @@ class v extends O {
361
361
  }
362
362
  Clone() {
363
363
  let D = this.imp.Clone();
364
- return r.App.CreateCloneObject(D);
364
+ return i.App.CreateCloneObject(D);
365
365
  }
366
366
  GetHandle() {
367
367
  return this.imp.GetHandle();
@@ -388,7 +388,7 @@ var BD;
388
388
  class j {
389
389
  imp;
390
390
  constructor(D, C, B) {
391
- this.imp = new r.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);
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);
392
392
  }
393
393
  getImp() {
394
394
  return this.imp;
@@ -442,9 +442,9 @@ class j {
442
442
  this.imp.colorIndex = D;
443
443
  }
444
444
  }
445
- class FC extends v {
445
+ class FC extends L {
446
446
  constructor(D) {
447
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLayerTableRecord());
447
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLayerTableRecord());
448
448
  }
449
449
  get name() {
450
450
  return this.imp.getName();
@@ -489,17 +489,17 @@ class FC extends v {
489
489
  this.imp.setLineWeight(D);
490
490
  }
491
491
  }
492
- class dD extends v {
492
+ class dD extends L {
493
493
  constructor(D) {
494
494
  super(D);
495
495
  }
496
496
  }
497
- class hD extends v {
497
+ class hD extends L {
498
498
  constructor(D) {
499
499
  super(D);
500
500
  }
501
501
  }
502
- class wD extends v {
502
+ class wD extends L {
503
503
  constructor(D) {
504
504
  super(D);
505
505
  }
@@ -583,9 +583,9 @@ class gD extends O {
583
583
  return this.imp.step(D, C);
584
584
  }
585
585
  }
586
- class Q extends v {
586
+ class Q extends L {
587
587
  constructor(D) {
588
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTableRecord());
588
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTableRecord());
589
589
  }
590
590
  appendAcDbEntity(D) {
591
591
  return new M(
@@ -622,9 +622,9 @@ class yD extends O {
622
622
  this.imp.start(D, C);
623
623
  }
624
624
  }
625
- class xD extends v {
625
+ class xD extends L {
626
626
  constructor(D) {
627
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTable());
627
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTable());
628
628
  }
629
629
  getAt(D) {
630
630
  let C = this.getAt(D);
@@ -641,13 +641,13 @@ class xD extends v {
641
641
  return this.imp.add(D.getImp());
642
642
  }
643
643
  }
644
- class V extends v {
644
+ class V extends L {
645
645
  constructor(D) {
646
646
  super(D);
647
647
  }
648
648
  explode() {
649
649
  let D = this.imp.explode();
650
- return new H(D);
650
+ return new N(D);
651
651
  }
652
652
  get trueColor() {
653
653
  return new j(this.imp.TrueColor());
@@ -713,7 +713,7 @@ class V extends v {
713
713
  let D = this.imp.GetBoundingBox();
714
714
  if (D) {
715
715
  let C = { minPt: new p(D.AtPoint(0).val), maxPt: new p(D.AtPoint(1).val), ret: 0 };
716
- return r.App.DestroyObject(D), C;
716
+ return i.App.DestroyObject(D), C;
717
717
  } else
718
718
  return { minPt: new p(), maxPt: new p(), ret: 1 };
719
719
  }
@@ -723,66 +723,66 @@ class _ extends V {
723
723
  super(D);
724
724
  }
725
725
  getStartParam() {
726
- return { val: this.imp.getStartParam(), ret: r.getCallResult() };
726
+ return { val: this.imp.getStartParam(), ret: i.getCallResult() };
727
727
  }
728
728
  getEndParam() {
729
- return { val: this.imp.getEndParam(), ret: r.getCallResult() };
729
+ return { val: this.imp.getEndParam(), ret: i.getCallResult() };
730
730
  }
731
731
  getDistAtParam(D) {
732
- return { val: this.imp.getDistAtParam(D), ret: r.getCallResult() };
732
+ return { val: this.imp.getDistAtParam(D), ret: i.getCallResult() };
733
733
  }
734
734
  getParamAtDist(D) {
735
- return { val: this.imp.getParamAtDist(D), ret: r.getCallResult() };
735
+ return { val: this.imp.getParamAtDist(D), ret: i.getCallResult() };
736
736
  }
737
737
  getDistAtPoint(D) {
738
- return { val: this.imp.getDistAtPoint(D.imp), ret: r.getCallResult() };
738
+ return { val: this.imp.getDistAtPoint(D.imp), ret: i.getCallResult() };
739
739
  }
740
740
  getPointAtDist(D) {
741
- return { val: new p(this.imp.getPointAtDist(D)), ret: r.getCallResult() };
741
+ return { val: new p(this.imp.getPointAtDist(D)), ret: i.getCallResult() };
742
742
  }
743
743
  getStartPoint() {
744
- return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
744
+ return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
745
745
  }
746
746
  getEndPoint() {
747
- return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
747
+ return { val: new p(this.imp.getStartPoint()), ret: i.getCallResult() };
748
748
  }
749
749
  getPointAtParam(D) {
750
- return { val: new p(this.imp.getPointAtParam(D)), ret: r.getCallResult() };
750
+ return { val: new p(this.imp.getPointAtParam(D)), ret: i.getCallResult() };
751
751
  }
752
752
  getParamAtPoint(D) {
753
- return { val: this.imp.getParamAtPoint(D.imp), ret: r.getCallResult() };
753
+ return { val: this.imp.getParamAtPoint(D.imp), ret: i.getCallResult() };
754
754
  }
755
755
  getFirstDeriv(D) {
756
- return { val: new w(this.imp.getFirstDeriv(D)), ret: r.getCallResult() };
756
+ return { val: new w(this.imp.getFirstDeriv(D)), ret: i.getCallResult() };
757
757
  }
758
758
  getFirstDerivEx(D) {
759
- return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: r.getCallResult() };
759
+ return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: i.getCallResult() };
760
760
  }
761
761
  getClosestPointTo(D, C) {
762
- return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: r.getCallResult() };
762
+ return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: i.getCallResult() };
763
763
  }
764
764
  offsetCurves(D, C) {
765
765
  let B = this.imp.offsetCurves(D, C.imp);
766
- return new H(B);
766
+ return new N(B);
767
767
  }
768
768
  splitCurves(D) {
769
769
  let C = this.imp.splitCurves(D);
770
- return new H(C);
770
+ return new N(C);
771
771
  }
772
772
  getArea() {
773
- return { val: this.imp.getArea(), ret: r.getCallResult() };
773
+ return { val: this.imp.getArea(), ret: i.getCallResult() };
774
774
  }
775
775
  getSamplePoints(D) {
776
776
  let C = this.imp.getSamplePoints(D);
777
- return new H(C);
777
+ return new N(C);
778
778
  }
779
779
  getLength() {
780
- return { val: this.imp.getLength(), ret: r.getCallResult() };
780
+ return { val: this.imp.getLength(), ret: i.getCallResult() };
781
781
  }
782
782
  }
783
783
  class Z extends _ {
784
784
  constructor(D) {
785
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLine());
785
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLine());
786
786
  }
787
787
  get startPoint() {
788
788
  return new p(this.imp.startPoint());
@@ -799,7 +799,7 @@ class Z extends _ {
799
799
  }
800
800
  class Y extends V {
801
801
  constructor(D) {
802
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbText());
802
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbText());
803
803
  }
804
804
  get position() {
805
805
  return new p(this.imp.position());
@@ -858,7 +858,7 @@ class Y extends V {
858
858
  }
859
859
  class FD extends V {
860
860
  constructor(D) {
861
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbMText());
861
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbMText());
862
862
  }
863
863
  get location() {
864
864
  return new p(this.imp.location());
@@ -899,7 +899,7 @@ class FD extends V {
899
899
  }
900
900
  class AD extends _ {
901
901
  constructor(D) {
902
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbCircle());
902
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbCircle());
903
903
  }
904
904
  setCenter(D, C, B) {
905
905
  this.imp.setCenter(new p(D, C, B).imp);
@@ -919,7 +919,7 @@ class AD extends _ {
919
919
  }
920
920
  class bD extends _ {
921
921
  constructor(D) {
922
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbPolyline());
922
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbPolyline());
923
923
  }
924
924
  get isClosed() {
925
925
  return this.imp.isClosed();
@@ -943,13 +943,13 @@ class bD extends _ {
943
943
  return this.imp.numVerts();
944
944
  }
945
945
  getPointAt(D) {
946
- return { val: this.imp.getPointAt(D), ret: r.getCallResult() };
946
+ return { val: this.imp.getPointAt(D), ret: i.getCallResult() };
947
947
  }
948
948
  getBulgeAt(D) {
949
949
  return this.imp.getBulgeAt(D);
950
950
  }
951
951
  getWidthsAt(D) {
952
- return { val1: this.imp.getStartWidthsAt(D), val2: this.imp.getEndWidthsAt(D), ret: r.getCallResult() };
952
+ return { val1: this.imp.getStartWidthsAt(D), val2: this.imp.getEndWidthsAt(D), ret: i.getCallResult() };
953
953
  }
954
954
  setPointAt(D, C) {
955
955
  return this.imp.setPointAt(D, C.imp);
@@ -960,7 +960,7 @@ class bD extends _ {
960
960
  }
961
961
  class fD extends V {
962
962
  constructor(D) {
963
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockReference());
963
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockReference());
964
964
  }
965
965
  get blockTableRecordId() {
966
966
  return new M(this.imp.blockTableRecord(), b.kMxCAD);
@@ -1078,7 +1078,7 @@ class tD extends V {
1078
1078
  }
1079
1079
  class MD extends tD {
1080
1080
  constructor(D) {
1081
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbAlignedDimension());
1081
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbAlignedDimension());
1082
1082
  }
1083
1083
  get xLine1Point() {
1084
1084
  return new p(this.imp.xLine1Point());
@@ -1107,7 +1107,7 @@ class MD extends tD {
1107
1107
  }
1108
1108
  class TD extends tD {
1109
1109
  constructor(D) {
1110
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbRotatedDimension());
1110
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbRotatedDimension());
1111
1111
  }
1112
1112
  get xLine1Point() {
1113
1113
  return new p(this.imp.xLine1Point());
@@ -1142,7 +1142,7 @@ class TD extends tD {
1142
1142
  }
1143
1143
  class kD extends _ {
1144
1144
  constructor(D) {
1145
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbArc());
1145
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbArc());
1146
1146
  }
1147
1147
  setCenter(D, C, B) {
1148
1148
  this.imp.setCenter(new p(D, C, B).imp);
@@ -1174,11 +1174,11 @@ class kD extends _ {
1174
1174
  }
1175
1175
  function K(E = null) {
1176
1176
  let D;
1177
- return E == null ? D = new r.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1177
+ return E == null ? D = new i.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1178
1178
  }
1179
- class H extends O {
1179
+ class N extends O {
1180
1180
  constructor(D) {
1181
- super(D), D || this.initTempObject(new r.mxcadassemblyimp.McDrawResbuf());
1181
+ super(D), D || this.initTempObject(new i.mxcadassemblyimp.McDrawResbuf());
1182
1182
  }
1183
1183
  Clear() {
1184
1184
  this.imp.Clear();
@@ -1187,16 +1187,16 @@ class H extends O {
1187
1187
  return this.imp.GetCount();
1188
1188
  }
1189
1189
  AtDouble(D) {
1190
- return { val: this.imp.AtDouble(D), ret: r.getCallResult() };
1190
+ return { val: this.imp.AtDouble(D), ret: i.getCallResult() };
1191
1191
  }
1192
1192
  Atlong(D) {
1193
- return { val: this.imp.Atlong(D), ret: r.getCallResult() };
1193
+ return { val: this.imp.Atlong(D), ret: i.getCallResult() };
1194
1194
  }
1195
1195
  AtObject(D) {
1196
1196
  if (this.imp.AtObjectName(D) == "McDbMText") {
1197
1197
  let B = this.imp.AtObjectMdDbMText(D);
1198
1198
  if (B)
1199
- return { val: new FD(B), ret: r.getCallResult() };
1199
+ return { val: new FD(B), ret: i.getCallResult() };
1200
1200
  }
1201
1201
  return { val: void 0, ret: -1 };
1202
1202
  }
@@ -1204,13 +1204,13 @@ class H extends O {
1204
1204
  this.imp.AddObject(D.getImp());
1205
1205
  }
1206
1206
  AtObjectId(D) {
1207
- return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: r.getCallResult() };
1207
+ return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: i.getCallResult() };
1208
1208
  }
1209
1209
  AtString(D) {
1210
- return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: r.getCallResult() };
1210
+ return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: i.getCallResult() };
1211
1211
  }
1212
1212
  AtPoint(D) {
1213
- return { val: new p(this.imp.AtPoint(D)), ret: r.getCallResult() };
1213
+ return { val: new p(this.imp.AtPoint(D)), ret: i.getCallResult() };
1214
1214
  }
1215
1215
  ItemDataType() {
1216
1216
  return this.imp.ItemDataType();
@@ -1263,8 +1263,8 @@ class PD {
1263
1263
  }
1264
1264
  $D.findEntAtPoint(A).then((t) => {
1265
1265
  let e = [];
1266
- t.forEach((i) => {
1267
- e.push(new M(i, b.kMxDraw));
1266
+ t.forEach((r) => {
1267
+ e.push(new M(r, b.kMxDraw));
1268
1268
  });
1269
1269
  let s = this.findEntAtPoint(A.x, A.y, A.z, -1, C);
1270
1270
  s.isValid() && e.push(s), B(e);
@@ -1272,13 +1272,13 @@ class PD {
1272
1272
  });
1273
1273
  }
1274
1274
  init() {
1275
- this.imp || (this.imp = new r.mxcadassemblyimp.McDrawUtility());
1275
+ this.imp || (this.imp = new i.mxcadassemblyimp.McDrawUtility());
1276
1276
  }
1277
1277
  }
1278
1278
  let eD = new PD();
1279
1279
  class RD extends O {
1280
1280
  constructor() {
1281
- super(), this.initTempObject(new r.mxcadassemblyimp.McDrawSelSet());
1281
+ super(), this.initTempObject(new i.mxcadassemblyimp.McDrawSelSet());
1282
1282
  }
1283
1283
  allSelect(D = null) {
1284
1284
  return this.imp.allSelect(K(D));
@@ -1313,7 +1313,7 @@ class U {
1313
1313
  return this.imp;
1314
1314
  }
1315
1315
  getMxCppImp() {
1316
- return r.mxcadassemblyimp;
1316
+ return i.mxcadassemblyimp;
1317
1317
  }
1318
1318
  updateDisplay(D, C) {
1319
1319
  this.imp.updateDisplay(D, C);
@@ -1347,7 +1347,7 @@ class U {
1347
1347
  if (C && C(t), !!t) {
1348
1348
  if (B) {
1349
1349
  let e;
1350
- /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? e = new Blob([t.buffer], { type: "application/octet-stream" }) : e = new Blob([t.buffer], { type: "application/octet-binary" }), F ? N.saveAsFileDialog({
1350
+ /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? e = new Blob([t.buffer], { type: "application/octet-stream" }) : e = new Blob([t.buffer], { type: "application/octet-binary" }), F ? H.saveAsFileDialog({
1351
1351
  blob: e,
1352
1352
  filename: D,
1353
1353
  types: [{
@@ -1356,7 +1356,7 @@ class U {
1356
1356
  "application/octet-stream": [".mxweb"]
1357
1357
  }
1358
1358
  }]
1359
- }) : N.downloadFile(e, D);
1359
+ }) : H.downloadFile(e, D);
1360
1360
  }
1361
1361
  A.mx_saveFile_call = null;
1362
1362
  }
@@ -1531,17 +1531,17 @@ class U {
1531
1531
  return this.imp.DrawEntity(D.getImp());
1532
1532
  }
1533
1533
  ObjectIdToObject(D) {
1534
- return r.App.ObjectIdToObject(D);
1534
+ return i.App.ObjectIdToObject(D);
1535
1535
  }
1536
1536
  CloneMcDbObject(D) {
1537
1537
  let C = this.imp.CloneMcDbObject(D);
1538
- return r.App.CreateCloneObject(C);
1538
+ return i.App.CreateCloneObject(C);
1539
1539
  }
1540
1540
  ObjectIdToMdObjectImp(D) {
1541
- return r.App.getImp().ObjectIdToMdObject(D);
1541
+ return i.App.getImp().ObjectIdToMdObject(D);
1542
1542
  }
1543
1543
  DestroyObject(D) {
1544
- !D || r.App.getImp().DestroyObject(D);
1544
+ !D || i.App.getImp().DestroyObject(D);
1545
1545
  }
1546
1546
  }
1547
1547
  class SD {
@@ -1606,18 +1606,18 @@ class SD {
1606
1606
  let C = D.getObjectName();
1607
1607
  if (C == "McDbLine") {
1608
1608
  let B = new Z();
1609
- return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1609
+ return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1610
1610
  } else if (C == "McDbText") {
1611
1611
  let B = new Y();
1612
- return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1612
+ return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1613
1613
  }
1614
- return console.log("Mx: Clone error type"), new v(D);
1614
+ return console.log("Mx: Clone error type"), new L(D);
1615
1615
  }
1616
1616
  setFontFilePath(D) {
1617
1617
  return this.imp.setFontFilePath(D);
1618
1618
  }
1619
1619
  }
1620
- class LD {
1620
+ class vD {
1621
1621
  mxcadassemblyimp;
1622
1622
  App = new SD();
1623
1623
  getCallResult() {
@@ -1632,7 +1632,7 @@ class LD {
1632
1632
  return D && D.x && D.y && (B.x = D.x, B.y = D.y, D.z && (B.y = D.z)), B;
1633
1633
  }
1634
1634
  }
1635
- const iD = "1.0.63", 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) => {
1635
+ const iD = "1.0.64", 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, LD = (E) => new Promise((D, C) => {
1636
1636
  const B = document.createElement("script");
1637
1637
  B.src = E, B.type = "text/javascript", B.crossOrigin = "anonymous", document.body.appendChild(B), B.onload = () => {
1638
1638
  D();
@@ -1641,21 +1641,21 @@ const iD = "1.0.63", AC = "SharedArrayBuffer" in window, X = document.currentScr
1641
1641
  };
1642
1642
  }), rC = async (E, D, C) => {
1643
1643
  const { locateFile: B } = C, F = B(E + ".js");
1644
- return await vD(F), await globalThis[D](C);
1644
+ return await LD(F), await globalThis[D](C);
1645
1645
  };
1646
- let r;
1646
+ let i;
1647
1647
  async function OD(E, D = AC || !X ? tC : eC, C, B) {
1648
1648
  return new Promise(async (F, A) => {
1649
1649
  try {
1650
- if (r || (r = new LD()), r.mxcadassemblyimp)
1651
- return E && E(r), F(r);
1650
+ if (i || (i = new vD()), i.mxcadassemblyimp)
1651
+ return E && E(i), F(i);
1652
1652
  const e = await rC("mxdrawassembly_min", "mxdrawassembly", {
1653
1653
  locateFile: D,
1654
1654
  wasmBinary: C
1655
1655
  });
1656
- r.mxcadassemblyimp = e;
1656
+ i.mxcadassemblyimp = e;
1657
1657
  let s = new e.McApp();
1658
- B && s.setFontFilePath(B), s.Init(), r.App.init(s), E && E(r), F(r);
1658
+ B && s.setFontFilePath(B), s.Init(), i.App.init(s), E && E(i), F(i);
1659
1659
  } catch (t) {
1660
1660
  A(t);
1661
1661
  }
@@ -1691,12 +1691,12 @@ const sC = (E) => {
1691
1691
  } } = E || {};
1692
1692
  await OD(() => {
1693
1693
  }, C, B, D), s();
1694
- let i = await nC(F, A);
1694
+ let r = await nC(F, A);
1695
1695
  const o = d.getMxFunTHREE();
1696
1696
  let a = new o.Vector2();
1697
- i.getRenderer().getSize(a);
1698
- const l = r.App.CreateMxCAD(a.width, a.height, i.getCanvas().id, i.isWebgl2(), i.getId());
1699
- return i.initMxCpp(l), i.addEvent("openFileComplete", () => {
1697
+ r.getRenderer().getSize(a);
1698
+ const l = i.App.CreateMxCAD(a.width, a.height, r.getCanvas().id, r.isWebgl2(), r.getId());
1699
+ return r.initMxCpp(l), r.addEvent("openFileComplete", () => {
1700
1700
  t && t();
1701
1701
  }), e && l.openWebFile(e), l;
1702
1702
  };
@@ -1711,7 +1711,7 @@ async function aC() {
1711
1711
  if (C.length <= 0)
1712
1712
  return;
1713
1713
  let B = d.screenCoordLong2Doc(50);
1714
- C = N.b64Encode(C);
1714
+ C = H.b64Encode(C);
1715
1715
  const F = {
1716
1716
  postx: D.x,
1717
1717
  posty: D.y,
@@ -1732,13 +1732,13 @@ class uC extends aD {
1732
1732
  }
1733
1733
  }
1734
1734
  const sD = (E) => {
1735
- const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: s, z: i } = C, { x: o, y: a, z: l } = B, n = A * i - s * t - A * l + a * t + s * l - a * i, u = -(F * i - e * t - F * l + o * t + e * l - o * i), h = F * s - e * A - F * a + o * A + e * a - o * s, g = -(F * s * l - F * a * i - e * A * l + e * a * t + o * A * i - o * s * t), c = 2 * (e - F), m = 2 * (s - A), k = 2 * (i - t), I = F * F + A * A + t * t - e * e - s * s - i * i, P = 2 * (o - F), R = 2 * (a - A), S = 2 * (l - t), G = F * F + A * A + t * t - o * o - a * a - l * l, KD = -(u * k * G - u * S * I - m * h * G + m * S * g + R * h * I - R * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), HD = (n * k * G - n * S * I - c * h * G + c * S * g + P * h * I - P * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), ND = -(n * m * G - n * R * I - c * u * G + c * R * g + P * u * I - P * m * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h);
1736
- return new THREE.Vector3(KD, HD, ND);
1735
+ const [D, C, B] = E, { x: F, y: A, z: t } = D, { x: e, y: s, z: r } = C, { x: o, y: a, z: l } = B, n = A * r - s * t - A * l + a * t + s * l - a * r, u = -(F * r - e * t - F * l + o * t + e * l - o * r), h = F * s - e * A - F * a + o * A + e * a - o * s, g = -(F * s * l - F * a * r - e * A * l + e * a * t + o * A * r - o * s * t), c = 2 * (e - F), m = 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), S = 2 * (l - t), G = F * F + A * A + t * t - o * o - a * a - l * l, KD = -(u * k * G - u * S * I - m * h * G + m * S * g + R * h * I - R * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), ND = (n * k * G - n * S * I - c * h * G + c * S * g + P * h * I - P * k * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h), HD = -(n * m * G - n * R * I - c * u * G + c * R * g + P * u * I - P * m * g) / (n * m * S - n * R * k - c * u * S + c * R * h + P * u * k - P * m * h);
1736
+ return new THREE.Vector3(KD, ND, HD);
1737
1737
  };
1738
1738
  function jD() {
1739
1739
  const E = new T();
1740
1740
  let D = new uC();
1741
- L.use(D), D.closed = !1;
1741
+ v.use(D), D.closed = !1;
1742
1742
  let C = 0, B = "default", F = !0;
1743
1743
  const A = () => {
1744
1744
  E.setUserDraw(
@@ -1753,7 +1753,7 @@ function jD() {
1753
1753
  E.setMessage(`
1754
1754
  \u6307\u5B9A\u5706\u7684\u534A\u5F84:`), E.setKeyWords("[\u76F4\u5F84(D)]"), D.center = E.value(), A();
1755
1755
  else if (C === 1)
1756
- return r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1756
+ return i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1757
1757
  C++;
1758
1758
  }
1759
1759
  n === y.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
@@ -1776,21 +1776,21 @@ function jD() {
1776
1776
  ]), D.radius = D.center.distanceTo(g), h.drawCustomEntity(D);
1777
1777
  }), E.setMessage(`
1778
1778
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), C === 2)
1779
- return e.push(E.value()), D.center = sD(e), D.radius = D.center.distanceTo(e[0]), r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1779
+ 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;
1780
1780
  C++;
1781
1781
  }
1782
1782
  };
1783
- let i;
1783
+ let r;
1784
1784
  const o = (n, u) => {
1785
1785
  new THREE.Line3(n, u).getCenter(D.center), D.radius = u.distanceTo(n) / 2;
1786
1786
  }, a = (n) => {
1787
1787
  if (B === "2P" && (E.setMessage(`
1788
1788
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E00\u4E2A\u7AEF\u70B9:`), n === y.kOk)) {
1789
- if (C === 0 && (i = E.value(), E.setUserDraw((u, h) => {
1790
- o(i, u), h.drawCustomEntity(D), h.drawLine(i, u);
1789
+ if (C === 0 && (r = E.value(), E.setUserDraw((u, h) => {
1790
+ o(r, u), h.drawCustomEntity(D), h.drawLine(r, u);
1791
1791
  }), E.setMessage(`
1792
1792
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), C === 1)
1793
- return o(i, E.value()), r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1793
+ return o(r, E.value()), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1794
1794
  C++;
1795
1795
  }
1796
1796
  }, l = (n) => {
@@ -1821,7 +1821,7 @@ function jD() {
1821
1821
  return { exit: !0 };
1822
1822
  },
1823
1823
  (n) => {
1824
- n === y.kCancel && r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1824
+ n === y.kCancel && i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1825
1825
  }
1826
1826
  );
1827
1827
  }
@@ -1851,17 +1851,17 @@ async function ID() {
1851
1851
  };
1852
1852
  F(), E.goWhile(
1853
1853
  (A) => {
1854
- if (A === y.kOk && (D = new J(), L.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === y.kKeyWord) {
1854
+ if (A === y.kOk && (D = new J(), v.use(D), D.pt1 = B, D.pt2 = E.value(), B = D.pt2.clone(), C.push(D), F()), A === y.kKeyWord) {
1855
1855
  if (E.isKeyWordPicked("E"))
1856
1856
  nD();
1857
1857
  else if (E.isKeyWordPicked("C")) {
1858
1858
  const t = new J();
1859
- return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), L.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1859
+ return t.pt1 = B.clone(), t.pt2 = C[0].pt1.clone(), v.use(t), C.push(t), B = t.pt2.clone(), nD(), { exit: !0 };
1860
1860
  }
1861
1861
  }
1862
1862
  },
1863
1863
  (A) => (A === y.kCancel && C.forEach((t) => {
1864
- r.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1864
+ i.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1865
1865
  }), { exit: !0 })
1866
1866
  );
1867
1867
  }
@@ -1874,11 +1874,11 @@ async function lC() {
1874
1874
  if (!D)
1875
1875
  return;
1876
1876
  let C = new Z(), B = new Y();
1877
- B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = r.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1878
- C.endPoint = r.NewMcGePoint3d(A), B.position = r.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
1877
+ B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = i.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1878
+ C.endPoint = i.NewMcGePoint3d(A), B.position = i.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
1879
1879
  }), E.setMessage(`
1880
1880
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go();
1881
- let F = r.App.GetCurrentMxCAD();
1881
+ let F = i.App.GetCurrentMxCAD();
1882
1882
  F.DrawEntity(B), F.DrawEntity(C);
1883
1883
  }
1884
1884
  }
@@ -1894,19 +1894,29 @@ async function cC() {
1894
1894
  return;
1895
1895
  let e = t.GetCount();
1896
1896
  for (let s = 0; s < e; s++) {
1897
- let i = t.AtObject(s).val;
1898
- i?.ObjectName == "McDbMText" && console.log(i.contents);
1897
+ let r = t.AtObject(s).val;
1898
+ r?.ObjectName == "McDbMText" && console.log(r.contents);
1899
1899
  }
1900
1900
  }
1901
1901
  }
1902
1902
  }
1903
1903
  function mC() {
1904
- r.App.GetCurrentMxCAD().saveFile("xxxxx");
1904
+ i.App.GetCurrentMxCAD().saveFile("xxxxx");
1905
+ }
1906
+ function pC() {
1907
+ i.App.GetCurrentMxCAD().saveFileToUrl("http://localhost:3337/mxcad/savefiledwg", (E, D) => {
1908
+ try {
1909
+ let C = JSON.parse(D);
1910
+ console.log(C), console.log(E);
1911
+ } catch {
1912
+ console.log("Mx: sserverResult error");
1913
+ }
1914
+ });
1905
1915
  }
1906
1916
  d.on("init", () => {
1907
- d.addCommand("Mx_Line", ID), d.addCommand("Mx_TestDraw", lC), d.addCommand("Mx_Test_GetDim", cC), d.addCommand("Mx_Test_SaveFile", mC);
1917
+ d.addCommand("Mx_Line", ID), d.addCommand("Mx_TestDraw", lC), d.addCommand("Mx_Test_GetDim", cC), d.addCommand("Mx_Test_SaveFile", mC), d.addCommand("Mx_Test_SaveFileDwg", pC);
1908
1918
  });
1909
- async function pC() {
1919
+ async function dC() {
1910
1920
  const E = new T();
1911
1921
  E.setMessage(`
1912
1922
  \u6307\u5B9A\u63D2\u5165\u4F4D\u7F6E:`);
@@ -1918,7 +1928,7 @@ async function pC() {
1918
1928
  if (C.length <= 0)
1919
1929
  return;
1920
1930
  let B = d.screenCoordLong2Doc(50);
1921
- C = N.b64Encode(C);
1931
+ C = H.b64Encode(C);
1922
1932
  const F = {
1923
1933
  postx: D.x,
1924
1934
  posty: D.y,
@@ -1929,7 +1939,7 @@ async function pC() {
1929
1939
  }
1930
1940
  async function GD() {
1931
1941
  const E = new T(), D = new ZD();
1932
- L.use(D), E.setMessage(`
1942
+ v.use(D), E.setMessage(`
1933
1943
  \u6307\u5B9A\u8D77\u70B9:`);
1934
1944
  let C;
1935
1945
  E.setUserDraw((B, F) => {
@@ -1945,7 +1955,7 @@ async function GD() {
1945
1955
  },
1946
1956
  (B) => {
1947
1957
  if (B === y.kCancel) {
1948
- let F = r.App.GetCurrentMxCAD();
1958
+ let F = i.App.GetCurrentMxCAD();
1949
1959
  for (let A = 0; A < D.points.length; A++)
1950
1960
  A == 0 ? F.PathMoveTo(D.points[A].x, D.points[A].y) : F.PathLineTo(D.points[A].x, D.points[A].y);
1951
1961
  F.DrawPathToPolyline();
@@ -1965,24 +1975,24 @@ async function WD() {
1965
1975
  let B = 5;
1966
1976
  E.setUserDraw((F, A) => {
1967
1977
  C.radius = D.distanceTo(F);
1968
- let t = C.getEndParam().val, s = C.getDistAtParam(t).val / B, i = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1978
+ let t = C.getEndParam().val, s = C.getDistAtParam(t).val / B, r = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1969
1979
  for (let l = 0; l < B; l++) {
1970
- let n = C.getPointAtDist(i).val;
1971
- i += s, l > 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), l == 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);
1980
+ let n = C.getPointAtDist(r).val;
1981
+ r += s, l > 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), l == 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);
1972
1982
  }
1973
1983
  }), E.setMessage(`
1974
1984
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go(), E.drawReserve();
1975
1985
  }
1976
1986
  d.addCommand("Mx_Polygon", WD);
1977
- function dC(E, D, C) {
1978
- const B = E.x, F = D.x, A = C.x, t = E.y, e = D.y, s = C.y, i = B - F, o = t - e, a = B - A, l = 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 - i * l, g = -(l * n - o * u) / h, c = -(i * u - a * n) / h;
1987
+ function hC(E, D, C) {
1988
+ 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, l = 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 * l, g = -(l * n - o * u) / h, c = -(r * u - a * n) / h;
1979
1989
  return new THREE.Vector3(g, c, 0);
1980
1990
  }
1981
- function hC(E, D) {
1991
+ function wC(E, D) {
1982
1992
  const C = E.x, B = E.y, F = D.x, A = D.y;
1983
1993
  return Math.sqrt((C - F) * (C - F) + (B - A) * (B - A));
1984
1994
  }
1985
- function wC(E, D, C) {
1995
+ function gC(E, D, C) {
1986
1996
  let B;
1987
1997
  E < C ? B = C - E : B = C - E + 360;
1988
1998
  let F;
@@ -1990,11 +2000,11 @@ function wC(E, D, C) {
1990
2000
  }
1991
2001
  function CD(E, D, C) {
1992
2002
  const B = E.x, F = D.x, A = E.y, t = D.y;
1993
- let e, s, i;
1994
- return e = (A - t) / C, s = (B - F) / C, s >= 0.99999 && (s = 0.99999), s <= -0.99999 && (s = -0.99999), i = Math.acos(s), i = i / Math.PI * 180, e < -0.05 && (i = 360 - i), {
2003
+ let e, s, r;
2004
+ 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), {
1995
2005
  sin: e,
1996
2006
  cos: s,
1997
- angle: i
2007
+ angle: r
1998
2008
  };
1999
2009
  }
2000
2010
  const $ = _D.MrxDbgUiPrBaseReturn, f = (E, D, C) => {
@@ -2026,12 +2036,12 @@ class rD extends aD {
2026
2036
  getArcMidPoint(D, C, B, F, A) {
2027
2037
  const t = D, e = B * Math.PI / 180;
2028
2038
  let s = F * Math.PI / 180;
2029
- const i = new THREE.Vector3(), o = new THREE.Vector3();
2030
- i.x = t.x + C * Math.cos(e), i.y = t.y + C * Math.sin(e), o.x = t.x + C * Math.cos(s), o.y = t.y + C * Math.sin(s);
2039
+ const r = new THREE.Vector3(), o = new THREE.Vector3();
2040
+ 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);
2031
2041
  const a = C;
2032
2042
  (A ? B < F : B > F) && (s += Math.PI * 2);
2033
2043
  const l = new THREE.Vector3();
2034
- return l.x = t.x + a * Math.cos((e + s) / 2), l.y = t.y + a * Math.sin((e + s) / 2), [i, l, o, this.center];
2044
+ return l.x = t.x + a * Math.cos((e + s) / 2), l.y = t.y + a * Math.sin((e + s) / 2), [r, l, o, this.center];
2035
2045
  }
2036
2046
  getGripPoints() {
2037
2047
  return this.getArcMidPoint(
@@ -2051,12 +2061,12 @@ class rD extends aD {
2051
2061
  upDatePoints(D, C, B) {
2052
2062
  D[C].add(B);
2053
2063
  const [F, A, t] = D;
2054
- this.center = dC(F, t, A), this.radius = hC(A, this.center);
2055
- const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), i = CD(A, this.center, this.radius);
2056
- this.clockwise = wC(
2064
+ this.center = hC(F, t, A), this.radius = wC(A, this.center);
2065
+ const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), r = CD(A, this.center, this.radius);
2066
+ this.clockwise = gC(
2057
2067
  s.angle,
2058
2068
  e.angle,
2059
- i.angle
2069
+ r.angle
2060
2070
  ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(s.angle);
2061
2071
  }
2062
2072
  }
@@ -2065,7 +2075,7 @@ async function UD() {
2065
2075
  E.setMessage(`
2066
2076
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)]");
2067
2077
  let D = new rD();
2068
- D.closed = !1, L.use(D);
2078
+ D.closed = !1, v.use(D);
2069
2079
  let C, B, F;
2070
2080
  const A = f(
2071
2081
  E,
@@ -2088,7 +2098,7 @@ async function UD() {
2088
2098
  const e = f(
2089
2099
  E,
2090
2100
  () => {
2091
- t = E.value(), F = new q(), F.closed = !1, L.use(F), F.center = t, D.center = t, E.setMessage(`
2101
+ t = E.value(), F = new q(), F.closed = !1, v.use(F), F.center = t, D.center = t, E.setMessage(`
2092
2102
  \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setUserDraw((c, m) => {
2093
2103
  m.drawCustomEntity(F), m.drawLine(t, c);
2094
2104
  }), o();
@@ -2096,15 +2106,15 @@ async function UD() {
2096
2106
  () => {
2097
2107
  }
2098
2108
  );
2099
- let s, i;
2109
+ let s, r;
2100
2110
  const o = f(
2101
2111
  E,
2102
2112
  () => {
2103
2113
  s = E.value(), F.endPoint = s, E.setMessage(
2104
2114
  `
2105
2115
  \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)]:`
2106
- ), E.setKeyWords("A L R"), i = new J(), i.setDashLineDisplay(!0), i.setDashArray(0.05), i.setLineWidth(2), i.setColor("#ffd30d"), i.pt1 = F.center, E.setUserDraw((c, m) => {
2107
- F.startPoint = c, i.pt2 = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2116
+ ), 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((c, m) => {
2117
+ F.startPoint = c, r.pt2 = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2108
2118
  }), l();
2109
2119
  },
2110
2120
  () => {
@@ -2122,14 +2132,14 @@ async function UD() {
2122
2132
  `
2123
2133
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2124
2134
  ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2125
- F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2135
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2126
2136
  }), !0;
2127
2137
  if (E.isKeyWordPicked("L"))
2128
2138
  return E.setMessage(
2129
2139
  `
2130
2140
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2131
2141
  ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2132
- F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2142
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(r);
2133
2143
  }), !0;
2134
2144
  if (E.isKeyWordPicked("R"))
2135
2145
  E.setMessage(
@@ -2147,18 +2157,18 @@ async function UD() {
2147
2157
  E,
2148
2158
  () => {
2149
2159
  n = E.value(), E.setMessage(`
2150
- \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new YD(), B.autoClockwise = !0, B.closed = !1, L.use(B), B.point1 = C, B.point3 = n, E.setUserDraw((c, m) => {
2160
+ \u6307\u5B9A\u5706\u5F27\u7684\u7AEF\u70B9:`), B = new YD(), B.autoClockwise = !0, B.closed = !1, v.use(B), B.point1 = C, B.point3 = n, E.setUserDraw((c, m) => {
2151
2161
  B.point2 = c, m.drawCustomEntity(B);
2152
2162
  }), g();
2153
2163
  },
2154
2164
  () => {
2155
2165
  if (E.isKeyWordPicked("C"))
2156
- F = new q(), F.closed = !1, L.use(F), E.setMessage(`
2166
+ F = new q(), F.closed = !1, v.use(F), E.setMessage(`
2157
2167
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2158
2168
  F.startPoint = C, m.drawLine(c, F.startPoint);
2159
2169
  }), e();
2160
2170
  else if (E.isKeyWordPicked("E"))
2161
- F = new q(), F.closed = !1, L.use(F), E.setMessage(`
2171
+ F = new q(), F.closed = !1, v.use(F), E.setMessage(`
2162
2172
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2163
2173
  F.startPoint = C, m.drawLine(c, F.startPoint);
2164
2174
  }), e();
@@ -2166,7 +2176,7 @@ async function UD() {
2166
2176
  return !0;
2167
2177
  }
2168
2178
  );
2169
- let h = r.App.GetCurrentMxCAD();
2179
+ let h = i.App.GetCurrentMxCAD();
2170
2180
  const g = f(
2171
2181
  E,
2172
2182
  () => {
@@ -2188,15 +2198,15 @@ d.on("init", () => {
2188
2198
  });
2189
2199
  function zD() {
2190
2200
  const E = new T(), D = new QD();
2191
- D.closed = !1, L.use(D), E.setMessage(`
2201
+ D.closed = !1, v.use(D), E.setMessage(`
2192
2202
  \u6307\u5B9A\u692D\u5706\u7684\u8F74\u7AEF\u70B9`), E.setKeyWords("[\u4E2D\u5FC3\u70B9(C)]");
2193
2203
  let C, B = new THREE.Vector3();
2194
2204
  f(
2195
2205
  E,
2196
2206
  () => {
2197
- C = E.value(), E.setUserDraw((i, o) => {
2198
- const a = new THREE.Line3(C, i);
2199
- a.getCenter(B), D.center = B, D.xRadius = a.distance() / 2, D.yRadius = D.xRadius, D.rotation = DD(i.x, i.y, B.x, B.y), o.drawLine(i, C);
2207
+ C = E.value(), E.setUserDraw((r, o) => {
2208
+ const a = new THREE.Line3(C, r);
2209
+ 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);
2200
2210
  }), E.setMessage(`
2201
2211
  \u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), E.setKeyWords(""), A();
2202
2212
  },
@@ -2206,8 +2216,8 @@ function zD() {
2206
2216
  const A = f(
2207
2217
  E,
2208
2218
  () => {
2209
- E.setUserDraw((i, o) => {
2210
- D.yRadius = B.distanceTo(i), o.drawLine(B, i), o.drawCustomEntity(D);
2219
+ E.setUserDraw((r, o) => {
2220
+ D.yRadius = B.distanceTo(r), o.drawLine(B, r), o.drawCustomEntity(D);
2211
2221
  }), E.setMessage(`
2212
2222
  \u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), E.setKeyWords(""), t();
2213
2223
  },
@@ -2217,8 +2227,8 @@ function zD() {
2217
2227
  E,
2218
2228
  () => {
2219
2229
  E.setMessage(`
2220
- \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((i, o) => {
2221
- D.startAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2230
+ \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((r, o) => {
2231
+ D.startAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2222
2232
  }), e();
2223
2233
  },
2224
2234
  () => {
@@ -2226,8 +2236,8 @@ function zD() {
2226
2236
  ), e = f(
2227
2237
  E,
2228
2238
  () => {
2229
- E.setUserDraw((i, o) => {
2230
- D.endAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2239
+ E.setUserDraw((r, o) => {
2240
+ D.endAngle = DD(r.x, r.y, B.x, B.y) - D.rotation, o.drawLine(B, r), o.drawCustomEntity(D);
2231
2241
  }), E.setMessage(`
2232
2242
  \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), s();
2233
2243
  },
@@ -2236,14 +2246,14 @@ function zD() {
2236
2246
  ), s = f(
2237
2247
  E,
2238
2248
  () => {
2239
- let i = new w(D.xRadius, 0, 0);
2240
- i.rotateBy(D.rotation, w.kZAxis), r.App.GetCurrentMxCAD().DrawEllipseArc(D.center.x, D.center.y, i.x, i.y, D.yRadius / D.xRadius, D.startAngle, D.endAngle);
2249
+ let r = new w(D.xRadius, 0, 0);
2250
+ 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);
2241
2251
  },
2242
2252
  () => {
2243
2253
  }
2244
2254
  );
2245
2255
  }
2246
- function gC() {
2256
+ function yC() {
2247
2257
  const E = new T(), D = new XD(), C = new DC();
2248
2258
  E.setMessage(`
2249
2259
  \u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u692D\u5706:`), E.go(() => {
@@ -2251,12 +2261,12 @@ function gC() {
2251
2261
  C.point2 = B, D.drawCustomEntity(C);
2252
2262
  }), E.setUserDraw(D), E.setMessage(`
2253
2263
  \u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\u692D\u5706:`), E.go(() => {
2254
- r.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2264
+ i.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2255
2265
  });
2256
2266
  });
2257
2267
  }
2258
2268
  d.on("init", () => {
2259
- d.addCommand("Mx_EllipseArc", zD), d.addCommand("Mx_Ellipse", gC);
2269
+ d.addCommand("Mx_EllipseArc", zD), d.addCommand("Mx_Ellipse", yC);
2260
2270
  });
2261
2271
  async function VD() {
2262
2272
  (await eD.selectEnt(`
@@ -2265,16 +2275,16 @@ async function VD() {
2265
2275
  });
2266
2276
  }
2267
2277
  d.addCommand("Mx_Erase", VD);
2268
- const yC = async (E, D, C) => {
2278
+ const xC = async (E, D, C) => {
2269
2279
  const { locateFile: B } = C, F = B(E + ".js");
2270
- return await vD(F), await globalThis[D](C);
2280
+ return await LD(F), await globalThis[D](C);
2271
2281
  };
2272
- function xC(E) {
2282
+ function bC(E) {
2273
2283
  return typeof ResizeObserver == "function" ? new ResizeObserver(E) : null;
2274
2284
  }
2275
- function bC(E, D) {
2285
+ function fC(E, D) {
2276
2286
  const C = () => requestAnimationFrame(D);
2277
- let B = xC(C);
2287
+ let B = bC(C);
2278
2288
  if (B) {
2279
2289
  B.observe(E);
2280
2290
  return;
@@ -2284,7 +2294,7 @@ function bC(E, D) {
2284
2294
  return;
2285
2295
  }
2286
2296
  }
2287
- function fC(E, D) {
2297
+ function MC(E, D) {
2288
2298
  let C = null;
2289
2299
  return function(...B) {
2290
2300
  C || (C = setTimeout(() => {
@@ -2302,23 +2312,23 @@ class z {
2302
2312
  n = Math.max(A, n), u = Math.max(t, u), this.canvas.style.width = n + 1 + "px", this.canvas.style.height = u + "px";
2303
2313
  const h = window.devicePixelRatio || 1;
2304
2314
  this.canvas.width = n * h, this.canvas.height = u * h;
2305
- }, B = fC(C, 50), {
2315
+ }, B = MC(C, 50), {
2306
2316
  canvas: F,
2307
2317
  minWidth: A = 300,
2308
2318
  minHeight: t = 300,
2309
2319
  updateCanvasSize: e = B,
2310
2320
  ...s
2311
2321
  } = D;
2312
- let i = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = i.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2313
- o == null && (o = i.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = i, this.ctx = o, s.canvas = this.canvas;
2322
+ let r = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = r.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2323
+ o == null && (o = r.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = r, this.ctx = o, s.canvas = this.canvas;
2314
2324
  for (let a in s)
2315
2325
  this[a] = s[a];
2316
2326
  if (this.canvas instanceof HTMLCanvasElement) {
2317
2327
  const a = this.canvas.parentElement || document.body;
2318
- bC(a, e);
2328
+ fC(a, e);
2319
2329
  } else
2320
2330
  console.error("createMxDraw3d canvas \u53C2\u6570\u4E0D\u6B63\u786E \u65E0\u6CD5\u83B7\u53D6\u5230canvas\u5143\u7D20");
2321
- window.onresize = C, C(), yC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2331
+ window.onresize = C, C(), xC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2322
2332
  z.onloadWasmMxDraw3dModel && z.onloadWasmMxDraw3dModel(this), this.updateCanvasSize = e, this.open3DFile = (a) => {
2323
2333
  const l = new FileReader();
2324
2334
  l.onload = () => {
@@ -2332,7 +2342,7 @@ class z {
2332
2342
  });
2333
2343
  }
2334
2344
  }
2335
- function MC(E, D) {
2345
+ function TC(E, D) {
2336
2346
  return new Promise(async (C, B) => {
2337
2347
  try {
2338
2348
  E.locateFile || (E.locateFile = iC);
@@ -2345,26 +2355,26 @@ function MC(E, D) {
2345
2355
  }
2346
2356
  });
2347
2357
  }
2348
- const kC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2358
+ const PC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2349
2359
  __proto__: null,
2350
2360
  b64Encode: uD,
2351
2361
  b64Decode: lD,
2352
2362
  saveAsFileDialog: cD,
2353
2363
  downloadFile: mD,
2354
2364
  downloadFileFromUrl: pD,
2355
- MxTools: N,
2365
+ MxTools: H,
2356
2366
  McGePoint3d: p,
2357
2367
  McGeVector3d: w,
2358
2368
  McGeMatrix3d: W,
2359
2369
  getFilterImp: K,
2360
- McDrawResbuf: H,
2370
+ McDrawResbuf: N,
2361
2371
  McDrawUtilityClass: PD,
2362
2372
  McDrawUtility: eD,
2363
2373
  McDrawSelSet: RD,
2364
2374
  McRxObject: O,
2365
2375
  McObjectIdType: b,
2366
2376
  McObjectId: M,
2367
- McDbObject: v,
2377
+ McDbObject: L,
2368
2378
  get McDb() {
2369
2379
  return BD;
2370
2380
  },
@@ -2392,23 +2402,23 @@ const kC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2392
2402
  McDbArc: kD,
2393
2403
  McObject: U,
2394
2404
  McAppType: SD,
2395
- MxCppType: LD,
2405
+ MxCppType: vD,
2396
2406
  get MxCpp() {
2397
- return r;
2407
+ return i;
2398
2408
  },
2399
2409
  loadMxCADassembly: OD,
2400
2410
  createMxCad: oC,
2401
2411
  drawText: aC,
2402
2412
  drawCircle: jD,
2403
2413
  drawLine: ID,
2404
- drawMText: pC,
2414
+ drawMText: dC,
2405
2415
  drawPolyLine: GD,
2406
2416
  drawPolygon: WD,
2407
2417
  drawArc: UD,
2408
2418
  drawEllipticalArc: zD,
2409
2419
  mxErase: VD,
2410
2420
  MxDraw3d: z,
2411
- loadMxCADassembly3d: MC
2421
+ loadMxCADassembly3d: TC
2412
2422
  }, Symbol.toStringTag, { value: "Module" }));
2413
2423
  export {
2414
2424
  SD as McAppType,
@@ -2431,12 +2441,12 @@ export {
2431
2441
  Z as McDbLine,
2432
2442
  hD as McDbLinetypeTable,
2433
2443
  FD as McDbMText,
2434
- v as McDbObject,
2444
+ L as McDbObject,
2435
2445
  bD as McDbPolyline,
2436
2446
  TD as McDbRotatedDimension,
2437
2447
  Y as McDbText,
2438
2448
  wD as McDbTextStyleTable,
2439
- H as McDrawResbuf,
2449
+ N as McDrawResbuf,
2440
2450
  RD as McDrawSelSet,
2441
2451
  eD as McDrawUtility,
2442
2452
  PD as McDrawUtilityClass,
@@ -2447,27 +2457,27 @@ export {
2447
2457
  M as McObjectId,
2448
2458
  b as McObjectIdType,
2449
2459
  O as McRxObject,
2450
- r as MxCpp,
2451
- LD as MxCppType,
2460
+ i as MxCpp,
2461
+ vD as MxCppType,
2452
2462
  z as MxDraw3d,
2453
- N as MxTools,
2463
+ H as MxTools,
2454
2464
  lD as b64Decode,
2455
2465
  uD as b64Encode,
2456
2466
  oC as createMxCad,
2457
- kC as default,
2467
+ PC as default,
2458
2468
  mD as downloadFile,
2459
2469
  pD as downloadFileFromUrl,
2460
2470
  UD as drawArc,
2461
2471
  jD as drawCircle,
2462
2472
  zD as drawEllipticalArc,
2463
2473
  ID as drawLine,
2464
- pC as drawMText,
2474
+ dC as drawMText,
2465
2475
  GD as drawPolyLine,
2466
2476
  WD as drawPolygon,
2467
2477
  aC as drawText,
2468
2478
  K as getFilterImp,
2469
2479
  OD as loadMxCADassembly,
2470
- MC as loadMxCADassembly3d,
2480
+ TC as loadMxCADassembly3d,
2471
2481
  VD as mxErase,
2472
2482
  cD as saveAsFileDialog
2473
2483
  };