mxdraw 0.1.7 → 0.1.8

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.
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var MxDbEntity_1 = require("../MxDbEntity");
30
30
  var three_1 = require("three");
31
31
  var index_1 = require("../../tools/three/index");
32
- var _ = require("lodash");
33
32
  var MxFun_1 = require("../MxFun");
34
33
  /**
35
34
  * MxRectEntity 矩形对象.
@@ -38,8 +37,6 @@ var MxDbRect = /** @class */ (function (_super) {
38
37
  __extends(MxDbRect, _super);
39
38
  function MxDbRect() {
40
39
  var _this = _super !== null && _super.apply(this, arguments) || this;
41
- // 圆角半径
42
- _this.cornerRadius = [];
43
40
  /**
44
41
  * pt1: 构成矩形的第一个点
45
42
  * */
@@ -56,6 +53,10 @@ var MxDbRect = /** @class */ (function (_super) {
56
53
  * height: 在绘制时自动计算矩形像素高度 单位px
57
54
  * */
58
55
  _this.height = 0;
56
+ /**
57
+ * cornerRadius(优先级大于radius属性): 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
58
+ * */
59
+ _this.cornerRadius = [];
59
60
  /**
60
61
  * transparent 开启透明度
61
62
  * */
@@ -74,6 +75,15 @@ var MxDbRect = /** @class */ (function (_super) {
74
75
  var _this = this;
75
76
  // 根据第一个点和对角点 计算矩形的四个点位
76
77
  var points = (0, index_1.computeRectPoints)(this.pt1, this.pt2);
78
+ // 计算圆角顶点坐标
79
+ if (this.cornerRadius.length <= 0 && this.radius) {
80
+ this.cornerRadius = [
81
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
82
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
83
+ MxFun_1.default.screenCoordLong2Doc(this.radius),
84
+ MxFun_1.default.screenCoordLong2Doc(this.radius)
85
+ ];
86
+ }
77
87
  if (this.cornerRadius.length > 0) {
78
88
  points = (0, index_1.getToGenerateRoundedCorners)(points, this.cornerRadius);
79
89
  }
@@ -96,10 +106,10 @@ var MxDbRect = /** @class */ (function (_super) {
96
106
  // 计算矩形宽高
97
107
  geometry = new three_1.ShapeGeometry(new three_1.Shape(points));
98
108
  geometry.computeBoundingBox();
99
- var size_1 = new three_1.Vector3();
100
- geometry.boundingBox.getSize(size_1);
101
- this.width = MxFun_1.default.docCoord2Screen(size_1.x).x;
102
- this.height = MxFun_1.default.docCoord2Screen(size_1.y).x;
109
+ var size = new three_1.Vector3();
110
+ geometry.boundingBox.getSize(size);
111
+ this.width = MxFun_1.default.docCoord2Screen(size.x).x;
112
+ this.height = MxFun_1.default.docCoord2Screen(size.y).x;
103
113
  // 如果是图片填充
104
114
  if (this.fillImageSrc) {
105
115
  var imgSrc = this.fillImageSrc;
@@ -151,12 +161,6 @@ var MxDbRect = /** @class */ (function (_super) {
151
161
  material = new three_1.LineBasicMaterial(__assign({ color: this.getColor() }, materialParam));
152
162
  line = new three_1.LineLoop(geometry, material);
153
163
  }
154
- // 计算矩形宽高
155
- geometry.computeBoundingBox();
156
- var size = new three_1.Vector3();
157
- geometry.boundingBox.getSize(size);
158
- this.width = MxFun_1.default.docCoord2Screen(size.x).x;
159
- this.height = MxFun_1.default.docCoord2Screen(size.y).x;
160
164
  pWorldDraw.drawEntity(line);
161
165
  };
162
166
  MxDbRect.prototype.getGripPoints = function () {
@@ -186,28 +190,18 @@ var MxDbRect = /** @class */ (function (_super) {
186
190
  this.onDwgIn(obj);
187
191
  this.pt1.copy(obj['pt1']);
188
192
  this.pt2.copy(obj['pt2']);
189
- this.fillColor = obj['fillColor'];
190
- this.fillImageSrc = obj['fillImageSrc'];
191
- this.fillImageSrc = obj['fillImageParam'];
192
193
  this.cornerRadius = obj['cornerRadius'];
194
+ this.radius = obj['radius'];
193
195
  this.filter = obj['filter'];
194
- this.transparent = obj['transparent'];
195
- this.opacity = obj['opacity'];
196
- this.visible = obj['visible'];
197
196
  return true;
198
197
  };
199
198
  MxDbRect.prototype.dwgOut = function (obj) {
200
199
  this.onDwgOut(obj);
201
200
  obj['pt1'] = this.pt1;
202
201
  obj['pt2'] = this.pt2;
203
- obj['fillColor'] = this.fillColor;
204
- obj['fillImageSrc'] = this.fillImageSrc;
205
- obj['fillImageParam'] = this.fillImageParam;
206
202
  obj['cornerRadius'] = this.cornerRadius;
203
+ obj['radius'] = this.radius;
207
204
  obj['filter'] = this.filter;
208
- obj['transparent'] = this.transparent;
209
- obj['opacity'] = this.opacity;
210
- obj['visible'] = this.visible;
211
205
  return obj;
212
206
  };
213
207
  MxDbRect.prototype.create = function () {
@@ -217,32 +211,8 @@ var MxDbRect = /** @class */ (function (_super) {
217
211
  this.pt1.applyMatrix4(mat);
218
212
  this.pt2.applyMatrix4(mat);
219
213
  };
220
- /**
221
- * setRadius 设置圆角 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
222
- * @param { number | number[] } radius 圆角半径 为数组时[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4; 或者直接设置半径值 则四个角统一半径
223
- * */
224
- MxDbRect.prototype.setRadius = function (radius) {
225
- if (_.isArray(radius)) {
226
- this.cornerRadius = radius.map(function (r) {
227
- return MxFun_1.default.screenCoordLong2Doc(r);
228
- });
229
- }
230
- else if (_.isNumber(radius)) {
231
- if (radius > 0) {
232
- this.cornerRadius = [
233
- MxFun_1.default.screenCoordLong2Doc(radius),
234
- MxFun_1.default.screenCoordLong2Doc(radius),
235
- MxFun_1.default.screenCoordLong2Doc(radius),
236
- MxFun_1.default.screenCoordLong2Doc(radius)
237
- ];
238
- }
239
- else {
240
- this.cornerRadius = [];
241
- }
242
- }
243
- };
244
214
  MxDbRect.prototype.getTypeName = function () {
245
- return 'MxDbRect';
215
+ return 'MxRectEntity';
246
216
  };
247
217
  return MxDbRect;
248
218
  }(MxDbEntity_1.default));
@@ -59,6 +59,10 @@ var MxFun = /** @class */ (function () {
59
59
  // canvasParent 未插入到文档
60
60
  document.body.appendChild(canvasParent);
61
61
  }
62
+ if (!useWebsocket && isNewFile) {
63
+ // 只有sockec方式,才能新建文件,这里暂是把isNewFile设置成 false
64
+ isNewFile = false;
65
+ }
62
66
  // 设置样式
63
67
  // canvasParent.style.width = '100%'
64
68
  // canvasParent.style.height = '80vh'
@@ -5299,7 +5299,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5299
5299
  } }, S.prototype.seInValidPoint = function () { this.setPoint(void 0); }, S.prototype.getCurrentOSnapPoint = function (t) { var e = {}; return this.isEnable() ? (e.pt = t, e.osmode = this.m_osmode, this.m_osmode != v.MxJigCmdManager.OsnapMode.kOsModekValid ? (e.pt.x = this.m_ptSnapPoint.x, e.pt.y = this.m_ptSnapPoint.y, e.pt.z = this.m_ptSnapPoint.z, s.isOsnapZValue() || (t.z = 0)) : e.pt = t) : (e.pt = t, e.osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid), e; }, S.prototype.setLongprogressStatus = function (t) { this.m_iLongprogressStatus = t; }, S.prototype.reComputeOffset = function () { }, S);
5300
5300
  function S(t) { this.m_inPoint = new f.Vector3, this.m_vecOffset = new f.Vector3, this.m_pt = new f.Vector3, this.m_isValid = !1, this.m_ptSnapPoint = new f.Vector3, this.m_ptSnapSrcPoint = new f.Vector3, this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid, this.m_prvInputPoint = new f.Vector3, this.m_isValidPrvInputPoint = !1, this.m_lOSmode = 0, this.m_iLongprogressStatus = -1, this.m_isOffsetInputPostion = !1, this.m_mxJig = null, this.m_notifyOsnap_delayCall = void 0, this.m_isRuning = !1, this.m_isEnable = !1, this.m_mxJig = t, this.m_draw = new b; }
5301
5301
  n.McEdJigOsnap = M;
5302
- }, { "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxWindowsEvent": 65, three: 19 }], 21: [function (t, e, n) {
5302
+ }, { "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxWindowsEvent": 66, three: 19 }], 21: [function (t, e, n) {
5303
5303
  "use strict";
5304
5304
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5305
5305
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6121,7 +6121,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6121
6121
  } }
6122
6122
  function d(t) { null != t && null != t.grips && null != t.ents && a.MxFun.getCurrentMx().getMxDatabase().getGripManager().gripEditImp(t); }
6123
6123
  (n.MxDrawCommands || (n.MxDrawCommands = {})).registerCommand = function () { a.MxFun.addCommand("Mx_IntelliSel", r, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_GripEdit", u, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageIntelliSel", h, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageGripEdit", d, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT); };
6124
- }, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 65 }], 40: [function (t, e, n) {
6124
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 66 }], 40: [function (t, e, n) {
6125
6125
  "use strict";
6126
6126
  var i, r, a;
6127
6127
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawData = n.IntelliSelectType = void 0, (r = i = n.IntelliSelectType || (n.IntelliSelectType = {}))[r.kFrontEndWebpageModel = 1] = "kFrontEndWebpageModel", r[r.kBackgroundServicesModel = 2] = "kBackgroundServicesModel", (a = n.MxDrawData || (n.MxDrawData = {})).m_isEnableIntelliSelect = !1, a.m_intelliSelectType = i.kBackgroundServicesModel, a.m_isMultipleSelect = !0, a.getCursorWidthPixels = function () { return 14; }, a.setIniset = function (t) { void 0 !== t.EnableIntelliSelect && "boolean" == typeof t.EnableIntelliSelect && (a.m_isEnableIntelliSelect = t.EnableIntelliSelect), void 0 !== t.IntelliSelectType && "number" == typeof t.IntelliSelectType && (a.m_intelliSelectType = t.IntelliSelectType), void 0 !== t.multipleSelect && "boolean" == typeof t.multipleSelect && (a.m_isMultipleSelect = t.multipleSelect); };
@@ -6489,32 +6489,32 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6489
6489
  }, { "./MxDrawData": 40, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 45: [function (t, e, n) {
6490
6490
  "use strict";
6491
6491
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxFun = void 0;
6492
- var p, i, r, a, o, s, l, c, u, h, f, d, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), w = t("./MxDrawObject3d"), b = t("./MxUiObjectMobile"), _ = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), O = t("./MxDrawCommands"), L = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig");
6493
- function k(t) { t.cmd && z(t.cmd); }
6494
- function N(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
6495
- function B() { return y.MxManager.currentMx(); }
6492
+ var p, i, r, a, o, s, l, c, u, h, f, d, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), w = t("./MxDrawObject3d"), b = t("./MxUiObjectMobile"), _ = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), O = t("./MxDrawCommands"), L = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig"), k = t("./MxVersion");
6493
+ function N(t) { t.cmd && j(t.cmd); }
6494
+ function B(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
6496
6495
  function F() { return y.MxManager.currentMx(); }
6497
- function z(t, e) { var n = F(); if (n)
6496
+ function z() { return y.MxManager.currentMx(); }
6497
+ function j(t, e) { var n = z(); if (n)
6498
6498
  return C.MxCmdRunManager.runCmd(n, t, e); }
6499
- function j(t) { null != t && (t.init(), T.MxUiVue.init(t)), f || (f = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), O.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = k); }
6500
- p = n.MxFun || (n.MxFun = {}), i = ".", l = o = a = -1, h = null, f = !(u = "ws://localhost:5090"), m = {}, g = d = c = s = r = void 0, p.getUiObj = function () { return h; }, p.getNodeJs = function () { return g; }, p.setMxServer = function (t) { u = t; }, p.getMxServer = function () { return u; }, p.isPC = function () { return !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); }, p.getClientPlatform = function () { return navigator.platform; }, p.getClientInfo = function () { return { width: document.body.clientWidth, height: document.body.clientHeight }; }, p.curPath = function () { return i; }, p.setCurPath = function (t) { i = t; }, p.getQueryString = N, p.getLocationPageUrl = function () { var t = window.location.href, e = t.lastIndexOf("?"); return -1 == e ? t : t.substring(0, e); }, p.getUrlParams = function () { var t = window.location.search, e = t.substr(1, t.length).split("&"), n = new Array; if (null != e)
6499
+ function V(t) { null != t && (t.init(), T.MxUiVue.init(t)), f || (console.log("MxDraw Version:" + k.MxBulid.getVersion()), f = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), O.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = N); }
6500
+ p = n.MxFun || (n.MxFun = {}), i = ".", l = o = a = -1, h = null, f = !(u = "ws://localhost:5090"), m = {}, g = d = c = s = r = void 0, p.getUiObj = function () { return h; }, p.getNodeJs = function () { return g; }, p.setMxServer = function (t) { u = t; }, p.getMxServer = function () { return u; }, p.isPC = function () { return !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); }, p.getClientPlatform = function () { return navigator.platform; }, p.getClientInfo = function () { return { width: document.body.clientWidth, height: document.body.clientHeight }; }, p.curPath = function () { return i; }, p.setCurPath = function (t) { i = t; }, p.getQueryString = B, p.getLocationPageUrl = function () { var t = window.location.href, e = t.lastIndexOf("?"); return -1 == e ? t : t.substring(0, e); }, p.getUrlParams = function () { var t = window.location.search, e = t.substr(1, t.length).split("&"), n = new Array; if (null != e)
6501
6501
  for (var i = 0; i < e.length; i++) {
6502
6502
  var r = e[i].replace(/[=|^==]/, "&").split("&");
6503
6503
  if (1 < r.length) {
6504
6504
  var a = new Array;
6505
6505
  a.push(decodeURIComponent(r[0])), a.push(decodeURIComponent(r[1])), n.push(a);
6506
6506
  }
6507
- } return n; }, p.call = function (t, e, n) { null == e ? e = "{}" : "string" == typeof e ? 0 == e.length ? e = "{}" : "[" == e[0] && "]" == e[e.length - 1] || "{" == e[0] && "}" == e[e.length - 1] || (e = '"' + (e = e.replace(/"/g, "'")) + '"') : e = "object" == typeof e ? JSON.stringify(e) : "{}", y.MxManager.currentMx().call(t, e, n); }, p.loadCodeToServer = function (t, e) { y.MxManager.currentMx().loadCodeToServer(t, e); }, p.getCurrentMx = B, p.getCurrentMxCAD = function () { var t = B(); return t ? t.getMxCAD() : null; }, p.openFile = function (t) { return y.MxManager.currentMx().openFile(t); }, p.loadCodeFileToServer = function (t, e, n) { y.MxManager.currentMx().loadCodeFileToServer(t, e, n); }, p.isEnableSelect = function () { if (-1 != a)
6508
- return 1 == a; var t = N("select"); return a = 0, null != t && "y" == t.toLowerCase() && (a = 1), 1 == a; }, p.is3DDwg = function () { if (-1 != l)
6509
- return 1 == l; var t = N("3ddwg"); return l = 0, null != t && "y" == t.toLowerCase() && (l = 1), 1 == l; }, p.isStaticLoad = function () { if (-1 != o)
6510
- return 1 == o; var t = N("static"); return o = 0, null != t && "y" == t.toLowerCase() && (o = 1), 1 == o; }, p.enableSelect = function (t) { a = t ? 1 : 0; }, p.enablStaticLoad = function (t) { o = null == t || t ? 1 : 0; }, p.dwgDir = function () { return null != s || null == (s = N("dwgdir")) && (s = ""), s; }, p.setDwgDir = function (t) { s = t; }, p.getStaticServer = function () { return null != c || null == (c = N("staticServer")) && (c = ""), c; }, p.setStaticServer = function (t) { c = t; }, p.is2dParam = function () { if (null != r)
6511
- return r; var t = N("file"); if (r = !1, null != t) {
6507
+ } return n; }, p.call = function (t, e, n) { null == e ? e = "{}" : "string" == typeof e ? 0 == e.length ? e = "{}" : "[" == e[0] && "]" == e[e.length - 1] || "{" == e[0] && "}" == e[e.length - 1] || (e = '"' + (e = e.replace(/"/g, "'")) + '"') : e = "object" == typeof e ? JSON.stringify(e) : "{}", y.MxManager.currentMx().call(t, e, n); }, p.loadCodeToServer = function (t, e) { y.MxManager.currentMx().loadCodeToServer(t, e); }, p.getCurrentMx = F, p.getCurrentMxCAD = function () { var t = F(); return t ? t.getMxCAD() : null; }, p.openFile = function (t) { return y.MxManager.currentMx().openFile(t); }, p.loadCodeFileToServer = function (t, e, n) { y.MxManager.currentMx().loadCodeFileToServer(t, e, n); }, p.isEnableSelect = function () { if (-1 != a)
6508
+ return 1 == a; var t = B("select"); return a = 0, null != t && "y" == t.toLowerCase() && (a = 1), 1 == a; }, p.is3DDwg = function () { if (-1 != l)
6509
+ return 1 == l; var t = B("3ddwg"); return l = 0, null != t && "y" == t.toLowerCase() && (l = 1), 1 == l; }, p.isStaticLoad = function () { if (-1 != o)
6510
+ return 1 == o; var t = B("static"); return o = 0, null != t && "y" == t.toLowerCase() && (o = 1), 1 == o; }, p.enableSelect = function (t) { a = t ? 1 : 0; }, p.enablStaticLoad = function (t) { o = null == t || t ? 1 : 0; }, p.dwgDir = function () { return null != s || null == (s = B("dwgdir")) && (s = ""), s; }, p.setDwgDir = function (t) { s = t; }, p.getStaticServer = function () { return null != c || null == (c = B("staticServer")) && (c = ""), c; }, p.setStaticServer = function (t) { c = t; }, p.is2dParam = function () { if (null != r)
6511
+ return r; var t = B("file"); if (r = !1, null != t) {
6512
6512
  var e = t.substring(t.lastIndexOf(".") + 1);
6513
6513
  "dwg" != e.toLowerCase() && "dxf" != e.toLowerCase() && "dwf" != e.toLowerCase() && "mwg" != e.toLowerCase() || (r = !0);
6514
6514
  } return r; }, p.set2dParam = function (t) { r = t; }, p.showLayer = function (t, e, n) { var i = y.MxManager.currentMx().getMxCAD(); if (!i)
6515
- return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); }, p.upDisplayForLayerData = function (t) { var e = y.MxManager.currentMx().getMxCAD(); return !!e && e.getDatabase().getLayerTable().upDisplayForLayerData(e.getDatabase(), t); }, p.screenCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2World(t, e, n); }, p.worldCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Screen(t, e, n); }, p.docCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2World(t, e, n); }, p.worldCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Doc(t, e, n); }, p.screenCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2Doc(t, e, n); }, p.docCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2Screen(t, e, n); }, p.zoomCenter = function (t, e) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomCenter(t, e), y.MxManager.currentMx().updateDisplay()); }, p.zoomW = function (t, e, n, i, r) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomW(new v.Vector3(t, e, 0), new v.Vector3(n, i, 0), r), y.MxManager.currentMx().updateDisplay()); }, p.zoomScale = function (t) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomScale(t), y.MxManager.currentMx().updateDisplay()); }, p.zoomAll = function () { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomAll(), y.MxManager.currentMx().updateDisplay()); }, p.deleteAll = function () { return y.MxManager.currentMx().deleteAll(); }, p.callCommand = function (t, e, n) { y.MxManager.currentMx().callCommand(t, e, n); }, p.getCurrentColor = function () { return y.MxManager.currentMx().getCurrentColor(); }, p.setCurrentColor = function (t) { y.MxManager.currentMx().setCurrentColor(t); }, p.undo = function () { y.MxManager.currentMx().undo(); }, p.save = function () { y.MxManager.currentMx().save(); }, p.showLoading = function () { null != h && h.ShowLoading(); }, p.hideLoading = function () { null != h && h.HideLoading(); }, p.showProp = function (t) { null != h && h.ShowObjectProperty(t); }, p.hideProp = function () { null != h && h.HideObjectProp(); }, p.getUiObject = function () { return h; }, p.getViewCenterDocCoord = function () { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().getViewCenterDocCoord() : new v.Vector3(0, 0, 0); }, p.screenCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2Doc(t) : t; }, p.docCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2Screen(t) : t; }, p.worldCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Doc(t) : t; }, p.docCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2World(t) : t; }, p.screenCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2World(t) : t; }, p.worldCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Screen(t) : t; }, p.addSelectEvent = function (t) { y.MxManager.addSelectEvent(t); }, p.clearSelectEvent = function () { y.MxManager.clearSelectEvent(); }, p.removeThreejsObject = function (t, e, n) { t && (t.traverse(function (t) { (t instanceof v.Mesh || t instanceof v.Line || t instanceof v.LineLoop) && (t.geometry.dispose(), n && (t.material instanceof Array ? t.material.forEach(function (t) { t.dispose(); }) : t.material.dispose())); }), e.remove(t)); }, p.setOutServerDebugCall = function (t) { y.MxManager.setOutDebugCall(t); }, p.updateDisplay = function () { y.MxManager.updateDisplay(); }, p.getCurrentDraw = F, p.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6515
+ return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); }, p.upDisplayForLayerData = function (t) { var e = y.MxManager.currentMx().getMxCAD(); return !!e && e.getDatabase().getLayerTable().upDisplayForLayerData(e.getDatabase(), t); }, p.screenCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2World(t, e, n); }, p.worldCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Screen(t, e, n); }, p.docCoord2World = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2World(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2World(t, e, n); }, p.worldCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().worldCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().worldCoord2Doc(t, e, n); }, p.screenCoord2Doc = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().screenCoord2Doc(t.x, t.y, t.z) : y.MxManager.currentMx().screenCoord2Doc(t, e, n); }, p.docCoord2Screen = function (t, e, n) { return t instanceof Object ? y.MxManager.currentMx().docCoord2Screen(t.x, t.y, t.z) : y.MxManager.currentMx().docCoord2Screen(t, e, n); }, p.zoomCenter = function (t, e) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomCenter(t, e), y.MxManager.currentMx().updateDisplay()); }, p.zoomW = function (t, e, n, i, r) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomW(new v.Vector3(t, e, 0), new v.Vector3(n, i, 0), r), y.MxManager.currentMx().updateDisplay()); }, p.zoomScale = function (t) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomScale(t), y.MxManager.currentMx().updateDisplay()); }, p.zoomAll = function () { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomAll(), y.MxManager.currentMx().updateDisplay()); }, p.deleteAll = function () { return y.MxManager.currentMx().deleteAll(); }, p.callCommand = function (t, e, n) { y.MxManager.currentMx().callCommand(t, e, n); }, p.getCurrentColor = function () { return y.MxManager.currentMx().getCurrentColor(); }, p.setCurrentColor = function (t) { y.MxManager.currentMx().setCurrentColor(t); }, p.undo = function () { y.MxManager.currentMx().undo(); }, p.save = function () { y.MxManager.currentMx().save(); }, p.showLoading = function () { null != h && h.ShowLoading(); }, p.hideLoading = function () { null != h && h.HideLoading(); }, p.showProp = function (t) { null != h && h.ShowObjectProperty(t); }, p.hideProp = function () { null != h && h.HideObjectProp(); }, p.getUiObject = function () { return h; }, p.getViewCenterDocCoord = function () { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().getViewCenterDocCoord() : new v.Vector3(0, 0, 0); }, p.screenCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2Doc(t) : t; }, p.docCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2Screen(t) : t; }, p.worldCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Doc(t) : t; }, p.docCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2World(t) : t; }, p.screenCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2World(t) : t; }, p.worldCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Screen(t) : t; }, p.addSelectEvent = function (t) { y.MxManager.addSelectEvent(t); }, p.clearSelectEvent = function () { y.MxManager.clearSelectEvent(); }, p.removeThreejsObject = function (t, e, n) { t && (t.traverse(function (t) { (t instanceof v.Mesh || t instanceof v.Line || t instanceof v.LineLoop) && (t.geometry.dispose(), n && (t.material instanceof Array ? t.material.forEach(function (t) { t.dispose(); }) : t.material.dispose())); }), e.remove(t)); }, p.setOutServerDebugCall = function (t) { y.MxManager.setOutDebugCall(t); }, p.updateDisplay = function () { y.MxManager.updateDisplay(); }, p.getCurrentDraw = z, p.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6516
6516
  e[n - 1] = arguments[n]; for (var i = 0; i < e.length; i++)
