mxcad 1.0.59 → 1.0.60

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
@@ -63,11 +63,11 @@ const N = {
63
63
  downloadFile: mD,
64
64
  downloadFileFromUrl: pD
65
65
  };
66
- class m {
66
+ class p {
67
67
  static kOrigin;
68
68
  imp;
69
69
  constructor(D, C, B) {
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);
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);
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;
@@ -91,7 +91,7 @@ class m {
91
91
  return this.imp.isEqualTo(D.imp);
92
92
  }
93
93
  clone() {
94
- return new m(this.imp);
94
+ return new p(this.imp);
95
95
  }
96
96
  get x() {
97
97
  return this.imp.x;
@@ -118,7 +118,7 @@ class w {
118
118
  static kZAxis;
119
119
  imp;
120
120
  constructor(D, C, B) {
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);
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);
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 = i.mxcadassemblyimp.MdGeMatrix3d(), D instanceof Object && this.imp.copy(D);
189
+ this.imp = r.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
- i.App.DestroyObject(E);
294
+ r.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 ? i.App.ObjectIdToObject(this.id) : null;
336
+ return this.type == 0 ? r.App.ObjectIdToObject(this.id) : null;
337
337
  }
338
338
  getObjectName() {
339
339
  if (this.type == 0)
340
- return i.App.getImp().ObjectIdToObjectName(this.id);
340
+ return r.App.getImp().ObjectIdToObjectName(this.id);
341
341
  if (this.type == 1) {
342
342
  let D = d.getCurrentDraw().getMxEntity(this.id);
343
343
  if (D)
@@ -361,7 +361,7 @@ class v extends O {
361
361
  }
362
362
  Clone() {
363
363
  let D = this.imp.Clone();
364
- return i.App.CreateCloneObject(D);
364
+ return r.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 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);
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);
392
392
  }
393
393
  getImp() {
394
394
  return this.imp;
@@ -444,7 +444,7 @@ class j {
444
444
  }
445
445
  class FC extends v {
446
446
  constructor(D) {
447
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLayerTableRecord());
447
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLayerTableRecord());
448
448
  }
449
449
  get name() {
450
450
  return this.imp.getName();
@@ -585,7 +585,7 @@ class gD extends O {
585
585
  }
586
586
  class Q extends v {
587
587
  constructor(D) {
588
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTableRecord());
588
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTableRecord());
589
589
  }
590
590
  appendAcDbEntity(D) {
591
591
  return new M(
@@ -598,7 +598,7 @@ class Q extends v {
598
598
  return new gD(B);
599
599
  }
600
600
  get origin() {
601
- return new m(this.imp.origin());
601
+ return new p(this.imp.origin());
602
602
  }
603
603
  set origin(D) {
604
604
  this.imp.setOrigin(D.imp);
@@ -624,7 +624,7 @@ class yD extends O {
624
624
  }
625
625
  class xD extends v {
626
626
  constructor(D) {
627
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbBlockTable());
627
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockTable());
628
628
  }
629
629
  getAt(D) {
630
630
  let C = this.getAt(D);
@@ -712,10 +712,10 @@ class V extends v {
712
712
  GetBoundingBox() {
713
713
  let D = this.imp.GetBoundingBox();
714
714
  if (D) {
715
- let C = { minPt: new m(D.AtPoint(0).val), maxPt: new m(D.AtPoint(1).val), ret: 0 };
716
- return i.App.DestroyObject(D), C;
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;
717
717
  } else
718
- return { minPt: new m(), maxPt: new m(), ret: 1 };
718
+ return { minPt: new p(), maxPt: new p(), ret: 1 };
719
719
  }
720
720
  }
721
721
  class _ extends V {
@@ -723,43 +723,43 @@ class _ extends V {
723
723
  super(D);
724
724
  }
725
725
  getStartParam() {
726
- return { val: this.imp.getStartParam(), ret: i.getCallResult() };
726
+ return { val: this.imp.getStartParam(), ret: r.getCallResult() };
727
727
  }
728
728
  getEndParam() {
729
- return { val: this.imp.getEndParam(), ret: i.getCallResult() };
729
+ return { val: this.imp.getEndParam(), ret: r.getCallResult() };
730
730
  }
731
731
  getDistAtParam(D) {
732
- return { val: this.imp.getDistAtParam(D), ret: i.getCallResult() };
732
+ return { val: this.imp.getDistAtParam(D), ret: r.getCallResult() };
733
733
  }
734
734
  getParamAtDist(D) {
735
- return { val: this.imp.getParamAtDist(D), ret: i.getCallResult() };
735
+ return { val: this.imp.getParamAtDist(D), ret: r.getCallResult() };
736
736
  }
737
737
  getDistAtPoint(D) {
738
- return { val: this.imp.getDistAtPoint(D.imp), ret: i.getCallResult() };
738
+ return { val: this.imp.getDistAtPoint(D.imp), ret: r.getCallResult() };
739
739
  }
740
740
  getPointAtDist(D) {
741
- return { val: new m(this.imp.getPointAtDist(D)), ret: i.getCallResult() };
741
+ return { val: new p(this.imp.getPointAtDist(D)), ret: r.getCallResult() };
742
742
  }
743
743
  getStartPoint() {
744
- return { val: new m(this.imp.getStartPoint()), ret: i.getCallResult() };
744
+ return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
745
745
  }
746
746
  getEndPoint() {
747
- return { val: new m(this.imp.getStartPoint()), ret: i.getCallResult() };
747
+ return { val: new p(this.imp.getStartPoint()), ret: r.getCallResult() };
748
748
  }
749
749
  getPointAtParam(D) {
750
- return { val: new m(this.imp.getPointAtParam(D)), ret: i.getCallResult() };
750
+ return { val: new p(this.imp.getPointAtParam(D)), ret: r.getCallResult() };
751
751
  }
752
752
  getParamAtPoint(D) {
753
- return { val: this.imp.getParamAtPoint(D.imp), ret: i.getCallResult() };
753
+ return { val: this.imp.getParamAtPoint(D.imp), ret: r.getCallResult() };
754
754
  }
755
755
  getFirstDeriv(D) {
756
- return { val: new w(this.imp.getFirstDeriv(D)), ret: i.getCallResult() };
756
+ return { val: new w(this.imp.getFirstDeriv(D)), ret: r.getCallResult() };
757
757
  }
758
758
  getFirstDerivEx(D) {
759
- return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: i.getCallResult() };
759
+ return { val: new w(this.imp.getFirstDerivEx(D.imp)), ret: r.getCallResult() };
760
760
  }
761
761
  getClosestPointTo(D, C) {
762
- return { val: new m(this.imp.getClosestPointTo(D.imp, C)), ret: i.getCallResult() };
762
+ return { val: new p(this.imp.getClosestPointTo(D.imp, C)), ret: r.getCallResult() };
763
763
  }
764
764
  offsetCurves(D, C) {
765
765
  let B = this.imp.offsetCurves(D, C.imp);
@@ -770,28 +770,28 @@ class _ extends V {
770
770
  return new H(C);
771
771
  }
772
772
  getArea() {
773
- return { val: this.imp.getArea(), ret: i.getCallResult() };
773
+ return { val: this.imp.getArea(), ret: r.getCallResult() };
774
774
  }
775
775
  getSamplePoints(D) {
776
776
  let C = this.imp.getSamplePoints(D);
777
777
  return new H(C);
778
778
  }
779
779
  getLength() {
780
- return { val: this.imp.getLength(), ret: i.getCallResult() };
780
+ return { val: this.imp.getLength(), ret: r.getCallResult() };
781
781
  }
782
782
  }
783
783
  class Z extends _ {
784
784
  constructor(D) {
785
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbLine());
785
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbLine());
786
786
  }
787
787
  get startPoint() {
788
- return new m(this.imp.startPoint());
788
+ return new p(this.imp.startPoint());
789
789
  }
790
790
  set startPoint(D) {
791
791
  this.imp.setStartPoint(D.imp);
792
792
  }
793
793
  get endPoint() {
794
- return new m(this.imp.endPoint());
794
+ return new p(this.imp.endPoint());
795
795
  }
796
796
  set endPoint(D) {
797
797
  this.imp.setEndPoint(D.imp);
@@ -799,16 +799,16 @@ class Z extends _ {
799
799
  }
800
800
  class Y extends V {
801
801
  constructor(D) {
802
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbText());
802
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbText());
803
803
  }
804
804
  get position() {
805
- return new m(this.imp.position());
805
+ return new p(this.imp.position());
806
806
  }
807
807
  set position(D) {
808
808
  this.imp.setPosition(D.imp);
809
809
  }
810
810
  get alignmentPoint() {
811
- return new m(this.imp.position());
811
+ return new p(this.imp.position());
812
812
  }
813
813
  set alignmentPoint(D) {
814
814
  this.imp.setAlignmentPoint(D.imp);
@@ -858,10 +858,10 @@ class Y extends V {
858
858
  }
859
859
  class FD extends V {
860
860
  constructor(D) {
861
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbMText());
861
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbMText());
862
862
  }
863
863
  get location() {
864
- return new m(this.imp.location());
864
+ return new p(this.imp.location());
865
865
  }
866
866
  set location(D) {
867
867
  this.imp.setLocation(D.imp);
@@ -899,13 +899,13 @@ class FD extends V {
899
899
  }
900
900
  class AD extends _ {
901
901
  constructor(D) {
902
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbCircle());
902
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbCircle());
903
903
  }
904
904
  setCenter(D, C, B) {
905
- this.imp.setCenter(new m(D, C, B).imp);
905
+ this.imp.setCenter(new p(D, C, B).imp);
906
906
  }
907
907
  get center() {
908
- return new m(this.imp.center());
908
+ return new p(this.imp.center());
909
909
  }
910
910
  set center(D) {
911
911
  this.imp.setCenter(D.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 i.mxcadassemblyimp.MdDbPolyline());
922
+ super(D), D || this.initTempObject(new r.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: i.getCallResult() };
946
+ return { val: this.imp.getPointAt(D), ret: r.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: i.getCallResult() };
952
+ return { val1: this.imp.getStartWidthsAt(D), val2: this.imp.getEndWidthsAt(D), ret: r.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 i.mxcadassemblyimp.MdDbBlockReference());
963
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbBlockReference());
964
964
  }
965
965
  get blockTableRecordId() {
966
966
  return new M(this.imp.blockTableRecord(), b.kMxCAD);
@@ -969,7 +969,7 @@ class fD extends V {
969
969
  this.imp.setBlockTableRecordId(D.id);
970
970
  }
971
971
  get position() {
972
- return new m(this.imp.position());
972
+ return new p(this.imp.position());
973
973
  }
974
974
  set position(D) {
975
975
  this.imp.setPosition(D.imp);
@@ -998,7 +998,7 @@ class tD extends V {
998
998
  super(D);
999
999
  }
1000
1000
  get textPosition() {
1001
- return new m(this.imp.textPosition());
1001
+ return new p(this.imp.textPosition());
1002
1002
  }
1003
1003
  set textPosition(D) {
1004
1004
  this.imp.setTextPosition(D.imp);
@@ -1078,22 +1078,22 @@ class tD extends V {
1078
1078
  }
1079
1079
  class MD extends tD {
1080
1080
  constructor(D) {
1081
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbAlignedDimension());
1081
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbAlignedDimension());
1082
1082
  }
1083
1083
  get xLine1Point() {
1084
- return new m(this.imp.xLine1Point());
1084
+ return new p(this.imp.xLine1Point());
1085
1085
  }
1086
1086
  set xLine1Point(D) {
1087
1087
  this.imp.setXLine1Point(D.imp);
1088
1088
  }
1089
1089
  get xLine2Point() {
1090
- return new m(this.imp.xLine2Point());
1090
+ return new p(this.imp.xLine2Point());
1091
1091
  }
1092
1092
  set xLine2Point(D) {
1093
1093
  this.imp.setXLine2Point(D.imp);
1094
1094
  }
1095
1095
  get dimLinePoint() {
1096
- return new m(this.imp.dimLinePoint());
1096
+ return new p(this.imp.dimLinePoint());
1097
1097
  }
1098
1098
  set dimLinePoint(D) {
1099
1099
  this.imp.setDimLinePoint(D.imp);
@@ -1107,22 +1107,22 @@ class MD extends tD {
1107
1107
  }
1108
1108
  class TD extends tD {
1109
1109
  constructor(D) {
1110
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbRotatedDimension());
1110
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbRotatedDimension());
1111
1111
  }
1112
1112
  get xLine1Point() {
1113
- return new m(this.imp.xLine1Point());
1113
+ return new p(this.imp.xLine1Point());
1114
1114
  }
1115
1115
  set xLine1Point(D) {
1116
1116
  this.imp.setXLine1Point(D.imp);
1117
1117
  }
1118
1118
  get xLine2Point() {
1119
- return new m(this.imp.xLine2Point());
1119
+ return new p(this.imp.xLine2Point());
1120
1120
  }
1121
1121
  set xLine2Point(D) {
1122
1122
  this.imp.setXLine2Point(D.imp);
1123
1123
  }
1124
1124
  get dimLinePoint() {
1125
- return new m(this.imp.dimLinePoint());
1125
+ return new p(this.imp.dimLinePoint());
1126
1126
  }
1127
1127
  set dimLinePoint(D) {
1128
1128
  this.imp.setDimLinePoint(D.imp);
@@ -1142,13 +1142,13 @@ class TD extends tD {
1142
1142
  }
1143
1143
  class kD extends _ {
1144
1144
  constructor(D) {
1145
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.MdDbArc());
1145
+ super(D), D || this.initTempObject(new r.mxcadassemblyimp.MdDbArc());
1146
1146
  }
1147
1147
  setCenter(D, C, B) {
1148
- this.imp.setCenter(new m(D, C, B).imp);
1148
+ this.imp.setCenter(new p(D, C, B).imp);
1149
1149
  }
1150
1150
  get center() {
1151
- return new m(this.imp.center());
1151
+ return new p(this.imp.center());
1152
1152
  }
1153
1153
  set center(D) {
1154
1154
  this.imp.setCenter(D.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 i.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1177
+ return E == null ? D = new r.mxcadassemblyimp.McDrawResbuf() : D = E.getImp(), D;
1178
1178
  }
1179
1179
  class H extends O {
1180
1180
  constructor(D) {
1181
- super(D), D || this.initTempObject(new i.mxcadassemblyimp.McDrawResbuf());
1181
+ super(D), D || this.initTempObject(new r.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: i.getCallResult() };
1190
+ return { val: this.imp.AtDouble(D), ret: r.getCallResult() };
1191
1191
  }
1192
1192
  Atlong(D) {
1193
- return { val: this.imp.Atlong(D), ret: i.getCallResult() };
1193
+ return { val: this.imp.Atlong(D), ret: r.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: i.getCallResult() };
1199
+ return { val: new FD(B), ret: r.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: i.getCallResult() };
1207
+ return { val: new M(this.imp.AtObjectId(D), b.kMxCAD), ret: r.getCallResult() };
1208
1208
  }
1209
1209
  AtString(D) {
1210
- return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: i.getCallResult() };
1210
+ return { val: x.decodeFromGb2312(this.imp.AtString(D)), ret: r.getCallResult() };
1211
1211
  }
1212
1212
  AtPoint(D) {
1213
- return { val: new m(this.imp.AtPoint(D)), ret: i.getCallResult() };
1213
+ return { val: new p(this.imp.AtPoint(D)), ret: r.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((r) => {
1267
- e.push(new M(r, b.kMxDraw));
1266
+ t.forEach((i) => {
1267
+ e.push(new M(i, 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 i.mxcadassemblyimp.McDrawUtility());
1275
+ this.imp || (this.imp = new r.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 i.mxcadassemblyimp.McDrawSelSet());
1281
+ super(), this.initTempObject(new r.mxcadassemblyimp.McDrawSelSet());
1282
1282
  }
1283
1283
  allSelect(D = null) {
1284
1284
  return this.imp.allSelect(K(D));
@@ -1306,11 +1306,14 @@ class U {
1306
1306
  initMxObject(D) {
1307
1307
  this.mxObject = D;
1308
1308
  }
1309
+ getMxDrawObject() {
1310
+ return this.mxObject;
1311
+ }
1309
1312
  getImp() {
1310
1313
  return this.imp;
1311
1314
  }
1312
1315
  getMxCppImp() {
1313
- return i.mxcadassemblyimp;
1316
+ return r.mxcadassemblyimp;
1314
1317
  }
1315
1318
  updateDisplay(D, C) {
1316
1319
  this.imp.updateDisplay(D, C);
@@ -1528,23 +1531,23 @@ class U {
1528
1531
  return this.imp.DrawEntity(D.getImp());
1529
1532
  }
1530
1533
  ObjectIdToObject(D) {
1531
- return i.App.ObjectIdToObject(D);
1534
+ return r.App.ObjectIdToObject(D);
1532
1535
  }
1533
1536
  CloneMcDbObject(D) {
1534
1537
  let C = this.imp.CloneMcDbObject(D);
1535
- return i.App.CreateCloneObject(C);
1538
+ return r.App.CreateCloneObject(C);
1536
1539
  }
1537
1540
  ObjectIdToMdObjectImp(D) {
1538
- return i.App.getImp().ObjectIdToMdObject(D);
1541
+ return r.App.getImp().ObjectIdToMdObject(D);
1539
1542
  }
1540
1543
  DestroyObject(D) {
1541
- !D || i.App.getImp().DestroyObject(D);
1544
+ !D || r.App.getImp().DestroyObject(D);
1542
1545
  }
1543
1546
  }
1544
1547
  class LD {
1545
1548
  imp;
1546
1549
  init(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();
1550
+ this.imp = D, w.kZAxis = new w(0, 0, 1), w.kXAxis = new w(1, 0, 0), w.kYAxis = new w(0, 1, 0), p.kOrigin = new p(0, 0, 0), W.kIdentity = new W();
1548
1551
  }
1549
1552
  getImp() {
1550
1553
  return this.imp;
@@ -1603,13 +1606,16 @@ class LD {
1603
1606
  let C = D.getObjectName();
1604
1607
  if (C == "McDbLine") {
1605
1608
  let B = new Z();
1606
- return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1609
+ return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1607
1610
  } else if (C == "McDbText") {
1608
1611
  let B = new Y();
1609
- return B.getImp().ConnectionTempObject(D), i.App.DestroyObject(D), B;
1612
+ return B.getImp().ConnectionTempObject(D), r.App.DestroyObject(D), B;
1610
1613
  }
1611
1614
  return console.log("Mx: Clone error type"), new v(D);
1612
1615
  }
1616
+ setFontFilePath(D) {
1617
+ return this.imp.setFontFilePath(D);
1618
+ }
1613
1619
  }
1614
1620
  class SD {
1615
1621
  mxcadassemblyimp;
@@ -1622,11 +1628,11 @@ class SD {
1622
1628
  let F = D.z || 0;
1623
1629
  D = d.getCurrentDraw().docCoord2Cad(D.x, D.y, F);
1624
1630
  }
1625
- let B = new m();
1631
+ let B = new p();
1626
1632
  return D && D.x && D.y && (B.x = D.x, B.y = D.y, D.z && (B.y = D.z)), B;
1627
1633
  }
1628
1634
  }
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) => {
1635
+ const iD = "1.0.60", 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) => {
1630
1636
  const B = document.createElement("script");
1631
1637
  B.src = E, B.type = "text/javascript", B.crossOrigin = "anonymous", document.body.appendChild(B), B.onload = () => {
1632
1638
  D();
@@ -1637,21 +1643,21 @@ const iD = "1.0.58", AC = "SharedArrayBuffer" in window, X = document.currentScr
1637
1643
  const { locateFile: B } = C, F = B(E + ".js");
1638
1644
  return await vD(F), await globalThis[D](C);
1639
1645
  };
1640
- let i;
1641
- async function OD(E, D = AC || !X ? tC : eC, C) {
1642
- return new Promise(async (B, F) => {
1646
+ let r;
1647
+ async function OD(E, D = AC || !X ? tC : eC, C, B) {
1648
+ return new Promise(async (F, A) => {
1643
1649
  try {
1644
- if (i || (i = new SD()), i.mxcadassemblyimp)
1645
- return E && E(i), B(i);
1646
- const t = await rC("mxdrawassembly_min", "mxdrawassembly", {
1650
+ if (r || (r = new SD()), r.mxcadassemblyimp)
1651
+ return E && E(r), F(r);
1652
+ const e = await rC("mxdrawassembly_min", "mxdrawassembly", {
1647
1653
  locateFile: D,
1648
1654
  wasmBinary: C
1649
1655
  });
1650
- i.mxcadassemblyimp = t;
1651
- let e = new t.McApp();
1652
- e.Init(), i.App.init(e), E && E(i), B(i);
1653
- } catch (A) {
1654
- F(A);
1656
+ r.mxcadassemblyimp = e;
1657
+ let s = new e.McApp();
1658
+ B && s.setFontFilePath(B), s.Init(), r.App.init(s), E && E(r), F(r);
1659
+ } catch (t) {
1660
+ A(t);
1655
1661
  }
1656
1662
  });
1657
1663
  }
@@ -1676,7 +1682,7 @@ const sC = (E) => {
1676
1682
  }
1677
1683
  }), oC = async (E) => {
1678
1684
  oD.state.MxFun || await JD();
1679
- const { locateFile: D, wasmBinary: C, canvas: B, userIdentitySign: F, onOpenFileComplete: A, fileUrl: t, onInit: e = () => {
1685
+ const { fontspath: D, locateFile: C, wasmBinary: B, canvas: F, userIdentitySign: A, onOpenFileComplete: t, fileUrl: e, onInit: s = () => {
1680
1686
  d.setIniset({
1681
1687
  EnableIntelliSelect: !0,
1682
1688
  IntelliSelectType: 1,
@@ -1684,15 +1690,15 @@ const sC = (E) => {
1684
1690
  });
1685
1691
  } } = E || {};
1686
1692
  await OD(() => {
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", () => {
1694
- A && A();
1695
- }), t && a.openWebFile(t), a;
1693
+ }, C, B, D), s();
1694
+ let i = await nC(F, A);
1695
+ const o = d.getMxFunTHREE();
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", () => {
1700
+ t && t();
1701
+ }), e && l.openWebFile(e), l;
1696
1702
  };
1697
1703
  async function aC() {
1698
1704
  const E = new T();
@@ -1726,7 +1732,7 @@ class uC extends aD {
1726
1732
  }
1727
1733
  }
1728
1734
  const sD = (E) => {
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);
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), L = 2 * (l - t), G = F * F + A * A + t * t - o * o - a * a - l * l, KD = -(u * k * G - u * L * I - m * h * G + m * L * g + R * h * I - R * k * g) / (n * m * L - n * R * k - c * u * L + c * R * h + P * u * k - P * m * h), HD = (n * k * G - n * L * I - c * h * G + c * L * g + P * h * I - P * k * g) / (n * m * L - n * R * k - c * u * L + 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 * L - n * R * k - c * u * L + c * R * h + P * u * k - P * m * h);
1730
1736
  return new THREE.Vector3(KD, HD, ND);
1731
1737
  };
1732
1738
  function jD() {
@@ -1747,7 +1753,7 @@ function jD() {
1747
1753
  E.setMessage(`
1748
1754
  \u6307\u5B9A\u5706\u7684\u534A\u5F84:`), E.setKeyWords("[\u76F4\u5F84(D)]"), D.center = E.value(), A();
1749
1755
  else if (C === 1)
1750
- return i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1756
+ return r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1751
1757
  C++;
1752
1758
  }
1753
1759
  n === y.kKeyWord && E.isKeyWordPicked("D") && (F = !1, A(), E.setMessage(`
@@ -1762,32 +1768,32 @@ function jD() {
1762
1768
  h.drawLine(e[0], u);
1763
1769
  }), E.setMessage(`
1764
1770
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E8C\u4E2A\u70B9:`)), C === 1 && (e.push(E.value()), E.setUserDraw((u, h) => {
1765
- const [g, l] = e, c = u;
1771
+ const [g, c] = e, m = u;
1766
1772
  D.center = sD([
1767
1773
  g,
1768
- l,
1769
- c
1774
+ c,
1775
+ m
1770
1776
  ]), D.radius = D.center.distanceTo(g), h.drawCustomEntity(D);
1771
1777
  }), E.setMessage(`
1772
1778
  \u6307\u5B9A\u5706\u4E0A\u7684\u7B2C\u4E09\u4E2A\u70B9:`)), C === 2)
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;
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;
1774
1780
  C++;
1775
1781
  }
1776
1782
  };
1777
- let r;
1783
+ let i;
1778
1784
  const o = (n, u) => {
1779
1785
  new THREE.Line3(n, u).getCenter(D.center), D.radius = u.distanceTo(n) / 2;
1780
1786
  }, a = (n) => {
1781
1787
  if (B === "2P" && (E.setMessage(`
1782
1788
  \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);
1789
+ if (C === 0 && (i = E.value(), E.setUserDraw((u, h) => {
1790
+ o(i, u), h.drawCustomEntity(D), h.drawLine(i, u);
1785
1791
  }), E.setMessage(`
1786
1792
  \u6307\u5B9A\u5706\u76F4\u5F84\u7684\u7B2C\u4E8C\u4E2A\u7AEF\u70B9:`)), C === 1)
1787
- return o(r, E.value()), i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1793
+ return o(i, E.value()), r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius), !0;
1788
1794
  C++;
1789
1795
  }
1790
- }, p = (n) => {
1796
+ }, l = (n) => {
1791
1797
  if (B === "T") {
1792
1798
  if (E.setMessage(`
1793
1799
  \u6307\u5B9A\u5BF9\u8C61\u4E0E\u5706\u7684\u7B2C\u4E00\u4E2A\u5207\u70B9:`), n === y.kOk) {
@@ -1811,11 +1817,11 @@ function jD() {
1811
1817
  return { exit: !0 };
1812
1818
  if (a(n))
1813
1819
  return { exit: !0 };
1814
- if (p(n))
1820
+ if (l(n))
1815
1821
  return { exit: !0 };
1816
1822
  },
1817
1823
  (n) => {
1818
- n === y.kCancel && i.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1824
+ n === y.kCancel && r.App.GetCurrentMxCAD().DrawCircle(D.center.x, D.center.y, D.radius);
1819
1825
  }
1820
1826
  );
1821
1827
  }
@@ -1855,7 +1861,7 @@ async function ID() {
1855
1861
  }
1856
1862
  },
1857
1863
  (A) => (A === y.kCancel && C.forEach((t) => {
1858
- i.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1864
+ r.App.GetCurrentMxCAD().DrawLine(t.pt1.x, t.pt1.y, 0, t.pt2.x, t.pt2.y, 0);
1859
1865
  }), { exit: !0 })
1860
1866
  );
1861
1867
  }
@@ -1868,11 +1874,11 @@ async function lC() {
1868
1874
  if (!D)
1869
1875
  return;
1870
1876
  let C = new Z(), B = new Y();
1871
- B.textString = "\u6D4B\u8BD5Test", B.height = d.viewCoordLong2Cad(100), C.startPoint = i.NewMcGePoint3d(D), E.setUserDraw((A, t) => {
1872
- C.endPoint = i.NewMcGePoint3d(A), B.position = i.NewMcGePoint3d(A), B.alignmentPoint = B.position, t.drawMcDbEntity(C), t.drawMcDbEntity(B);
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);
1873
1879
  }), E.setMessage(`
1874
1880
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go();
1875
- let F = i.App.GetCurrentMxCAD();
1881
+ let F = r.App.GetCurrentMxCAD();
1876
1882
  F.DrawEntity(B), F.DrawEntity(C);
1877
1883
  }
1878
1884
  }
@@ -1888,8 +1894,8 @@ async function cC() {
1888
1894
  return;
1889
1895
  let e = t.GetCount();
1890
1896
  for (let s = 0; s < e; s++) {
1891
- let r = t.AtObject(s).val;
1892
- r?.ObjectName == "McDbMText" && console.log(r.contents);
1897
+ let i = t.AtObject(s).val;
1898
+ i?.ObjectName == "McDbMText" && console.log(i.contents);
1893
1899
  }
1894
1900
  }
1895
1901
  }
@@ -1936,7 +1942,7 @@ async function GD() {
1936
1942
  },
1937
1943
  (B) => {
1938
1944
  if (B === y.kCancel) {
1939
- let F = i.App.GetCurrentMxCAD();
1945
+ let F = r.App.GetCurrentMxCAD();
1940
1946
  for (let A = 0; A < D.points.length; A++)
1941
1947
  A == 0 ? F.PathMoveTo(D.points[A].x, D.points[A].y) : F.PathLineTo(D.points[A].x, D.points[A].y);
1942
1948
  F.DrawPathToPolyline();
@@ -1956,18 +1962,18 @@ async function WD() {
1956
1962
  let B = 5;
1957
1963
  E.setUserDraw((F, A) => {
1958
1964
  C.radius = D.distanceTo(F);
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);
1965
+ let t = C.getEndParam().val, s = C.getDistAtParam(t).val / B, i = 0, o = new THREE.Vector3(), a = new THREE.Vector3();
1966
+ for (let l = 0; l < B; l++) {
1967
+ let n = C.getPointAtDist(i).val;
1968
+ 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);
1963
1969
  }
1964
1970
  }), E.setMessage(`
1965
1971
  \u6307\u5B9A\u4E8C\u70B9:`), await E.go(), E.drawReserve();
1966
1972
  }
1967
1973
  d.addCommand("Mx_Polygon", WD);
1968
1974
  function pC(E, D, C) {
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);
1975
+ 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;
1976
+ return new THREE.Vector3(g, c, 0);
1971
1977
  }
1972
1978
  function dC(E, D) {
1973
1979
  const C = E.x, B = E.y, F = D.x, A = D.y;
@@ -1981,11 +1987,11 @@ function hC(E, D, C) {
1981
1987
  }
1982
1988
  function CD(E, D, C) {
1983
1989
  const B = E.x, F = D.x, A = E.y, t = D.y;
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), {
1990
+ let e, s, i;
1991
+ 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), {
1986
1992
  sin: e,
1987
1993
  cos: s,
1988
- angle: r
1994
+ angle: i
1989
1995
  };
1990
1996
  }
1991
1997
  const $ = _D.MrxDbgUiPrBaseReturn, f = (E, D, C) => {
@@ -2017,12 +2023,12 @@ class rD extends aD {
2017
2023
  getArcMidPoint(D, C, B, F, A) {
2018
2024
  const t = D, e = B * Math.PI / 180;
2019
2025
  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);
2026
+ const i = new THREE.Vector3(), o = new THREE.Vector3();
2027
+ 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);
2022
2028
  const a = C;
2023
2029
  (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];
2030
+ const l = new THREE.Vector3();
2031
+ 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];
2026
2032
  }
2027
2033
  getGripPoints() {
2028
2034
  return this.getArcMidPoint(
@@ -2043,11 +2049,11 @@ class rD extends aD {
2043
2049
  D[C].add(B);
2044
2050
  const [F, A, t] = D;
2045
2051
  this.center = pC(F, t, A), this.radius = dC(A, this.center);
2046
- const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), r = CD(A, this.center, this.radius);
2052
+ const e = CD(F, this.center, this.radius), s = CD(t, this.center, this.radius), i = CD(A, this.center, this.radius);
2047
2053
  this.clockwise = hC(
2048
2054
  s.angle,
2049
2055
  e.angle,
2050
- r.angle
2056
+ i.angle
2051
2057
  ), this.startAngle = THREE.MathUtils.degToRad(e.angle), this.endAngle = THREE.MathUtils.degToRad(s.angle);
2052
2058
  }
2053
2059
  }
@@ -2062,14 +2068,14 @@ async function UD() {
2062
2068
  E,
2063
2069
  () => {
2064
2070
  C = E.value(), E.setMessage(`
2065
- \u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), E.setUserDraw((l, c) => {
2066
- c.drawLine(C, l);
2071
+ \u6307\u5B9A\u5706\u5F27\u7684\u7B2C\u4E8C\u4E2A\u70B9:`), E.setKeyWords("[\u5706\u5FC3(C)/\u7AEF\u70B9(E)]"), E.setUserDraw((c, m) => {
2072
+ m.drawLine(C, c);
2067
2073
  }), u();
2068
2074
  },
2069
2075
  () => {
2070
2076
  if (E.isKeyWordPicked("C")) {
2071
- const l = new q();
2072
- D.center = E.value(), l.center = E.value(), E.setMessage(`
2077
+ const c = new q();
2078
+ D.center = E.value(), c.center = E.value(), E.setMessage(`
2073
2079
  \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3:`), E.setKeyWords(""), e();
2074
2080
  } else
2075
2081
  return !0;
@@ -2080,29 +2086,29 @@ async function UD() {
2080
2086
  E,
2081
2087
  () => {
2082
2088
  t = E.value(), F = new q(), F.closed = !1, S.use(F), F.center = t, D.center = t, E.setMessage(`
2083
- \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setUserDraw((l, c) => {
2084
- c.drawCustomEntity(F), c.drawLine(t, l);
2089
+ \u6307\u5B9A\u5706\u5F27\u7684\u8D77\u70B9:`), E.setUserDraw((c, m) => {
2090
+ m.drawCustomEntity(F), m.drawLine(t, c);
2085
2091
  }), o();
2086
2092
  },
2087
2093
  () => {
2088
2094
  }
2089
2095
  );
2090
- let s, r;
2096
+ let s, i;
2091
2097
  const o = f(
2092
2098
  E,
2093
2099
  () => {
2094
2100
  s = E.value(), F.endPoint = s, E.setMessage(
2095
2101
  `
2096
2102
  \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)]:`
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();
2103
+ ), 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) => {
2104
+ F.startPoint = c, i.pt2 = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2105
+ }), l();
2100
2106
  },
2101
2107
  () => {
2102
2108
  }
2103
2109
  );
2104
2110
  let a;
2105
- const p = f(
2111
+ const l = f(
2106
2112
  E,
2107
2113
  () => {
2108
2114
  a = E.value(), F.startPoint = a, F.endPoint = s, d.getCurrentDraw().addMxEntity(F);
@@ -2112,22 +2118,22 @@ async function UD() {
2112
2118
  return E.setMessage(
2113
2119
  `
2114
2120
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2115
- ), E.setKeyWords("R"), E.setUserDraw((l, c) => {
2116
- F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(r);
2121
+ ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2122
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2117
2123
  }), !0;
2118
2124
  if (E.isKeyWordPicked("L"))
2119
2125
  return E.setMessage(
2120
2126
  `
2121
2127
  \u6307\u5B9A\u5706\u5F27\u7684\u5939\u89D2(\u6309\u4F4F ctrl \u952E\u53D6\u76F8\u53CD\u65B9\u5411)\u6216 [\u4FEE\u6539\u534A\u5F84(R)]:`
2122
- ), E.setKeyWords("R"), E.setUserDraw((l, c) => {
2123
- F.startPoint = l, c.drawCustomEntity(F), c.drawCustomEntity(r);
2128
+ ), E.setKeyWords("R"), E.setUserDraw((c, m) => {
2129
+ F.startPoint = c, m.drawCustomEntity(F), m.drawCustomEntity(i);
2124
2130
  }), !0;
2125
2131
  if (E.isKeyWordPicked("R"))
2126
2132
  E.setMessage(
2127
2133
  `
2128
2134
  \u6307\u5B9A\u5706\u5F27\u7684\u534A\u5F84${F.radius ? "<" + F.radius + ">" : ""}:`
2129
- ), E.setKeyWords(""), E.setUserDraw((l, c) => {
2130
- c.drawLine(l, F.center), F.startPoint = l, c.drawCustomEntity(F);
2135
+ ), E.setKeyWords(""), E.setUserDraw((c, m) => {
2136
+ m.drawLine(c, F.center), F.startPoint = c, m.drawCustomEntity(F);
2131
2137
  }), o();
2132
2138
  else
2133
2139
  return !0;
@@ -2138,26 +2144,26 @@ async function UD() {
2138
2144
  E,
2139
2145
  () => {
2140
2146
  n = E.value(), E.setMessage(`
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) => {
2142
- B.point2 = l, c.drawCustomEntity(B);
2147
+ \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((c, m) => {
2148
+ B.point2 = c, m.drawCustomEntity(B);
2143
2149
  }), g();
2144
2150
  },
2145
2151
  () => {
2146
2152
  if (E.isKeyWordPicked("C"))
2147
2153
  F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2148
- \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((l, c) => {
2149
- F.startPoint = C, c.drawLine(l, F.startPoint);
2154
+ \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2155
+ F.startPoint = C, m.drawLine(c, F.startPoint);
2150
2156
  }), e();
2151
2157
  else if (E.isKeyWordPicked("E"))
2152
2158
  F = new q(), F.closed = !1, S.use(F), E.setMessage(`
2153
- \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((l, c) => {
2154
- F.startPoint = C, c.drawLine(l, F.startPoint);
2159
+ \u6307\u5B9A\u5706\u5F27\u7684\u5706\u5FC3`), E.setKeyWords(""), E.setUserDraw((c, m) => {
2160
+ F.startPoint = C, m.drawLine(c, F.startPoint);
2155
2161
  }), e();
2156
2162
  else
2157
2163
  return !0;
2158
2164
  }
2159
2165
  );
2160
- let h = i.App.GetCurrentMxCAD();
2166
+ let h = r.App.GetCurrentMxCAD();
2161
2167
  const g = f(
2162
2168
  E,
2163
2169
  () => {
@@ -2185,9 +2191,9 @@ function zD() {
2185
2191
  f(
2186
2192
  E,
2187
2193
  () => {
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);
2194
+ C = E.value(), E.setUserDraw((i, o) => {
2195
+ const a = new THREE.Line3(C, i);
2196
+ 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);
2191
2197
  }), E.setMessage(`
2192
2198
  \u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`), E.setKeyWords(""), A();
2193
2199
  },
@@ -2197,8 +2203,8 @@ function zD() {
2197
2203
  const A = f(
2198
2204
  E,
2199
2205
  () => {
2200
- E.setUserDraw((r, o) => {
2201
- D.yRadius = B.distanceTo(r), o.drawLine(B, r), o.drawCustomEntity(D);
2206
+ E.setUserDraw((i, o) => {
2207
+ D.yRadius = B.distanceTo(i), o.drawLine(B, i), o.drawCustomEntity(D);
2202
2208
  }), E.setMessage(`
2203
2209
  \u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`), E.setKeyWords(""), t();
2204
2210
  },
@@ -2208,8 +2214,8 @@ function zD() {
2208
2214
  E,
2209
2215
  () => {
2210
2216
  E.setMessage(`
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);
2217
+ \u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`), E.setKeyWords(""), E.setUserDraw((i, o) => {
2218
+ D.startAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2213
2219
  }), e();
2214
2220
  },
2215
2221
  () => {
@@ -2217,8 +2223,8 @@ function zD() {
2217
2223
  ), e = f(
2218
2224
  E,
2219
2225
  () => {
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);
2226
+ E.setUserDraw((i, o) => {
2227
+ D.endAngle = DD(i.x, i.y, B.x, B.y) - D.rotation, o.drawLine(B, i), o.drawCustomEntity(D);
2222
2228
  }), E.setMessage(`
2223
2229
  \u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`), E.setKeyWords(""), s();
2224
2230
  },
@@ -2227,8 +2233,8 @@ function zD() {
2227
2233
  ), s = f(
2228
2234
  E,
2229
2235
  () => {
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);
2236
+ let i = new w(D.xRadius, 0, 0);
2237
+ 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);
2232
2238
  },
2233
2239
  () => {
2234
2240
  }
@@ -2242,7 +2248,7 @@ function wC() {
2242
2248
  C.point2 = B, D.drawCustomEntity(C);
2243
2249
  }), E.setUserDraw(D), E.setMessage(`
2244
2250
  \u518D\u6B21\u70B9\u51FB\u7ED3\u675F\u7ED8\u5236\u692D\u5706:`), E.go(() => {
2245
- i.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2251
+ r.App.GetCurrentMxCAD().DrawEllipse(C.center.x, C.center.y, C.xRadius, 0, C.yRadius / C.xRadius);
2246
2252
  });
2247
2253
  });
2248
2254
  }
@@ -2288,8 +2294,8 @@ class z {
2288
2294
  canvas;
2289
2295
  constructor(D) {
2290
2296
  const C = () => {
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);
2297
+ const a = this.canvas.parentElement?.clientWidth || window.innerWidth, l = this.canvas.parentElement?.clientHeight || window.innerHeight;
2298
+ let n = Math.min(a, window.screen.availWidth), u = Math.min(l, window.screen.availHeight);
2293
2299
  n = Math.max(A, n), u = Math.max(t, u), this.canvas.style.width = n + 1 + "px", this.canvas.style.height = u + "px";
2294
2300
  const h = window.devicePixelRatio || 1;
2295
2301
  this.canvas.width = n * h, this.canvas.height = u * h;
@@ -2300,8 +2306,8 @@ class z {
2300
2306
  updateCanvasSize: e = B,
2301
2307
  ...s
2302
2308
  } = D;
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;
2309
+ let i = typeof F == "string" ? document.querySelectorAll(F)[0] : F, o = i.getContext("webgl2", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 });
2310
+ o == null && (o = i.getContext("webgl", { alpha: !1, depth: !0, antialias: !1, preserveDrawingBuffer: !0 })), this.canvas = i, this.ctx = o, s.canvas = this.canvas;
2305
2311
  for (let a in s)
2306
2312
  this[a] = s[a];
2307
2313
  if (this.canvas instanceof HTMLCanvasElement) {
@@ -2311,14 +2317,14 @@ class z {
2311
2317
  console.error("createMxDraw3d canvas \u53C2\u6570\u4E0D\u6B63\u786E \u65E0\u6CD5\u83B7\u53D6\u5230canvas\u5143\u7D20");
2312
2318
  window.onresize = C, C(), gC("mxdraw3d_min", "mxdraw3d", this).then(() => {
2313
2319
  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);
2320
+ const l = new FileReader();
2321
+ l.onload = () => {
2322
+ if (!!l.result && l.result instanceof ArrayBuffer) {
2323
+ var n = new Uint8Array(l.result);
2318
2324
  const u = this._malloc(n.length);
2319
2325
  this.HEAPU8.set(n, u), this.openFromMemory(a.name, u, n.length, !0), this.displayGround(!0), this.canvas.focus();
2320
2326
  }
2321
- }, p.readAsArrayBuffer(a);
2327
+ }, l.readAsArrayBuffer(a);
2322
2328
  };
2323
2329
  });
2324
2330
  }
@@ -2344,7 +2350,7 @@ const TC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2344
2350
  downloadFile: mD,
2345
2351
  downloadFileFromUrl: pD,
2346
2352
  MxTools: N,
2347
- McGePoint3d: m,
2353
+ McGePoint3d: p,
2348
2354
  McGeVector3d: w,
2349
2355
  McGeMatrix3d: W,
2350
2356
  getFilterImp: K,
@@ -2385,7 +2391,7 @@ const TC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2385
2391
  McAppType: LD,
2386
2392
  MxCppType: SD,
2387
2393
  get MxCpp() {
2388
- return i;
2394
+ return r;
2389
2395
  },
2390
2396
  loadMxCADassembly: OD,
2391
2397
  createMxCad: oC,
@@ -2432,13 +2438,13 @@ export {
2432
2438
  eD as McDrawUtility,
2433
2439
  PD as McDrawUtilityClass,
2434
2440
  W as McGeMatrix3d,
2435
- m as McGePoint3d,
2441
+ p as McGePoint3d,
2436
2442
  w as McGeVector3d,
2437
2443
  U as McObject,
2438
2444
  M as McObjectId,
2439
2445
  b as McObjectIdType,
2440
2446
  O as McRxObject,
2441
- i as MxCpp,
2447
+ r as MxCpp,
2442
2448
  SD as MxCppType,
2443
2449
  z as MxDraw3d,
2444
2450
  N as MxTools,