6517
- t = t.replace("{".concat(i, "}"), e[i]); return t; }, p.createMxUiObject = function (t) { var e; return e = this.isPC() ? new _.MxUiObjectPC : new b.MxUiObjectMobile, t(h = e), e.create(), e; }, p.createMxObject = function (t, e, n, i, r, a) { f || j(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = p.getQueryString("file")); var o = null != i && i; if (null != e) {
6517
+ t = t.replace("{".concat(i, "}"), e[i]); return t; }, p.createMxUiObject = function (t) { var e; return e = this.isPC() ? new _.MxUiObjectPC : new b.MxUiObjectMobile, t(h = e), e.create(), e; }, p.createMxObject = function (t, e, n, i, r, a) { f || V(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = p.getQueryString("file")); var o = null != i && i; if (null != e) {
6518
6518
  0 == e.length && (e = "empty");
6519
6519
  var s = e.substring(e.lastIndexOf(".") + 1).toLowerCase();
6520
6520
  if ("dwg" != s && "dxf" != s && "dwf" != s && "mwg" != s && "wgh" != s || (o = !0), 1 != a && null != a && "wgh" != s) {
@@ -6526,7 +6526,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6526
6526
  }
6527
6527
  }
6528
6528
  else
6529
- e = "empty"; 1 == r && (e = ""); var d = null; return o ? (d = new x.MxDrawObject2d).setViewColor(0) : (d = new w.MxDrawObject3d).setViewColor(15790320), null != n && n(d), d.create(t, e), d; }, p.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, p.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, p.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, p.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, p.getTHREE = function () { return v; }, p.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, p.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, p.sendStringToExecute = z, p.initUiDataObject = function (t) { t.init(p), T.MxUiVue.init(t); }, p.init = j, p.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, p.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, p.getMxThreeJS = function () { return E.MxThreeJS; }, p.getMxTools = function () { return D.MxTools; }, p.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, p.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, p.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, p.Assert = function (t) { t || console.log("MxAssert error"); }, p.setIniset = function (t) { L.MxDrawData.setIniset(t); }, p.setPostMessageToParentFrameFunction = function (t) { d = t; }, p.postMessageToParentFrame = function (t) { return null != d && (d(t), !0); }, p.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, p.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6529
+ e = "empty"; 1 == r && (e = ""); var d = null; return o ? (d = new x.MxDrawObject2d).setViewColor(0) : (d = new w.MxDrawObject3d).setViewColor(15790320), null != n && n(d), d.create(t, e), d; }, p.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, p.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, p.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, p.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, p.getTHREE = function () { return v; }, p.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, p.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, p.sendStringToExecute = j, p.initUiDataObject = function (t) { t.init(p), T.MxUiVue.init(t); }, p.init = V, p.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, p.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, p.getMxThreeJS = function () { return E.MxThreeJS; }, p.getMxTools = function () { return D.MxTools; }, p.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, p.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, p.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, p.Assert = function (t) { t || console.log("MxAssert error"); }, p.setIniset = function (t) { L.MxDrawData.setIniset(t); }, p.setPostMessageToParentFrameFunction = function (t) { d = t; }, p.postMessageToParentFrame = function (t) { return null != d && (d(t), !0); }, p.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, p.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6530
6530
  e[n - 1] = arguments[n]; if (!T.MxUiVue.isNull()) {
6531
6531
  for (var i = arguments, r = i[0], a = 0; a < i.length - 1; a++) {
6532
6532
  var o = new RegExp("\\{" + a + "\\}", "gm");
@@ -6534,7 +6534,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6534
6534
  }
6535
6535
  T.MxUiVue.AcutPrintfNoFormat(r, !0);
6536
6536
  } }, p.loadImageMaterial = function (t, e) { y.MxManager.getMxDbTextureManager().loadImage(t, e); }, p.pointInPolyline = function (t, e) { return D.MxTools.pointInPolyline(t, e); }, p.calcArea = function (t) { return D.MxTools.calcArea(t); }, p.initMxDbEntityType = function (t) { y.MxManager.getMxDbEntityClassHierarchy().init(t); };
6537
- }, { "./MxCADEditDisplay": 26, "./MxCmdRunManager": 33, "./MxDrawCommands": 39, "./MxDrawData": 40, "./MxDrawObject2d": 42, "./MxDrawObject3d": 43, "./MxJigCmdManager": 48, "./MxJigGetLine": 49, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxThreeJS": 58, "./MxTools": 59, "./MxUiObjectMobile": 62, "./MxUiObjectPC": 63, "./MxUiVue": 64, "./MxWindowsEvent": 65, "./TempTest/MxTestJig": 67, three: 19 }], 46: [function (t, e, n) {
6537
+ }, { "./MxCADEditDisplay": 26, "./MxCmdRunManager": 33, "./MxDrawCommands": 39, "./MxDrawData": 40, "./MxDrawObject2d": 42, "./MxDrawObject3d": 43, "./MxJigCmdManager": 48, "./MxJigGetLine": 49, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxThreeJS": 58, "./MxTools": 59, "./MxUiObjectMobile": 62, "./MxUiObjectPC": 63, "./MxUiVue": 64, "./MxVersion": 65, "./MxWindowsEvent": 66, "./TempTest/MxTestJig": 68, three: 19 }], 46: [function (t, e, n) {
6538
6538
  "use strict";
6539
6539
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6540
6540
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6602,7 +6602,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6602
6602
  } this._mxObject.updateDisplay(); }, d.prototype.getCurrentMouseButton = function () { return a.MxJigCmdManager.getCurrentMouseButton(); }, d.prototype.userInputControls = function () { return this._userInputContros; }, d.prototype.setUserInputControls = function (t) { this._userInputContros = t; }, d);
6603
6603
  function d() { this._isExit = !1, this._aryDynDrawObjectNamesId = void 0, this._DynNameId = 1, this._iColor = 16777215, this._isCancle = !1, this.m_isDisableDynInput = !1, this.m_isDisableOsnap = !1, this.m_dynInput = new c(this), this.m_osnap = new r.McEdJigOsnap(this), this._userInputContros = a.MxJigCmdManager.UserInputControls.kNullResponseAccepted, this.m_isOffsetInputPostion = !1, this.m_isReserveDrawStatus = !1, this.m_callReserveDrawAddEntity = null, this._mxObject = null; }
6604
6604
  n.McEdJigCommand = h;
6605
- }, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 48: [function (t, e, n) {
6605
+ }, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 66, three: 19 }], 48: [function (t, e, n) {
6606
6606
  "use strict";
6607
6607
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxJigCmdManager = n.AcquireReturn = void 0;
6608
6608
  var i, X = t("three"), Y = t("./MxFun"), Z = t("./MxJig"), $ = t("./MxManager"), K = t("./MrxDbgUiPrPoint"), Q = t("./MrxDbgUiPrBase"), tt = t("./MxUiVue"), et = t("./MxTools"), nt = t("./MxString"), it = t("./MxWindowsEvent"), rt = t("./MxDrawObject"), at = t("./McEdJigOsnap"), ot = t("./MxDrawData"), st = function () { this.status = i.DragStatus.kNoChange, this.exit = !0, this.sKeyValue = ""; };
@@ -6696,7 +6696,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6696
6696
  t.setMxObject(e), C = it.MxWindowsEvent.getCurrentMousePostion(), E && E(), null == w ? (V(), w = t, S = u.kInvalid, w.onStartCommand(), G(e)) : (b = t, T = !0, w.notifyCancleExit(), T = !1);
6697
6697
  } }, r.GetAcqurePointFromStringTo = H, r.ProcCommandRetResult = J, r.GetCommandLineContent = q, r.acquirePoint = function (t) { var e = new st; if (null == w)
6698
6698
  return e.status = l.kCancel, e; var n = q(f.COMMAND_GET_COORD | f.COMMAND_GET_KEY); return n.iRet == d.COMMAND_IN_EMTPY ? (e.status = l.kNull, e.exit = !0) : n.iRet == d.COMMAND_IN_KEY ? (e.status = n.iKey, e.exit = !0, e.sKeyValue = n.sValue) : n.iRet == d.COMMAND_IN_COORD ? (e.status = l.kNormal, e.pt = new X.Vector3(n.pt.x, n.pt.y, n.pt.z), e.exit = !0) : (J(n.iRet, "\n 需要点或选项关键字。 \n"), M == a.kMove ? (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kEnd ? t & o.kGetEnd ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kCancle ? (e.status = l.kCancel, e.pt = x, e.exit = !0) : M == a.kBegan ? t & o.kGetBegan ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kMouseDown ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNoChange, e.pt = void 0, e.exit = !1)), e; }, r.getMcEdJigCommandClass = function () { return Z.McEdJigCommand; }, r.getMrxDbgUiPrPointClass = function () { return K.MrxDbgUiPrPoint; }, r.getMcEdGetPointWorldDrawClass = function () { return Q.McEdGetPointWorldDraw; }, r.McEdGetPointWorldDrawObjectClass = function () { return Q.McEdGetPointWorldDrawObject; }, r.init = function () { this._curCmd = void 0; }; }(i = n.MxJigCmdManager || (n.MxJigCmdManager = {}));
6699
- }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 22, "./MrxDbgUiPrPoint": 23, "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJig": 47, "./MxManager": 51, "./MxString": 56, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 49: [function (t, e, n) {
6699
+ }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 22, "./MrxDbgUiPrPoint": 23, "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJig": 47, "./MxManager": 51, "./MxString": 56, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 66, three: 19 }], 49: [function (t, e, n) {
6700
6700
  "use strict";
6701
6701
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6702
6702
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -7121,6 +7121,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7121
7121
  } }, i.DynamicInput_upDisplay = function () { null != d && i.OnMxEvent({ name: "dynInputUpDisplay" }); }, i.DynamicInput_setType = function (t) { null != d && d.getDynamicInput().setType(t); }, i.DynamicInput_getType = function () { return null == d ? o.MxJigCmdManager.DynamicInputType.kNoInput : d.getDynamicInput().getType(); }, i.DynamicInput_setPos = function (t) { null != d && d.getDynamicInput().setPos([t.x, t.y]); }, i.DynamicInput_setTip = function (t) { null != d && d.getDynamicInput().setTip(t); }, i.DynamicInput_setValue1 = function (t) { null != d && d.getDynamicInput().setValue1(t); }, i.DynamicInput_getValue1 = function () { return null == d ? "" : d.getDynamicInput().getValue1(); }, i.DynamicInput_setValue1Pos = function (t) { null != d && d.getDynamicInput().setValue1Pos([t.x, t.y]); }, i.DynamicInput_setValue2 = function (t) { null != d && d.getDynamicInput().setValue2(t); }, i.DynamicInput_getValue2 = function () { return null == d ? "" : d.getDynamicInput().getValue2(); }, i.DynamicInput_getFocusValue = function () { return null == d ? "" : d.getDynamicInput().getFocusValue(); }, i.DynamicInput_setValue2Pos = function (t) { null != d && d.getDynamicInput().setValue2Pos([t.x, t.y]); }, i.DynamicInput_setShow = function (t) { null != d && d.getDynamicInput().setShow(t); }, i.DynamicInput_isShow = function () { return null != d && d.getDynamicInput().isShow(); }, i.OnMxEvent = function (t) { if (null == d)
7122
7122
  return !1; d.OnMxEvent(t); };
7123
7123
  }, { "./MxCmdRunManager": 33, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59 }], 65: [function (t, e, n) {
7124
+ "use strict";
7125
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxBulid = void 0, window.MxDrawVersion = "1.0(2022-04-22 21:39)", (n.MxBulid || (n.MxBulid = {})).getVersion = function () { return window.MxDrawVersion ? window.MxDrawVersion : "inalid version"; };
7126
+ }, {}], 66: [function (t, e, n) {
7124
7127
  "use strict";
7125
7128
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxWindowsEvent = void 0;
7126
7129
  var i, r, s, a, l = t("./MxFun"), c = t("./MxManager"), u = t("./MxJigCmdManager"), h = t("three"), o = t("./MxUiVue"), d = t("./MxDrawData");
@@ -7177,7 +7180,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7177
7180
  else
7178
7181
  u.MxJigCmdManager.isRunning() && u.MxJigCmdManager.stopCmd(); }
7179
7182
  i = n.MxWindowsEvent || (n.MxWindowsEvent = {}), r = !1, s = new h.Vector2(0, 0), a = new Array, i.addEvent = function (t) { a.push(t); }, i.getCurrentMousePostion = function () { return s; }, i.registEvent = function () { r || (r = !0, l.MxFun.isPC() && (document.addEventListener("mousemove", f, !1), document.addEventListener("mouseup", m, !1), document.addEventListener("mousedown", g, !1), document.onkeydown = v)); };
7180
- }, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 66: [function (e, t, n) {
7183
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 67: [function (e, t, n) {
7181
7184
  "use strict";
7182
7185
  Object.defineProperty(n, "__esModule", { value: !0 });
7183
7186
  var i = e("./MxFun");
@@ -7187,7 +7190,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7187
7190
  var t = i.MxFun.getUiObject();
7188
7191
  null != t && t.writeUICSS();
7189
7192
  } "undefined" == typeof MxDocumentReady ? $(document).ready(function () { r.CreateMx(); }) : MxDocumentReady(e, r.CreateMx); }, r).Main();
7190
- }, { "./MxFun": 45 }], 67: [function (t, e, n) {
7193
+ }, { "./MxFun": 45 }], 68: [function (t, e, n) {
7191
7194
  "use strict";
7192
7195
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
7193
7196
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -7222,5 +7225,5 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
7222
7225
  }
7223
7226
  return 0;
7224
7227
  } }); };
7225
- }, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [66]); }
7228
+ }, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [67]); }
7226
7229
  exports.default = mxfun;
@@ -77,7 +77,7 @@ function dynamicImportResize() {
77
77
  case 1: return [2 /*return*/, _a.sent()];
78
78
  case 2:
79
79
  e_1 = _a.sent();
80
- console.log("require动态导入:" + 'element-resize-event-polyfill' + '失败!' + '正在尝试使用import');
80
+ console.log('require动态导入:' + 'element-resize-event-polyfill' + '失败!' + '正在尝试使用import');
81
81
  _a.label = 3;
82
82
  case 3:
83
83
  _a.trys.push([3, 5, , 6]);
@@ -93,7 +93,7 @@ function dynamicImportResize() {
93
93
  return [3 /*break*/, 6];
94
94
  case 5:
95
95
  e_2 = _a.sent();
96
- console.log("import动态导入:" + 'element-resize-event-polyfill' + '失败!', e_2);
96
+ console.log('import动态导入:' + 'element-resize-event-polyfill' + '失败!', e_2);
97
97
  return [3 /*break*/, 6];
98
98
  case 6: return [3 /*break*/, 7];
99
99
  case 7: return [2 /*return*/];
@@ -112,11 +112,11 @@ function dynamicImportJquery() {
112
112
  _a.trys.push([0, 2, , 7]);
113
113
  return [4 /*yield*/, require('jquery')];
114
114
  case 1:
115
- // @ts-ignore
115
+ // @ts-ignore
116
116
  return [2 /*return*/, _a.sent()];
117
117
  case 2:
118
118
  e_3 = _a.sent();
119
- console.log("require动态导入:" + 'jquery' + '失败!' + '正在尝试使用import');
119
+ console.log('require动态导入:' + 'jquery' + '失败!' + '正在尝试使用import');
120
120
  _a.label = 3;
121
121
  case 3:
122
122
  _a.trys.push([3, 5, , 6]);
@@ -132,7 +132,7 @@ function dynamicImportJquery() {
132
132
  return [3 /*break*/, 6];
133
133
  case 5:
134
134
  e_4 = _a.sent();
135
- console.log("import动态导入:" + 'jquery' + '失败!', e_4);
135
+ console.log('import动态导入:' + 'jquery' + '失败!', e_4);
136
136
  return [3 /*break*/, 6];
137
137
  case 6: return [3 /*break*/, 7];
138
138
  case 7: return [2 /*return*/];
@@ -57,9 +57,6 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
57
57
  if (isClose === void 0) { isClose = true; }
58
58
  if (cornerRadius.length > 0) {
59
59
  var curve = new three_1.CurvePath();
60
- if (!isClose) {
61
- points.push(points[0]);
62
- }
63
60
  for (var i = 0; i < points.length - 1; i++) {
64
61
  //作为拐弯的弧度
65
62
  var R = cornerRadius[i] || 0;
@@ -68,17 +65,16 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
68
65
  dir.normalize();
69
66
  var p2_1 = points[1].clone();
70
67
  p2_1.add(dir.clone().multiplyScalar(R));
71
- var line = new three_1.LineCurve3(points[0], p2_1);
72
- curve.curves.push(line);
68
+ var line_1 = new three_1.LineCurve3(points[0], p2_1);
69
+ curve.curves.push(line_1);
73
70
  continue;
74
71
  }
75
72
  // 计算三个点构成的两条线的方向
76
- var dir1 = !isClose || points[i - 1]
73
+ var dir1 = !isClose && points[i - 1]
77
74
  ? points[i - 1].clone().sub(points[i])
78
75
  : points[points.length - 1].clone().sub(points[0]);
79
76
  dir1.normalize();
80
- /* istanbul ignore next */
81
- var dir2 = !isClose || points[i + 1]
77
+ var dir2 = !isClose && points[i + 1]
82
78
  ? points[i + 1].clone().sub(points[i])
83
79
  : points[1].clone().sub(points[0]);
84
80
  dir2.normalize();
@@ -88,26 +84,24 @@ function getToGenerateRoundedCorners(points, cornerRadius, isClose) {
88
84
  var p2 = points[i].clone();
89
85
  var p3 = points[i].clone().add(dir2.clone().multiplyScalar(R));
90
86
  var beziercurve = new three_1.QuadraticBezierCurve3(p1, p2, p3);
91
- if (i === points.length - 2) {
92
- var line1 = points[i].clone();
93
- line1.add(dir2.clone().multiplyScalar(R));
94
- var line2 = points[i + 1].clone();
95
- isClose ? line2.add(dir2.clone().multiplyScalar(-R)) : line2.add(dir2.clone());
96
- var line = new three_1.LineCurve3(line1, line2);
97
- curve.curves.push(beziercurve, line);
98
- }
99
- else {
100
- // 把转换曲线和直线插入曲线中
101
- curve.curves.push(beziercurve);
87
+ var line1 = points[i].clone();
88
+ line1.add(dir2.clone().multiplyScalar(R));
89
+ var line2 = points[i + 1].clone();
90
+ if (i < points.length - (isClose ? 1 : 2)) {
91
+ //最后一段不用减掉半径尺寸
92
+ line2.add(dir2.clone().multiplyScalar(-R));
102
93
  }
94
+ var line = new three_1.LineCurve3(line1, line2);
95
+ // 把转换曲线和直线插入曲线中
96
+ curve.curves.push(beziercurve, line);
103
97
  if (i === 0) {
104
98
  points.push(points[0]);
105
99
  }
106
100
  }
107
- return curve.getPoints(50);
101
+ return curve.getPoints(5);
108
102
  }
109
103
  else {
110
- return points;
104
+ return [];
111
105
  }
112
106
  }
113
107
  exports.getToGenerateRoundedCorners = getToGenerateRoundedCorners;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- ;