mxdraw 0.1.2 → 0.1.5
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/lib/MxModule/McGeVector3d/McGeVector3d.js +2 -0
- package/dist/lib/MxModule/McGeVector3d/index.js +3 -0
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +213 -0
- package/dist/lib/MxModule/MxDbAlignedDimension/index.js +5 -0
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +45 -19
- package/dist/lib/MxModule/MxDbImage/MxDbImage.js +147 -0
- package/dist/lib/MxModule/MxDbImage/index.js +5 -0
- package/dist/lib/MxModule/MxDbLine/MxDbLine.js +94 -0
- package/dist/lib/MxModule/MxDbLine/index.js +5 -0
- package/dist/lib/MxModule/MxDbRect/MxDbRect.js +219 -0
- package/dist/lib/MxModule/MxDbRect/index.js +4 -0
- package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +208 -0
- package/dist/lib/MxModule/MxDbSVG/index.js +5 -0
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +41 -44
- package/dist/lib/MxModule/MxFilters/MxFilters.js +201 -0
- package/dist/lib/MxModule/MxFilters/index.js +4 -0
- package/dist/lib/MxModule/MxFun/MxFun.js +70 -30
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +6 -1
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +3 -3
- package/dist/lib/MxModule/MxThreeJS/SVGLoader.js +4 -4
- package/dist/lib/MxModule/Mxassembly/Mxassembly.js +18 -0
- package/dist/lib/MxModule/Mxassembly/index.js +9 -0
- package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +16 -0
- package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1519 -0
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +101 -92
- package/dist/lib/MxModule/store/store.js +1 -0
- package/dist/lib/doc.js +11 -1
- package/dist/lib/mxdraw.js +26 -6
- package/dist/lib/tools/three/index.js +100 -3
- package/dist/lib/types/Mxassembly.js +2 -0
- package/dist/mxdraw.es5.js +3 -3
- package/dist/mxdraw.es5.js.map +1 -1
- package/dist/mxdraw.umd.js +3 -3
- package/dist/mxdraw.umd.js.map +1 -1
- package/dist/types/MxModule/McGeVector3d/McGeVector3d.d.ts +17 -0
- package/dist/types/MxModule/McGeVector3d/index.d.ts +3 -0
- package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +61 -65
- package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +21 -0
- package/dist/types/MxModule/MxDbAlignedDimension/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +47 -26
- package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +28 -0
- package/dist/types/MxModule/MxDbImage/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +22 -0
- package/dist/types/MxModule/MxDbLine/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +74 -0
- package/dist/types/MxModule/MxDbRect/index.d.ts +2 -0
- package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +42 -0
- package/dist/types/MxModule/MxDbSVG/index.d.ts +3 -0
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +38 -39
- package/dist/types/MxModule/MxFilters/MxFilters.d.ts +94 -0
- package/dist/types/MxModule/MxFilters/index.d.ts +2 -0
- package/dist/types/MxModule/MxFun/MxFun.d.ts +59 -27
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +2 -2
- package/dist/types/MxModule/MxType/index.d.ts +1 -1
- package/dist/types/MxModule/Mxassembly/Mxassembly.d.ts +11 -0
- package/dist/types/MxModule/Mxassembly/index.d.ts +3 -0
- package/dist/types/MxModule/loadCoreCode/mxcadassembly_es5.d.ts +1 -0
- package/dist/types/MxModule/store/store.d.ts +2 -0
- package/dist/types/doc.d.ts +6 -1
- package/dist/types/mxdraw.d.ts +18 -4
- package/dist/types/tools/three/index.d.ts +20 -1
- package/dist/types/types/MxDrawObject.d.ts +2 -2
- package/dist/types/types/MxFun.d.ts +8 -5
- package/dist/types/types/Mxassembly.d.ts +3 -0
- package/package.json +3 -3
|
@@ -5255,7 +5255,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5255
5255
|
n.vertices.push(new f.Vector3(t[a].x, t[a].y, t[a].z)); var o = new f.Line(n, i); e.add(o), s.addDynDrawObject(o); }, _.prototype.setWidth = function (t) { this.m_dOsmodeWdith = t; }, _.prototype.GetDrawRect = function () { var t = .5 * this.m_dOsmodeWdith, e = {}; return e.left = this.m_pt.x - t, e.right = this.m_pt.x + t, e.top = this.m_pt.y - t, e.bottom = this.m_pt.y + t, e; }, _.prototype.DrawNear = function (t) { var e = this.GetDrawRect(), n = [new f.Vector3, new f.Vector3]; n[0].x = e.left, n[0].y = e.top, n[1].x = e.right, n[1].y = e.top, this.drawLine(n[0], n[1], t), n[0].x = e.left, n[0].y = e.bottom, n[1].x = e.right, n[1].y = e.bottom, this.drawLine(n[0], n[1], t), n[0].x = e.right, n[0].y = e.top, n[1].x = e.left, n[1].y = e.bottom, this.drawLine(n[0], n[1], t), n[0].x = e.right, n[0].y = e.bottom, n[1].x = e.left, n[1].y = e.top, this.drawLine(n[0], n[1], t); }, _.prototype.DrawEnd = function (t) { var e = this.GetDrawRect(), n = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; n[0].x = e.left, n[0].y = e.top, n[1].x = e.right, n[1].y = e.top, n[2].x = e.right, n[2].y = e.bottom, n[3].x = e.left, n[3].y = e.bottom, this.drawLine(n[0], n[1], t), this.drawLine(n[1], n[2], t), this.drawLine(n[2], n[3], t), this.drawLine(n[3], n[0], t); }, _.prototype.DrawMid = function (t) { var e = this.GetDrawRect(), n = 1.2 * (e.right - e.left), i = n / 2 / Math.sin(60 * 3.14159265 / 180), r = i * Math.sin(.5235987750000001), a = new f.Vector3(this.m_pt.x, this.m_pt.y, this.m_pt.z); a.y -= i; var o = new f.Vector3; o.x = this.m_pt.x + n / 2, o.y = this.m_pt.y + r; var s = new f.Vector3; s.x = this.m_pt.x - n / 2, s.y = this.m_pt.y + r; var l = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; l[0].x = a.x, l[0].y = a.y, l[1].x = o.x, l[1].y = o.y, l[2].x = s.x, l[2].y = s.y, l[3].x = a.x, l[3].y = a.y, this.drawLine(l[0], l[1], t), this.drawLine(l[1], l[2], t), this.drawLine(l[2], l[3], t); }, _.prototype.DrawPerp = function (t) { var e = this.GetDrawRect(), n = [new f.Vector3, new f.Vector3, new f.Vector3]; n[0].x = e.left, n[0].y = e.top, n[1].x = e.left, n[1].y = e.bottom, n[2].x = e.right, n[2].y = e.bottom, this.drawPolyline(n, t), n[0].x = e.left, n[0].y = this.m_pt.y, n[1].x = this.m_pt.x, n[1].y = this.m_pt.y, n[2].x = this.m_pt.x, n[2].y = e.bottom, this.drawPolyline(n, t); }, _.prototype.DrawCircle = function (t, e, n) { null == n && (n = .5 * this.m_dOsmodeWdith); for (var i = [], r = 0, a = 3.14159265 / 180; r <= 360; r += 15) {
|
|
5256
5256
|
var o = n * Math.cos(r * a) + t.x, s = n * Math.sin(r * a) + t.y;
|
|
5257
5257
|
i.push(new f.Vector3(o, s));
|
|
5258
|
-
} this.drawPolyline(i, e); }, _.prototype.DrawInt = function (t) { var e = this.GetDrawRect(), n = [new f.Vector3, new f.Vector3]; n[0].x = e.right, n[0].y = e.top, n[1].x = e.left, n[1].y = e.bottom, this.drawLine(n[0], n[1], t), n[0].x = e.right, n[0].y = e.bottom, n[1].x = e.left, n[1].y = e.top, this.drawLine(n[0], n[1], t); }, _.prototype.DrawCen = function (t) { this.DrawInt(t), this.DrawCircle(this.m_pt, t); }, _.prototype.DrawTan = function (t) { this.DrawEnd(t); }, _.prototype.DrawIns = function (t) { var e = this.GetDrawRect(), n = {}, i = (e.right - e.left) / 1.5; n.left = this.m_pt.x - i, n.right = this.m_pt.x + i, n.top = this.m_pt.y - i, n.bottom = this.m_pt.y + i; var r = this.m_pt.x, a = this.m_pt.y, o = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; o[0].x = n.left, o[0].y = n.top, o[1].x = n.left, o[1].y = a + 2, o[2].x = r, o[2].y = a + 2, o[3].x = r, o[3].y = n.bottom, o[4].x = n.right, o[4].y = n.bottom, o[5].x = n.right, o[5].y = a - 2, o[6].x = r, o[6].y = a - 2, o[7].x = r, o[7].y = n.top, o[8].x = n.left, o[8].y = n.top, this.drawPolyline(o, t); }, _.prototype.DrawNode = function (t) { var e = this.GetDrawRect(), n = {}, i = (e.right - e.left) / 1.5; n.left = this.m_pt.x - i, n.right = this.m_pt.x + i, n.top = this.m_pt.y - i, n.bottom = this.m_pt.y + i; var r = {}, a = this.m_dOsmodeWdith / 1.3; r.left = this.m_pt.x - a, r.right = this.m_pt.x + a, r.top = this.m_pt.y - a, r.bottom = this.m_pt.y + a; var o = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; o[0].x = n.left, o[0].y = n.top, o[1].x = n.right, o[1].y = n.bottom, o[2].x = n.left, o[2].y = n.bottom, o[3].x = n.right, o[3].y = n.top, this.drawLine(o[0], o[1], t), this.drawLine(o[2], o[3], t), this.DrawCircle(this.m_pt, t, a); }, _.prototype.upDisplay = function (t, e, n) { this.m_pt = t, this.m_osmode = e, this.clearDisplay(n); var i = n.getMxObject().
|
|
5258
|
+
} this.drawPolyline(i, e); }, _.prototype.DrawInt = function (t) { var e = this.GetDrawRect(), n = [new f.Vector3, new f.Vector3]; n[0].x = e.right, n[0].y = e.top, n[1].x = e.left, n[1].y = e.bottom, this.drawLine(n[0], n[1], t), n[0].x = e.right, n[0].y = e.bottom, n[1].x = e.left, n[1].y = e.top, this.drawLine(n[0], n[1], t); }, _.prototype.DrawCen = function (t) { this.DrawInt(t), this.DrawCircle(this.m_pt, t); }, _.prototype.DrawTan = function (t) { this.DrawEnd(t); }, _.prototype.DrawIns = function (t) { var e = this.GetDrawRect(), n = {}, i = (e.right - e.left) / 1.5; n.left = this.m_pt.x - i, n.right = this.m_pt.x + i, n.top = this.m_pt.y - i, n.bottom = this.m_pt.y + i; var r = this.m_pt.x, a = this.m_pt.y, o = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; o[0].x = n.left, o[0].y = n.top, o[1].x = n.left, o[1].y = a + 2, o[2].x = r, o[2].y = a + 2, o[3].x = r, o[3].y = n.bottom, o[4].x = n.right, o[4].y = n.bottom, o[5].x = n.right, o[5].y = a - 2, o[6].x = r, o[6].y = a - 2, o[7].x = r, o[7].y = n.top, o[8].x = n.left, o[8].y = n.top, this.drawPolyline(o, t); }, _.prototype.DrawNode = function (t) { var e = this.GetDrawRect(), n = {}, i = (e.right - e.left) / 1.5; n.left = this.m_pt.x - i, n.right = this.m_pt.x + i, n.top = this.m_pt.y - i, n.bottom = this.m_pt.y + i; var r = {}, a = this.m_dOsmodeWdith / 1.3; r.left = this.m_pt.x - a, r.right = this.m_pt.x + a, r.top = this.m_pt.y - a, r.bottom = this.m_pt.y + a; var o = [new f.Vector3, new f.Vector3, new f.Vector3, new f.Vector3]; o[0].x = n.left, o[0].y = n.top, o[1].x = n.right, o[1].y = n.bottom, o[2].x = n.left, o[2].y = n.bottom, o[3].x = n.right, o[3].y = n.top, this.drawLine(o[0], o[1], t), this.drawLine(o[2], o[3], t), this.DrawCircle(this.m_pt, t, a); }, _.prototype.upDisplay = function (t, e, n) { this.m_pt = t, this.m_osmode = e, this.clearDisplay(n); var i = n.getMxObject().getTheTempDrawContainer(), r = .5 * this.m_dOsmodeWdith; if (this.m_osmode != v.MxJigCmdManager.OsnapMode.kOsModekValid)
|
|
5259
5259
|
if (this.m_osmode == v.MxJigCmdManager.OsnapMode.kOsModeNear)
|
|
5260
5260
|
this.DrawNear(i);
|
|
5261
5261
|
else if (this.m_osmode == v.MxJigCmdManager.OsnapMode.kOsModeEnd)
|
|
@@ -5283,16 +5283,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5283
5283
|
function _() { this.m_iColor = 16711935, this.m_pt = new f.Vector3, this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid, this.m_dOsmodeWdith = 10; }
|
|
5284
5284
|
var M = (S.prototype.resetData = function () { this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid, this.m_isValidPrvInputPoint = !1, this.m_lOSmode = 0, this.m_vecOffset.set(0, 0, 0), this.m_isValid = !1, this.m_iLongprogressStatus = -1; }, S.prototype.notifyOsnapToServer = function () { var n = this, t = { ptx: this.m_pt.x, pty: this.m_pt.y, osmode: this.m_lOSmode, isValidPrvInputPoint: this.m_isValidPrvInputPoint }; this.m_isValidPrvInputPoint && (t.prvPtx = this.m_prvInputPoint.x, t.prvPty = this.m_prvInputPoint.y); var i = this.m_mxJig.getMxObject(); if (i.getRunMode() == m.MxRunMode.kBrowse) {
|
|
5285
5285
|
var r = this, e = w.MxWindowsEvent.getCurrentMousePostion();
|
|
5286
|
-
i.getObjectOsnap().getOsnapData(e, function (t, e) { r.m_ptSnapPoint.x = t.x, r.m_ptSnapPoint.y = t.y, r.m_ptSnapPoint.z = 0, r.m_ptSnapSrcPoint.x = r.m_pt.x, r.m_ptSnapSrcPoint.y = r.m_pt.y, r.m_ptSnapSrcPoint.z = 0, r.m_osmode = e, r.m_draw.setWidth(i.
|
|
5286
|
+
i.getObjectOsnap().getOsnapData(e, function (t, e) { r.m_ptSnapPoint.x = t.x, r.m_ptSnapPoint.y = t.y, r.m_ptSnapPoint.z = 0, r.m_ptSnapSrcPoint.x = r.m_pt.x, r.m_ptSnapSrcPoint.y = r.m_pt.y, r.m_ptSnapSrcPoint.z = 0, r.m_osmode = e, r.m_draw.setWidth(i.screenCoordLong2Doc(x.MxDrawData.getCursorWidthPixels())), r.m_draw.upDisplay(new f.Vector3(t.x, t.y, 0), e, r.m_mxJig); });
|
|
5287
5287
|
}
|
|
5288
5288
|
else {
|
|
5289
|
-
t.SearchRnge = i.
|
|
5289
|
+
t.SearchRnge = i.screenCoordLong2Doc(x.MxDrawData.getCursorWidthPixels());
|
|
5290
5290
|
var a = this;
|
|
5291
5291
|
i.callCommand("MxCAD_NotifyOsnap", JSON.stringify(t), function (t) { if (!("string" != typeof t || t.length < 1) && a.m_isRuning) {
|
|
5292
5292
|
var e = JSON.parse(t);
|
|
5293
|
-
n.m_ptSnapPoint.x = e.ptsx, n.m_ptSnapPoint.y = e.ptsy, n.m_ptSnapPoint.z = e.ptsz, n.m_ptSnapSrcPoint.x = e.ptx, n.m_ptSnapSrcPoint.y = e.pty, n.m_ptSnapSrcPoint.z = 0, n.m_osmode = e.osmode, a.m_draw.setWidth(i.
|
|
5293
|
+
n.m_ptSnapPoint.x = e.ptsx, n.m_ptSnapPoint.y = e.ptsy, n.m_ptSnapPoint.z = e.ptsz, n.m_ptSnapSrcPoint.x = e.ptx, n.m_ptSnapSrcPoint.y = e.pty, n.m_ptSnapSrcPoint.z = 0, n.m_osmode = e.osmode, a.m_draw.setWidth(i.screenCoordLong2Doc(x.MxDrawData.getCursorWidthPixels())), a.m_draw.upDisplay(new f.Vector3(e.ptsx, e.ptsy, e.ptsz), e.osmode, a.m_mxJig);
|
|
5294
5294
|
} });
|
|
5295
|
-
} }, S.prototype.startDrag = function (t, e) { this.m_mxJig = e; var n = this.m_mxJig.getMxObject(); e.isDisableOsnap() ? this.m_isEnable = !1 : this.m_isEnable = !0 ===
|
|
5295
|
+
} }, S.prototype.startDrag = function (t, e) { this.m_mxJig = e; var n, i, r, a = this.m_mxJig.getMxObject(); function o() { n.notifyOsnapToServer(); } return e.isDisableOsnap() ? this.m_isEnable = !1 : this.m_isEnable = !0 === a.getInisetValue(m.IniSetName.kEnableOsnapFunction), this.m_isOffsetInputPostion = t, this.m_isRuning = !0, this.m_draw.setWidth(a.screenCoordLong2Doc(x.MxDrawData.getCursorWidthPixels())), this.resetData(), this.m_notifyOsnap_delayCall = (n = this, i = 100, r = null, function () { clearTimeout(r), r = setTimeout(o, i); }), !0; }, S.prototype.endDrag = function () { return this.m_isRuning = !1, this.m_draw.clearDisplay(this.m_mxJig), !0; }, S.prototype.reCompteCurrentPoint = function (t) { return t; }, S.prototype.isEnable = function () { return this.m_isEnable && s.isEnableOsmode(); }, S.prototype.notifyOsnap = function (t, e) { this.m_lOSmode = t, null == e ? this.m_isValidPrvInputPoint = !1 : (this.m_isValidPrvInputPoint = !0, this.m_prvInputPoint = e), this.m_osmode == v.MxJigCmdManager.OsnapMode.kOsModekValid && this.m_draw.clearDisplay(this.m_mxJig), this.m_notifyOsnap_delayCall(); }, S.prototype.setPoint = function (t, e) { if (this.isEnable()) {
|
|
5296
5296
|
null == t ? (this.m_isValid = !1, this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid) : (-1 == this.m_iLongprogressStatus || this.m_iLongprogressStatus, this.m_pt = t, this.m_inPoint = t, this.m_isValid = !0, (null == e || this.m_osmode != v.MxJigCmdManager.OsnapMode.kOsModekValid && y.MxTools.getXYPlanDistance(this.m_ptSnapSrcPoint, t) > e) && (this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid));
|
|
5297
5297
|
var n = s.getOSmode(), i = s.getPrvPoint();
|
|
5298
5298
|
this.notifyOsnap(n, s.isValidPrvpoint() ? i : void 0);
|
|
@@ -5305,33 +5305,33 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5305
5305
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
5306
5306
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
|
|
5307
5307
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.McGiWorldDrawSelect = n.McGiWorldDraw = n.McGiWorldDrawType = void 0;
|
|
5308
|
-
var a, o,
|
|
5308
|
+
var a, o, c = t("three"), u = t("./MxThreeJS"), s = t("./MxManager"), h = t("three.meshline");
|
|
5309
5309
|
(o = a = n.McGiWorldDrawType || (n.McGiWorldDrawType = {}))[o.kWorldDraw = 1] = "kWorldDraw", o[o.kDynDragDraw = 2] = "kDynDragDraw", o[o.kSelectDraw = 3] = "kSelectDraw";
|
|
5310
|
-
var
|
|
5310
|
+
var l = (d.prototype.getType = function () { return this.worldDrawType; }, d.prototype.setColor = function (t) { this.iColor != t && (this.widthMaterial = null), this.iColor = t; }, d.prototype.setDash = function (t, e) { this.dDashArray = t, this.dDashRatio = e; }, d.prototype.getDash = function () { return { dDashArray: this.dDashArray, dDashRatio: this.dDashRatio }; }, d.prototype.setDashLineDisplay = function (t) { t ? (this.dDashArray = .03, this.dDashRatio = .1, 0 == this.dLineWidth && (this.dLineWidth = 6, this.lineWidthIsPixels = !0)) : (this.dDashArray = 0, this.dDashRatio = 0); }, d.prototype.isDashLineDisplay = function () { return 0 < this.dDashArray && 0 < this.dDashRatio; }, d.prototype.getColor = function () { return this.iColor; }, d.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, d.prototype.getRenderOrder = function () { return this.iRenderOrder; }, d.prototype.setLineWidthIsPixels = function (t) { this.lineWidthIsPixels != t && (this.widthMaterial = null), this.lineWidthIsPixels = t; }, d.prototype.getLineWidthIsPixels = function () { return this.lineWidthIsPixels; }, d.prototype.setLineWidth = function (t) { this.dLineWidth != t && (this.widthMaterial = null), this.dLineWidth = t; }, d.prototype.getLineWidth = function () { return this.dLineWidth; }, d.prototype.drawEntity = function (t) { t.renderOrder = this.iRenderOrder, this.aryEntity.push(t); }, d.prototype.getEntitys = function () { return this.aryEntity; }, d.prototype.getMxObject = function () { return this.mxObj; }, d.prototype.createWidthMaterial = function () { null == this.widthMaterial && (0 < this.dDashArray && 0 < this.dDashRatio ? this.widthMaterial = new h.MeshLineMaterial({ useMap: !1, color: this.iColor, opacity: 1, resolution: new c.Vector2(this.mxObj.getViewWidth(), this.mxObj.getViewHeight()), sizeAttenuation: !this.lineWidthIsPixels, lineWidth: this.dLineWidth, transparent: !0, depthTest: !1, dashArray: this.dDashArray, dashRatio: this.dDashRatio }) : this.widthMaterial = new h.MeshLineMaterial({ useMap: !1, color: this.iColor, opacity: 1, resolution: new c.Vector2(this.mxObj.getViewWidth(), this.mxObj.getViewHeight()), sizeAttenuation: !this.lineWidthIsPixels, lineWidth: this.dLineWidth, transparent: !0, depthTest: !1 })); }, d.prototype.drawLines = function (t) { if (!(t.length < 2))
|
|
5311
5311
|
if (0 != this.dLineWidth) {
|
|
5312
5312
|
this.createWidthMaterial();
|
|
5313
|
-
var e = new
|
|
5313
|
+
var e = new c.Geometry;
|
|
5314
5314
|
e.vertices = t;
|
|
5315
|
-
var n = new
|
|
5315
|
+
var n = new h.MeshLine;
|
|
5316
5316
|
n.setGeometry(e);
|
|
5317
|
-
var i = new
|
|
5318
|
-
this.drawEntity(i), this.drawEntity(
|
|
5317
|
+
var i = new c.Mesh(n.geometry, this.widthMaterial);
|
|
5318
|
+
this.drawEntity(i), this.drawEntity(u.MxThreeJS.createLines(t.slice(0), this.iColor, 0));
|
|
5319
5319
|
}
|
|
5320
5320
|
else
|
|
5321
|
-
this.drawEntity(
|
|
5321
|
+
this.drawEntity(u.MxThreeJS.createLines(t.slice(0), this.iColor)); }, d.prototype.drawSelectLine = function (t, e, n, i) { t instanceof Object && e instanceof Object ? this.drawEntity(u.MxThreeJS.createLine(t, e, this.iColor, 0)) : "number" == typeof t && "number" == typeof e && this.drawEntity(u.MxThreeJS.createLine(new c.Vector3(t, e, 0), new c.Vector3(n, i, 0), this.iColor, 0)); }, d.prototype.drawLine = function (t, e, n, i) { var r, a; if (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), 0 != this.dLineWidth) {
|
|
5322
5322
|
this.createWidthMaterial();
|
|
5323
|
-
var
|
|
5324
|
-
|
|
5325
|
-
var
|
|
5326
|
-
|
|
5327
|
-
var
|
|
5328
|
-
|
|
5323
|
+
var o = new Float32Array(6);
|
|
5324
|
+
o[0] = r.x, o[1] = r.y, o[2] = 0, o[3] = a.x, o[4] = a.y, o[5] = 0;
|
|
5325
|
+
var s = new h.MeshLine;
|
|
5326
|
+
s.setGeometry(o);
|
|
5327
|
+
var l = new c.Mesh(s.geometry, this.widthMaterial);
|
|
5328
|
+
l.renderOrder = this.iRenderOrder, this.drawEntity(l), this.drawSelectLine(r, a);
|
|
5329
5329
|
}
|
|
5330
5330
|
else
|
|
5331
|
-
this.drawEntity(
|
|
5332
|
-
function d(t, e) { this.aryEntity = [], this.iColor = 16777215, this.dLineWidth = 0, this.lineWidthIsPixels = !0, this.iRenderOrder =
|
|
5333
|
-
n.McGiWorldDraw =
|
|
5334
|
-
var p, f = (r(m, p =
|
|
5331
|
+
this.drawEntity(u.MxThreeJS.createLine(r, a, this.iColor)); }, d.prototype.drawCircle = function (t, e) { this.drawEntity(u.MxThreeJS.createCircle(t, e, this.iColor)); }, d.prototype.drawText = function (t, e, n, i) { var r = u.MxThreeJS.creatTextSprite(t, i, e, n, this.iColor); this.drawEntity(r); }, d.prototype.setupForEntity = function (t) { this.iColor = t.getColor(), this.iRenderOrder = t.getRenderOrder(); }, d);
|
|
5332
|
+
function d(t, e) { this.aryEntity = [], this.iColor = 16777215, this.dLineWidth = 0, this.lineWidthIsPixels = !0, this.iRenderOrder = s.MxData.iMxEntityRenderOrder, this.worldDrawType = 1, this.widthMaterial = null, this.dDashArray = 0, this.dDashRatio = 0, this.mxObj = t, this.worldDrawType = e; }
|
|
5333
|
+
n.McGiWorldDraw = l;
|
|
5334
|
+
var p, f = (r(m, p = l), m.prototype.setCurEntityId = function (t) { this.curEntityId = t; }, m.prototype.drawEntity = function (t) { }, m.prototype.drawText = function (t, e, n, i) { }, m.prototype.drawSelectLine = function (t, e, n, i) { }, m.prototype.isValid = function () { return 0 != this.curEntityId || (console.log("this.curEntityId == 0"), !1); }, m.prototype.drawLine = function (t, e, n, i) { var r, a; this.isValid() && (t instanceof Object && e instanceof Object ? (r = t, a = e) : "number" == typeof t && "number" == typeof e && (r = new c.Vector3(t, e, 0), a = new c.Vector3(n, i, 0)), this.selectManager.addLineDisplay(this.curEntityId, r, a)); }, m.prototype.drawCircle = function (t, e) { this.isValid() && this.selectManager.addCircleDisplay(this.curEntityId, t, e); }, m);
|
|
5335
5335
|
function m(t, e) { var n = p.call(this, t, a.kSelectDraw) || this; return n.selectManager = e, n.curEntityId = 0, n; }
|
|
5336
5336
|
n.McGiWorldDrawSelect = f;
|
|
5337
5337
|
}, { "./MxManager": 51, "./MxThreeJS": 58, three: 19, "three.meshline": 18 }], 22: [function (t, e, n) {
|
|
@@ -5361,7 +5361,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5361
5361
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
5362
5362
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
|
|
5363
5363
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MrxDbgUiPrPoint = void 0;
|
|
5364
|
-
var a, o = t("three"), s = t("./MxJigCmdManager"), l = t("./MxFun"), c = t("./MrxDbgUiPrBase"), u = t("./MxUiVue"), h = (a = c.MrxDbgUiPrBase, r(d, a), d.prototype.value = function () { return new o.Vector3(this.m_value.x, this.m_value.y, 0); }, d.prototype.
|
|
5364
|
+
var a, o = t("three"), s = t("./MxJigCmdManager"), l = t("./MxFun"), c = t("./MrxDbgUiPrBase"), u = t("./MxUiVue"), h = (a = c.MrxDbgUiPrBase, r(d, a), d.prototype.value = function () { return new o.Vector3(this.m_value.x, this.m_value.y, 0); }, d.prototype.basePt = function () { return new o.Vector3(this.m_basePt.x, this.m_basePt.y, 0); }, d.prototype.setBasePt = function (t) { null == this.m_basePt ? this.m_basePt = new o.Vector3(t.x, t.y, 0) : (this.m_basePt.x = t.x, this.m_basePt.y = t.y); }, d.prototype.setUseBasePt = function (t) { this.m_useBasePt = t; }, d.prototype.initGo = function () { this.m_keyWordPicked = "", this.m_retcall = null, this.m_retWhileCall = null, this.m_exitCall = null; }, d.prototype.go = function (t) { this.initGo(), this.m_retcall = t, s.MxJigCmdManager.runCmd(this); }, d.prototype.goWhile = function (t, e) { this.initGo(), this.m_retWhileCall = t, e && (this.m_exitCall = e), s.MxJigCmdManager.runCmd(this); }, d.prototype.onExitCommand = function () { var t = this; u.MxUiVue.setCursorType(u.MxUiVue.CursorType.kNormal); var e = !1; null != this.m_retcall && (s.MxJigCmdManager.setRunCmdEvent(function () { a.prototype.onExitCommand.call(t, !1), e = !0; }), this.m_retcall(this.getReturnStatus(this.m_resultDragStatus)), s.MxJigCmdManager.setRunCmdEvent(void 0)), !e && s.MxJigCmdManager.isWaitCmdNull() && u.MxUiVue.restoreCmdStatus(), e || a.prototype.onExitCommand.call(this, !0); }, d.prototype.onStartCommand = function () { u.MxUiVue.setCursorType(u.MxUiVue.CursorType.kCross), this.printMessage(), s.MxJigCmdManager.setKeywordList(this.keyWords()), a.prototype.onStartCommand.call(this); }, d.prototype.sampler = function () { var t = this.acquirePoint(this.m_toucheType); return this.procInKeyword(t), t.status == s.MxJigCmdManager.DragStatus.kNormal && (null == this.m_value ? this.m_value = new o.Vector3(t.pt.x, t.pt.y, 0) : (this.m_value.x = t.pt.x, this.m_value.y = t.pt.y)), t.status; }, d.prototype.done = function (t) { if (null != this.m_retcall)
|
|
5365
5365
|
return this.m_resultDragStatus = t, this.m_exitCall && this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)), s.MxJigCmdManager.DoneStatius.kExitCommand; if (null != this.m_retWhileCall) {
|
|
5366
5366
|
if ((this.m_resultDragStatus = t) == s.MxJigCmdManager.DragStatus.kCancel)
|
|
5367
5367
|
return this.m_exitCall && this.m_exitCall(this.getReturnStatus(this.m_resultDragStatus)), s.MxJigCmdManager.DoneStatius.kExitCommand;
|
|
@@ -5732,14 +5732,14 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5732
5732
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADGripJig = n.MxCADGrip = n.MxCADGripData = void 0;
|
|
5733
5733
|
var c = t("three"), s = t("./MxFun"), u = t("./MxThreeJS"), a = t("./MxJig"), h = t("./MxJigCmdManager"), o = t("./MxManager"), l = function () { this.threeObject = null; };
|
|
5734
5734
|
n.MxCADGripData = l;
|
|
5735
|
-
var d = (p.prototype.removeAllEntity = function () { var o = this.
|
|
5735
|
+
var d = (p.prototype.getParentObject = function () { return this.mxObj.getTheTempDrawContainer(); }, p.prototype.removeAllEntity = function () { var o = this.getParentObject(); this.mapGrips.forEach(function (t, e, n) { for (var i = t.length, r = 0; r < i; r++) {
|
|
5736
5736
|
var a = t[r];
|
|
5737
5737
|
s.MxFun.removeThreejsObject(a.threeObject, o);
|
|
5738
|
-
} }), this.mapGrips = new Map; }, p.prototype.deleteGripData = function (t) { var e = this.
|
|
5738
|
+
} }), this.mapGrips = new Map; }, p.prototype.deleteGripData = function (t) { var e = this.getParentObject(), n = this.mapGrips.get(t); if (n)
|
|
5739
5739
|
for (var i = n.length, r = 0; r < i; r++) {
|
|
5740
5740
|
var a = n[r];
|
|
5741
5741
|
s.MxFun.removeThreejsObject(a.threeObject, e);
|
|
5742
|
-
} this.mapGrips.delete(t); }, p.prototype.deleteEntityData = function (t) { this.mapEntityData.delete(t); }, p.prototype.addGripData = function (t, e, n, i) { var r = this.mapGrips.get(t); null == r && (r = new Array, this.mapGrips.set(t, r)); var a = new l; return a.iIndex = e, a.point = new c.Vector3(n, i, 0), r.push(a), a; }, p.prototype.createGripDisplayObject = function (t) { var e = this.
|
|
5742
|
+
} this.mapGrips.delete(t); }, p.prototype.deleteEntityData = function (t) { this.mapEntityData.delete(t); }, p.prototype.addGripData = function (t, e, n, i) { var r = this.mapGrips.get(t); null == r && (r = new Array, this.mapGrips.set(t, r)); var a = new l; return a.iIndex = e, a.point = new c.Vector3(n, i, 0), r.push(a), a; }, p.prototype.createGripDisplayObject = function (t) { var e = this.getParentObject(); t.geometry = new c.Geometry; var n = this.mxObj.screenCoordLong2Doc(8); t.geometry.vertices.push(new c.Vector3(t.point.x - n, t.point.y - n, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x - n, t.point.y + n, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + n, t.point.y + n, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + n, t.point.y - n, 0)), t.geometry.faces.push(new c.Face3(0, 1, 2)), t.geometry.faces.push(new c.Face3(2, 3, 0)), t.geometry.computeFaceNormals(), t.geometry.computeVertexNormals(); var i = new c.MeshBasicMaterial({ color: 255, transparent: !0, depthTest: !1, side: c.DoubleSide, opacity: .9 }), r = new c.Mesh(t.geometry, i); r.renderOrder = o.MxData.iGripRenderOrder, e.add(r), t.threeObject = r; }, p.prototype.clearAll = function () { return this.mapEntityData = new Map, 0 != this.mapGrips.size && (this.removeAllEntity(), !0); }, p.prototype.addEntityData = function (t, e) { this.mapEntityData.set(t, e); }, p.prototype.onIntelliSelect = function (t) { for (var e = JSON.parse(t), n = e.vecEntityData.length, i = 0; i < n; i++) {
|
|
5743
5743
|
var r = e.vecEntityData[i], a = r.lIdIndex;
|
|
5744
5744
|
this.addEntityData(a, r.entity), this.deleteGripData(a);
|
|
5745
5745
|
for (var o = r.vecGrip.length, s = 0; s < o; s++) {
|
|
@@ -5747,12 +5747,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5747
5747
|
this.createGripDisplayObject(c);
|
|
5748
5748
|
}
|
|
5749
5749
|
} }, p.prototype.onControlsChage = function () { if (0 != this.mapGrips.size) {
|
|
5750
|
-
var o = this.mxObj.
|
|
5750
|
+
var o = this.mxObj.screenCoordLong2Doc(8);
|
|
5751
5751
|
this.mapGrips.forEach(function (t, e, n) { for (var i = t.length, r = 0; r < i; r++) {
|
|
5752
5752
|
var a = t[r];
|
|
5753
5753
|
4 == a.geometry.vertices.length && (a.geometry.vertices[0].x = a.point.x - o, a.geometry.vertices[0].y = a.point.y - o, a.geometry.vertices[1].x = a.point.x - o, a.geometry.vertices[1].y = a.point.y + o, a.geometry.vertices[2].x = a.point.x + o, a.geometry.vertices[2].y = a.point.y + o, a.geometry.vertices[3].x = a.point.x + o, a.geometry.vertices[3].y = a.point.y - o, a.geometry.computeFaceNormals(), a.geometry.computeVertexNormals(), a.geometry.verticesNeedUpdate = !0);
|
|
5754
5754
|
} });
|
|
5755
|
-
} }, p.prototype.hitTest = function (t) { var a = { grips: new Array, ids: new Array, pt: t }, o = new c.Vector3(t.x, t.y, 0), s = this.mxObj.
|
|
5755
|
+
} }, p.prototype.hitTest = function (t) { var a = { grips: new Array, ids: new Array, pt: t }, o = new c.Vector3(t.x, t.y, 0), s = this.mxObj.screenCoordLong2Doc(8); return this.mapGrips.forEach(function (t, e) { for (var n = t.length, i = 0; i < n; i++) {
|
|
5756
5756
|
var r = t[i];
|
|
5757
5757
|
if (r.point.distanceTo(o) <= s) {
|
|
5758
5758
|
a.grips.push(r), a.ids.push(e);
|
|
@@ -5894,7 +5894,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5894
5894
|
(i = O = n.MxCADSelectDisplayEntityDataType || (n.MxCADSelectDisplayEntityDataType = {}))[i.kLinesType = 1] = "kLinesType", i[i.kTriangleType = 2] = "kTriangleType";
|
|
5895
5895
|
var k = function () { this.type = O.kLinesType, this.points = []; };
|
|
5896
5896
|
n.MxCADSelectDisplayEntityData = k;
|
|
5897
|
-
var a = (o.prototype.removeAllEntity = function () { for (var t = this.
|
|
5897
|
+
var a = (o.prototype.getParentObject = function () { return this.mxObj.getTheTempDrawContainer(); }, o.prototype.removeAllEntity = function () { for (var t = this.getParentObject(), e = this.aryThreeObject.length, n = 0; n < e; n++)
|
|
5898
5898
|
r.MxFun.removeThreejsObject(this.aryThreeObject[n], t); this.aryThreeObject = []; }, o.prototype.clearAllSelect = function () { return this.mxObj.callCommand("MxCAD_ClearSelect"), 0 != this.aryThreeObject.length && (this.removeAllEntity(), !0); }, o.prototype.OnMessageEntityDisplayDatas = function (t) { for (var e = new P.MxCADNetData(t), n = e.getEntityDisplayDatasHead(), i = n.nOffset, r = [], a = 0; a < n.nCount; a++) {
|
|
5899
5899
|
var o = e.getEntityDisplayDataHead(i);
|
|
5900
5900
|
i = o.nOffset, (v = new k).type = o.type;
|
|
@@ -5908,7 +5908,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5908
5908
|
}
|
|
5909
5909
|
v.points = l, r.push(v);
|
|
5910
5910
|
}
|
|
5911
|
-
} var d = this.mxObj.getViewWidth(), p = this.mxObj.getViewHeight(); this.material.resolution = new L.Vector2(d, p); for (var f = r.length, m = this.
|
|
5911
|
+
} var d = this.mxObj.getViewWidth(), p = this.mxObj.getViewHeight(); this.material.resolution = new L.Vector2(d, p); for (var f = r.length, m = this.getParentObject(), g = 0; g < f; g++) {
|
|
5912
5912
|
var v;
|
|
5913
5913
|
if ((v = r[g]).type == O.kLinesType)
|
|
5914
5914
|
for (var y = v.points.length, x = 0; x + 3 < y; x += 4) {
|
|
@@ -5971,9 +5971,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5971
5971
|
}, { "./MxFun": 45, "./MxJigCmdManager": 48, "./MxType": 60, "./MxUiVue": 64 }], 34: [function (t, e, n) {
|
|
5972
5972
|
"use strict";
|
|
5973
5973
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbDatabase = void 0;
|
|
5974
|
-
var o = t("three"), i = t("./MxFun"), c = t("./MxDbEntity"), r = t("./MxDbEntityGrip"), a = t("./MxDbEntitySelect"), u = t("./MxManager"), s = t("./MxType"), l = (h.prototype.getAllEntity = function () { return this.mapIdToEntity; }, h.prototype.upDirtyDisplay = function () { var e = !1; return this.mapIdToEntity.forEach(function (t) { t.getDirtyDisplay() && (t.upDisplay(), t.setDirtyDisplay(!1), e = !0); }), e; }, h.prototype.saveJson = function () { var t = { ver: 1 }, e = new o.Vector3(0, 0, 0), n = new o.Vector3(this.mxObj.getViewWidth(), this.mxObj.getViewHeight(), 0), i = this.mxObj.screenCoord2World(e.x, e.y), r = this.mxObj.
|
|
5974
|
+
var o = t("three"), i = t("./MxFun"), c = t("./MxDbEntity"), r = t("./MxDbEntityGrip"), a = t("./MxDbEntitySelect"), u = t("./MxManager"), s = t("./MxType"), l = (h.prototype.getAllEntity = function () { return this.mapIdToEntity; }, h.prototype.upDirtyDisplay = function () { var e = !1; return this.mapIdToEntity.forEach(function (t) { t.getDirtyDisplay() && (t.upDisplay(), t.setDirtyDisplay(!1), e = !0); }), e; }, h.prototype.saveJson = function () { var t = { ver: 1 }, e = new o.Vector3(0, 0, 0), n = new o.Vector3(this.mxObj.getViewWidth(), this.mxObj.getViewHeight(), 0), i = (this.mxObj.screenCoord2World(e.x, e.y, 0), this.mxObj.screenCoord2World(n.x, n.y, 0), this.mxObj.screenCoord2Doc(e.x, e.y, 0)), r = this.mxObj.screenCoord2Doc(n.x, n.y, 0); t.view = { ptView1: i, ptView2: r }; var a = []; return this.mapIdToEntity.forEach(function (t) { var e = t.getUserObject(), n = { type: s.MxType.MxCloneType.kMxFileClone }; e.dwgOut(n), n.TypeName = e.getTypeName(), a.push(n); }), t.entitys = a, JSON.stringify(t); }, h.prototype.loadJson = function (t) { var e = JSON.parse(t); if (e.view) {
|
|
5975
5975
|
var n = e.view;
|
|
5976
|
-
this.mxObj.zoomW(n.ptView1, n.ptView2, !
|
|
5976
|
+
this.mxObj.zoomW(n.ptView1, n.ptView2, !1);
|
|
5977
5977
|
} for (var i = e.entitys, r = i.length, a = 0; a < r; a++) {
|
|
5978
5978
|
var o = i[a], s = u.MxManager.getMxDbEntityClassHierarchy().createMxEntity(o.TypeName);
|
|
5979
5979
|
if (s) {
|
|
@@ -5981,14 +5981,14 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
5981
5981
|
var l = new c.MxDbEntity;
|
|
5982
5982
|
l.initUserObject(s), this.addEntity(l);
|
|
5983
5983
|
}
|
|
5984
|
-
} return !0; }, h.prototype.getMxObject = function () { return this.mxObj; }, h.prototype.getGripManager = function () { return this.gripManager; }, h.prototype.getSelectManager = function () { return this.selectManager; }, h.prototype.clearMxCurrentSelect = function () { var t = !1; return this.gripManager.removeAllGrips() && (t = !0), this.selectManager.removeAllEntity() && (t = !0), t; }, h.prototype.eraseAllEntity = function () { var e = this.getThreeJSParentObject(); this.mapIdToEntity.forEach(function (t) { t.clearDisplayImp(e); }), this.mapIdToEntity = new Map, this.clearMxCurrentSelect(); }, h.prototype.init = function (t) { this.mxObj = t, this.scene = t.getScene(), i.MxFun.removeThreejsObject(this.parentObject, this.scene), this.parentObject = new o.Object3D, this.parentObject.renderOrder = u.MxData.iMxEntityRenderOrder, this.scene.add(this.parentObject); }, h.prototype.getEntity = function (t) { return this.mapIdToEntity.get(t); }, h.prototype.setRenderOrder = function (t) { var e = this.parentObject.renderOrder; return this.parentObject.renderOrder = t, e; }, h.prototype.eraseEntity = function (t) { this.gripManager.deleteGripData(t), this.selectManager.deleteSelect(t), this.mapIdToEntity.delete(t); }, h.prototype.addEntity = function (t) { return this.mapIdToEntity.set(this.idCount, t), t.setMxDatabase(this), t.setObjectId(this.idCount), t.upDisplay(), this.idCount++; }, h.prototype.getThreeJSParentObject = function () { return this.parentObject; }, h.prototype.getIntersectObjects = function (t) { var e = new o.Raycaster; e.linePrecision = this.mxObj.
|
|
5984
|
+
} return !0; }, h.prototype.getMxObject = function () { return this.mxObj; }, h.prototype.getGripManager = function () { return this.gripManager; }, h.prototype.getSelectManager = function () { return this.selectManager; }, h.prototype.clearMxCurrentSelect = function () { var t = !1; return this.gripManager.removeAllGrips() && (t = !0), this.selectManager.removeAllEntity() && (t = !0), t; }, h.prototype.eraseAllEntity = function () { var e = this.getThreeJSParentObject(); this.mapIdToEntity.forEach(function (t) { t.clearDisplayImp(e); }), this.mapIdToEntity = new Map, this.clearMxCurrentSelect(); }, h.prototype.intiDoc2Wold = function (t) { this.parentObject.matrix = t, this.parentObject.matrixAutoUpdate = !1; }, h.prototype.init = function (t) { this.mxObj = t, this.scene = t.getScene(), i.MxFun.removeThreejsObject(this.parentObject, this.scene), this.parentObject = new o.Object3D, this.parentObject.renderOrder = u.MxData.iMxEntityRenderOrder, this.scene.add(this.parentObject); }, h.prototype.getEntity = function (t) { return this.mapIdToEntity.get(t); }, h.prototype.setRenderOrder = function (t) { var e = this.parentObject.renderOrder; return this.parentObject.renderOrder = t, e; }, h.prototype.eraseEntity = function (t) { this.gripManager.deleteGripData(t), this.selectManager.deleteSelect(t), this.mapIdToEntity.delete(t); }, h.prototype.addEntity = function (t) { return this.mapIdToEntity.set(this.idCount, t), t.setMxDatabase(this), t.setObjectId(this.idCount), t.upDisplay(), this.idCount++; }, h.prototype.getThreeJSParentObject = function () { return this.parentObject; }, h.prototype.getIntersectObjects = function (t) { var e = new o.Raycaster; e.linePrecision = this.mxObj.screenCoordLong2Doc(40); var n = this.mxObj.getCanvas(), i = n.clientWidth, r = n.clientHeight, a = new o.Vector2(t.x / i * 2 - 1, -t.y / r * 2 + 1); return e.setFromCamera(a, this.mxObj.getCamera()), e.intersectObjects(this.parentObject.children, !0); }, h);
|
|
5985
5985
|
function h() { this.mapIdToEntity = new Map, this.mxObj = null, this.scene = null, this.idCount = 1, this.parentObject = null, this.gripManager = new r.MxDbEntityGrip(this), this.selectManager = new a.MxDbEntitySelect(this); }
|
|
5986
5986
|
n.MxDbDatabase = l;
|
|
5987
5987
|
}, { "./MxDbEntity": 35, "./MxDbEntityGrip": 36, "./MxDbEntitySelect": 37, "./MxFun": 45, "./MxManager": 51, "./MxType": 60, three: 19 }], 35: [function (t, e, n) {
|
|
5988
5988
|
"use strict";
|
|
5989
5989
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntity = n.MxDbEntityClassHierarchy = n.MxDbEntityUserObject = void 0;
|
|
5990
|
-
var s = t("three"), l = t("./McGiWorldDraw"), i = t("./MxManager"), r = t("./MxType"), a = (o.prototype.getTypeName = function () { return ""; }, o.prototype.getImp = function () { return this.MxDbEntityImp; }, o.prototype.upDisplay = function () { var t = this.getImp(); return !!t && t.upDisplay(); }, o.prototype.erase = function () { var t = this.getImp(); return !!t && t.erase(); }, o.prototype.setColor = function (t) { this.iColor = t; }, o.prototype.getColor = function () { return this.iColor; }, o.prototype.dwgIn = function (t) { return this.iColor = t.iColor, !0; }, o.prototype.dwgOut = function (t) { return t.iColor = this.iColor, t; }, o.prototype.clone = function (t) { var e = this.create(), n = { type: t || r.MxType.MxCloneType.kClone }; return this.dwgOut(n), e.dwgIn(n), e; }, o.prototype.init = function () { i.MxManager.getMxDbEntityClassHierarchy().init(this); }, o.prototype.transformBy = function (t) { }, o.prototype.objectId = function () { var t = this.getImp(); return t ? t.objectId() : 0; }, o);
|
|
5991
|
-
function o() { this.iColor = 16777215; }
|
|
5990
|
+
var s = t("three"), l = t("./McGiWorldDraw"), i = t("./MxManager"), r = t("./MxType"), a = (o.prototype.getTypeName = function () { return ""; }, o.prototype.getImp = function () { return this.MxDbEntityImp; }, o.prototype.upDisplay = function () { var t = this.getImp(); return !!t && t.upDisplay(); }, o.prototype.erase = function () { var t = this.getImp(); return !!t && t.erase(); }, o.prototype.setColor = function (t) { this.iColor = t; }, o.prototype.getColor = function () { return this.iColor; }, o.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, o.prototype.getRenderOrder = function () { return this.iRenderOrder; }, o.prototype.dwgIn = function (t) { return this.iColor = t.iColor, this.iRenderOrder = t.iRenderOrder, !0; }, o.prototype.dwgOut = function (t) { return t.iColor = this.iColor, t.iRenderOrder = this.iRenderOrder, t; }, o.prototype.clone = function (t) { var e = this.create(), n = { type: t || r.MxType.MxCloneType.kClone }; return this.dwgOut(n), e.dwgIn(n), e; }, o.prototype.init = function () { i.MxManager.getMxDbEntityClassHierarchy().init(this); }, o.prototype.transformBy = function (t) { }, o.prototype.objectId = function () { var t = this.getImp(); return t ? t.objectId() : 0; }, o);
|
|
5991
|
+
function o() { this.iColor = 16777215, this.iRenderOrder = i.MxData.iMxEntityRenderOrder; }
|
|
5992
5992
|
n.MxDbEntityUserObject = a;
|
|
5993
5993
|
var c = (u.prototype.init = function (t) { var e = t.getTypeName(); this.mapType2Create.get(e) && console.log("MxError:already has this class name " + e), this.mapType2Create.set(e, t); }, u.prototype.createMxEntity = function (t) { var e = this.mapType2Create.get(t); return e ? e.create() : null; }, u);
|
|
5994
5994
|
function u() { this.mapType2Create = new Map; }
|
|
@@ -6028,15 +6028,15 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6028
6028
|
} }, g);
|
|
6029
6029
|
function g(t, e, n) { var i = f.call(this) || this; return i.dragBasePt = t, i.grips = e, i.ents = n, i.currPt = t, i; }
|
|
6030
6030
|
n.MxDbEntityGripJig = m;
|
|
6031
|
-
var v = (y.prototype.getAllSelect = function () { var n = []; return this.mapGrips.forEach(function (t, e) { n.push(e); }), n; }, y.prototype.removeAllGrips = function () { if (0 == this.mapGrips.size)
|
|
6032
|
-
return !1; var o = this.
|
|
6031
|
+
var v = (y.prototype.getAllSelect = function () { var n = []; return this.mapGrips.forEach(function (t, e) { n.push(e); }), n; }, y.prototype.getParentObject = function () { return this.database.getMxObject().getTheTempDrawContainer(); }, y.prototype.removeAllGrips = function () { if (0 == this.mapGrips.size)
|
|
6032
|
+
return !1; this.database.getMxObject(); var o = this.getParentObject(); return this.mapGrips.forEach(function (t, e, n) { for (var i = t.length, r = 0; r < i; r++) {
|
|
6033
6033
|
var a = t[r];
|
|
6034
6034
|
s.MxFun.removeThreejsObject(a.threeObject, o);
|
|
6035
|
-
} }), this.mapGrips = new Map, !0; }, y.prototype.deleteGripData = function (t) { var e = this.
|
|
6035
|
+
} }), this.mapGrips = new Map, !0; }, y.prototype.deleteGripData = function (t) { var e = this.getParentObject(), n = this.mapGrips.get(t); if (n)
|
|
6036
6036
|
for (var i = n.length, r = 0; r < i; r++) {
|
|
6037
6037
|
var a = n[r];
|
|
6038
6038
|
s.MxFun.removeThreejsObject(a.threeObject, e);
|
|
6039
|
-
} this.mapGrips.delete(t); }, y.prototype.createGripDisplayObject = function (t) { var e = this.database.getMxObject(), n =
|
|
6039
|
+
} this.mapGrips.delete(t); }, y.prototype.createGripDisplayObject = function (t) { var e = this.database.getMxObject(), n = this.getParentObject(); t.geometry = new c.Geometry; var i = e.screenCoordLong2Doc(8); t.geometry.vertices.push(new c.Vector3(t.point.x - i, t.point.y - i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x - i, t.point.y + i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + i, t.point.y + i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + i, t.point.y - i, 0)), t.geometry.faces.push(new c.Face3(0, 1, 2)), t.geometry.faces.push(new c.Face3(2, 3, 0)), t.geometry.computeFaceNormals(), t.geometry.computeVertexNormals(); var r = new c.MeshBasicMaterial({ color: 255, transparent: !0, depthTest: !1, side: c.DoubleSide, opacity: .9 }), a = new c.Mesh(t.geometry, r); a.renderOrder = o.MxData.iGripRenderOrder, n.add(a), t.threeObject = a; }, y.prototype.addGripData = function (t, e, n) { var i = this.mapGrips.get(t); null == i && (i = new Array, this.mapGrips.set(t, i)); var r = new l; return r.iIndex = e, r.point = new c.Vector3(n.x, n.y, 0), i.push(r), r; }, y.prototype.hitTest = function (t) { var a = this, o = { grips: new Array, ents: new Array, pt: t }, s = new c.Vector3(t.x, t.y, 0), l = this.database.getMxObject().screenCoordLong2Doc(8); return this.mapGrips.forEach(function (t, e) { for (var n = t.length, i = 0; i < n; i++) {
|
|
6040
6040
|
var r = t[i];
|
|
6041
6041
|
if (r.point.distanceTo(s) <= l) {
|
|
6042
6042
|
o.grips.push(r), o.ents.push(a.database.getEntity(e));
|
|
@@ -6062,8 +6062,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6062
6062
|
}, { "./McGiWorldDraw": 21, "./MxDrawData": 40, "./MxFun": 45, "./MxJig": 47, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxType": 60, three: 19 }], 37: [function (t, e, n) {
|
|
6063
6063
|
"use strict";
|
|
6064
6064
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntitySelect = void 0;
|
|
6065
|
-
var d = t("three"), a = t("./MxFun"), p = t("three.meshline"), r = t("./McGiWorldDraw"), i = t("./MxManager"), o = (s.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, s.prototype.getRenderOrder = function () { return this.iRenderOrder; }, s.prototype.setCanvasSize = function (t, e) { this.canvasWidth == t && this.canvasHeight == e || (this.canvasWidth = t, this.canvasHeight = e, this.material.resolution = new d.Vector2(this.canvasWidth, this.canvasHeight), this.material.needsUpdate = !0); }, s.prototype.removeAllEntity = function () { var i = this.
|
|
6066
|
-
a.MxFun.removeThreejsObject(t[n], i); }), this.mapIdToThreeObject.clear(), !0); }, s.prototype.isEmptySelect = function () { return 0 == this.mapIdToThreeObject.size; }, s.prototype.deleteSelect = function (t) { var e = this.
|
|
6065
|
+
var d = t("three"), a = t("./MxFun"), p = t("three.meshline"), r = t("./McGiWorldDraw"), i = t("./MxManager"), o = (s.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, s.prototype.getRenderOrder = function () { return this.iRenderOrder; }, s.prototype.setCanvasSize = function (t, e) { this.canvasWidth == t && this.canvasHeight == e || (this.canvasWidth = t, this.canvasHeight = e, this.material.resolution = new d.Vector2(this.canvasWidth, this.canvasHeight), this.material.needsUpdate = !0); }, s.prototype.removeAllEntity = function () { var i = this.getParentObject(); return 0 != this.mapIdToThreeObject.size && (this.mapIdToThreeObject.forEach(function (t) { for (var e = t.length, n = 0; n < e; n++)
|
|
6066
|
+
a.MxFun.removeThreejsObject(t[n], i); }), this.mapIdToThreeObject.clear(), !0); }, s.prototype.isEmptySelect = function () { return 0 == this.mapIdToThreeObject.size; }, s.prototype.getParentObject = function () { return this.mxDatabase.getMxObject().getTheTempDrawContainer(); }, s.prototype.deleteSelect = function (t) { var e = this.getParentObject(), n = this.mapIdToThreeObject.get(t); if (n) {
|
|
6067
6067
|
for (var i = n.length, r = 0; r < i; r++)
|
|
6068
6068
|
a.MxFun.removeThreejsObject(n[r], e);
|
|
6069
6069
|
this.mapIdToThreeObject.delete(t);
|
|
@@ -6071,7 +6071,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6071
6071
|
i.vertices.push(i.vertices[0]);
|
|
6072
6072
|
var r = 3 * i.vertices.length;
|
|
6073
6073
|
if (0 != r) {
|
|
6074
|
-
for (var a = this.
|
|
6074
|
+
for (var a = this.getParentObject(), o = new Float32Array(r), s = 0, l = 0; s + 2 < r; s += 3, l++)
|
|
6075
6075
|
o[s] = i.vertices[l].x + e.x, o[s + 1] = i.vertices[l].y + e.y, o[s + 2] = e.z;
|
|
6076
6076
|
var c = new p.MeshLine;
|
|
6077
6077
|
c.setGeometry(o);
|
|
@@ -6080,7 +6080,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6080
6080
|
var h = this.mapIdToThreeObject.get(t);
|
|
6081
6081
|
h || (h = new Array, this.mapIdToThreeObject.set(t, h)), h.push(u);
|
|
6082
6082
|
}
|
|
6083
|
-
} }, s.prototype.addLineDisplay = function (t, e, n) { var i = this.
|
|
6083
|
+
} }, s.prototype.addLineDisplay = function (t, e, n) { var i = this.getParentObject(), r = new Float32Array(6); r[0] = e.x, r[1] = e.y, r[2] = 0, r[3] = n.x, r[4] = n.y, r[5] = 0; var a = new p.MeshLine; a.setGeometry(r); var o = new d.Mesh(a.geometry, this.material); o.renderOrder = this.iRenderOrder, i.add(o); var s = this.mapIdToThreeObject.get(t); s || (s = new Array, this.mapIdToThreeObject.set(t, s)), s.push(o); }, s);
|
|
6084
6084
|
function s(t) { this.mapIdToThreeObject = new Map, this.canvasWidth = 800, this.canvasHeight = 500, this.mxDatabase = null, this.material = new p.MeshLineMaterial({ useMap: !1, color: new d.Color(2641557), opacity: .8, resolution: new d.Vector2(800, 500), sizeAttenuation: !1, lineWidth: 10, transparent: !0, depthTest: !1 }), this.iRenderOrder = i.MxData.iSelectRenderOrder, this.mxDatabase = t; }
|
|
6085
6085
|
n.MxDbEntitySelect = o;
|
|
6086
6086
|
}, { "./McGiWorldDraw": 21, "./MxFun": 45, "./MxManager": 51, three: 19, "three.meshline": 18 }], 38: [function (t, e, n) {
|
|
@@ -6105,7 +6105,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6105
6105
|
e.doPointSelect(a.MxFun.getCurrentMx(), t.pt1, function (t) { if (0 != JSON.parse(t).lCount) {
|
|
6106
6106
|
r.getMxCAD().getGrip().onIntelliSelect(t);
|
|
6107
6107
|
var e = l.MxWindowsEvent.getCurrentMousePostion();
|
|
6108
|
-
if (r.
|
|
6108
|
+
if (r.screenCoord2Doc(e.x, e.y, 0).distanceTo(i) < r.screenCoordLong2Doc(10)) {
|
|
6109
6109
|
var n = s.MxJigCmdManager.getCurCmd();
|
|
6110
6110
|
n && "MxIntelliSelect" == n.getTypeName() && s.MxJigCmdManager.stopCmd();
|
|
6111
6111
|
}
|
|
@@ -6115,7 +6115,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6115
6115
|
function h(t) { if (null != t && null != t.pt) {
|
|
6116
6116
|
var e = a.MxFun.getCurrentMx(), n = t.pt;
|
|
6117
6117
|
if (!e.getMxDatabase().getGripManager().doPointSelect(n) && c.MxDrawData.m_isMultipleSelect) {
|
|
6118
|
-
var i = e.
|
|
6118
|
+
var i = e.screenCoord2Doc(n.x, n.y, 0), r = new o.MxIntelliSelectJig(i, !0);
|
|
6119
6119
|
r.setDisableDynInput(!0), r.setDisableOsnap(!0), s.MxJigCmdManager.runCmd(r);
|
|
6120
6120
|
}
|
|
6121
6121
|
} }
|
|
@@ -6130,7 +6130,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6130
6130
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawObject = n.IniSetName = n.MxRunMode = void 0;
|
|
6131
6131
|
var s, i, r, c = t("three"), u = t("./MxFun"), a = t("./MxCadSketchLayer"), o = t("./MxBrowseLayerData"), l = t("./MxBrowseDisplay"), O = t("./MxNetData"), h = t("./MxNetData"), d = t("./MxSelect"), p = t("./MxManager"), f = t("./MxJigCmdManager"), m = t("./MxSystemVariable"), g = t("./MxCADObject"), v = t("./MxLocalFileLoad"), y = t("./MxDrawObjectOsnap"), x = t("./MxDbDatabase"), w = t("./MxDbEntity");
|
|
6132
6132
|
(i = s = n.MxRunMode || (n.MxRunMode = {}))[i.kBrowse = 1] = "kBrowse", i[i.kMxCAD = 2] = "kMxCAD", i[i.kMxCADBrowseApp = 3] = "kMxCADBrowseApp", (r = n.IniSetName || (n.IniSetName = {})).kEnableOsnapFunction = "EnableOsnapFunction";
|
|
6133
|
-
var b = (_.prototype.getMxDatabase = function () { return this.m_mxDatabase; }, _.prototype.addMxEntity = function (t) { var e = new w.MxDbEntity; return e.initUserObject(t), this.m_mxDatabase.addEntity(e); }, _.prototype.getMxEntity = function (t) { return this.m_mxDatabase.getEntity(t); }, _.prototype.getMxEntityUserObject = function (t) { var e = this.getMxEntity(t); return e ? e.getUserObject() : null; }, _.prototype.eraseAllMxEntity = function () { this.m_mxDatabase.eraseAllEntity(); }, _.prototype.eraseMxEntity = function (t) { var e = this.m_mxDatabase.getEntity(t); return !!e && e.erase(); }, _.prototype.getAllMxEntity = function () { var e = []; return this.m_mxDatabase.getAllEntity().forEach(function (t) { t && e.push(t.getUserObject()); }), e; }, _.prototype.findMxEntityAtPoint = function (t, e) { e && (t = this.
|
|
6133
|
+
var b = (_.prototype.getMxDatabase = function () { return this.m_mxDatabase; }, _.prototype.addMxEntity = function (t) { var e = new w.MxDbEntity; return e.initUserObject(t), this.m_mxDatabase.addEntity(e); }, _.prototype.getMxEntity = function (t) { return this.m_mxDatabase.getEntity(t); }, _.prototype.getMxEntityUserObject = function (t) { var e = this.getMxEntity(t); return e ? e.getUserObject() : null; }, _.prototype.eraseAllMxEntity = function () { this.m_mxDatabase.eraseAllEntity(); }, _.prototype.eraseMxEntity = function (t) { var e = this.m_mxDatabase.getEntity(t); return !!e && e.erase(); }, _.prototype.getAllMxEntity = function () { var e = []; return this.m_mxDatabase.getAllEntity().forEach(function (t) { t && e.push(t.getUserObject()); }), e; }, _.prototype.findMxEntityAtPoint = function (t, e) { !e && void 0 !== e || (t = this.docCoord2Screen(t.x, t.y, 0)); var n = [], i = this.m_mxDatabase.getIntersectObjects(t); if (0 == i.length)
|
|
6134
6134
|
return n; var r = new Map; return i.forEach(function (t) { var e = t.object.MxDbEntity; if (e) {
|
|
6135
6135
|
var n = e.objectId();
|
|
6136
6136
|
r.has(n) || r.set(n, e.getUserObject());
|
|
@@ -6156,8 +6156,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6156
6156
|
var e = new h.MxNet;
|
|
6157
6157
|
e.init(this, !1), this._extRefManager.createTzDwgExternalReferences(99999), e.setCurrentDatabaseId(99999), this._staticLoadTzNet = new h.MxHFileLoad(e), this._staticLoadTzNet.setShowloading(!1), this._staticLoadTzNet.setRequestHeader(this._requestHeader), this._staticLoadTzNet.load(this._tzDwgStaticFile);
|
|
6158
6158
|
}
|
|
6159
|
-
} }, _.prototype.getStaticNet = function () { return this._staticNet; }, _.prototype.isStaticFileNet = function () { return !this._isStaticLocalLoad && null != this._staticNet; }, _.prototype.getStaticLocalNet = function () { return this._staticLocalNet; }, _.prototype.getStaticLoadTzNet = function () { return this._staticLoadTzNet; }, _.prototype.getViewWidth = function () { return null != this._userCanvas ? this._userCanvas.clientWidth : this._viewWidth; }, _.prototype.getViewHeight = function () { return null != this._userCanvas ? this._userCanvas.clientHeight : this._viewHeight; }, _.prototype.makeCurrent = function () { p.MxManager.setCurrentMx(this); }, _.prototype.createCanvasImageData = function (e, t) { var n = this, i = 0, r = 0, a = !1; t && t.width && t.height && (i = this.getViewWidth(), r = this.getViewHeight(), a = !0, this.setSize(t.width, t.height)), this._callCreateCanvasImageData = function (t) { a && n.setSize(i, r), e(t); }, this.updateDisplay(); }, _.prototype.getIntersectObjects = function (t) { var e = new c.Raycaster; e.linePrecision = this.
|
|
6160
|
-
this.threejsselectObjects.remove(this.threejsselectObjects.children[0]); }, _.prototype.removeObject = function (t
|
|
6159
|
+
} }, _.prototype.getStaticNet = function () { return this._staticNet; }, _.prototype.isStaticFileNet = function () { return !this._isStaticLocalLoad && null != this._staticNet; }, _.prototype.getStaticLocalNet = function () { return this._staticLocalNet; }, _.prototype.getStaticLoadTzNet = function () { return this._staticLoadTzNet; }, _.prototype.getViewWidth = function () { return null != this._userCanvas ? this._userCanvas.clientWidth : this._viewWidth; }, _.prototype.getViewHeight = function () { return null != this._userCanvas ? this._userCanvas.clientHeight : this._viewHeight; }, _.prototype.makeCurrent = function () { p.MxManager.setCurrentMx(this); }, _.prototype.createCanvasImageData = function (e, t) { var n = this, i = 0, r = 0, a = !1; t && t.width && t.height && (i = this.getViewWidth(), r = this.getViewHeight(), a = !0, this.setSize(t.width, t.height)), this._callCreateCanvasImageData = function (t) { a && n.setSize(i, r), e(t); }, this.updateDisplay(); }, _.prototype.getIntersectObjects = function (t) { var e = new c.Raycaster; e.linePrecision = this.screenCoordLong2Doc(4); var n = this.getCanvas(), i = n.clientWidth, r = n.clientHeight; return t = new c.Vector2(t.x / i * 2 - 1, -t.y / r * 2 + 1), e.setFromCamera(t, this.camera), e.intersectObjects(this.threejsselectObjects.children, !0); }, _.prototype.addObject = function (t) { this.threejsselectObjects.add(t); }, _.prototype.removeAllSelectObject = function () { for (; this.threejsselectObjects.children.length;)
|
|
6160
|
+
this.threejsselectObjects.remove(this.threejsselectObjects.children[0]); }, _.prototype.removeObject = function (t) { this.threejsselectObjects.remove(t); }, _.prototype.render = function () { this.secenView ? (this.renderer.autoClear = !0, this.renderer.render(this.secenView, this.cameraView), this.renderer.autoClear = !1) : this.renderer.autoClear = !0, this.renderer.render(this.scene, this.camera), null != this._callCreateCanvasImageData && (this._callCreateCanvasImageData(this.renderer.domElement.toDataURL("image/png")), this._callCreateCanvasImageData = void 0), this.callEvent("render", this.renderer); }, _.prototype.updateDisplay = function (t) { function e() { n.m_mxDatabase.upDirtyDisplay(), n._isAnimation ? (n._isAnimationStarting = !0, requestAnimationFrame(this.needRander)) : n._isWaiteCount = 0, n.render(); } void 0 === t && (t = !1); var n = this; !0 !== t ? this._isAnimationStarting || (this._isAnimation ? requestAnimationFrame(e) : ((5 < this._isWaiteCount || this._isWaiteCount < 0) && (this._isWaiteCount = 0), this._isWaiteCount <= 0 && requestAnimationFrame(e), this._isWaiteCount++)) : e(); }, _.prototype.gotoLayout = function (t) { "Modle" == t && (t = ""); var e = this._openFile; for (var n in this._iniParam)
|
|
6161
6161
|
"srcname" == (o = (a = this._iniParam[n])[0]) && (e = a[1]); var i = {}, r = ""; for (var n in this._iniParam) {
|
|
6162
6162
|
var a, o;
|
|
6163
6163
|
if (null == i[o = (a = this._iniParam[n])[0]]) {
|
|
@@ -6173,10 +6173,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6173
6173
|
continue;
|
|
6174
6174
|
0 == r.length ? r = o + "=" + s + "&srcname=" + e : r += "&" + o + "=" + s;
|
|
6175
6175
|
}
|
|
6176
|
-
} var c = u.MxFun.getLocationPageUrl() + "?" + r; window.location.href = c; }, _.prototype.addInitParam = function (t, e) { var n = new Array; n.push(t), n.push(e), this._iniParam.push(n); }, _.prototype.
|
|
6176
|
+
} var c = u.MxFun.getLocationPageUrl() + "?" + r; window.location.href = c; }, _.prototype.addInitParam = function (t, e) { var n = new Array; n.push(t), n.push(e), this._iniParam.push(n); }, _.prototype.openFile = function (t) { if (!this._isCreate)
|
|
6177
|
+
return console.log("mx: openFile Fialed mxasser(_isCreate == false)"), !1; if (0 == t.length)
|
|
6178
|
+
return !1; this.reInit(), this._devicePixelRatio = window.devicePixelRatio, this._openFile = t, this._openFileExtName = t.substring(t.lastIndexOf(".") + 1), this._iniParam = []; var e = new Array; return e.push("file"), e.push(this._openFile), this._iniParam.push(e), this.onLoad(), !0; }, _.prototype.create = function (t, e) { if (this._callCreateCanvasImageData = void 0, this._devicePixelRatio = window.devicePixelRatio, this._openFile = e, this._iniParam = u.MxFun.getUrlParams(), this._openFileExtName = e.substring(e.lastIndexOf(".") + 1), "" != this._openFile && this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp) {
|
|
6177
6179
|
var n = new Array;
|
|
6178
6180
|
n.push("file"), n.push(this._openFile), this._iniParam.push(n);
|
|
6179
|
-
} "" != this._userIdentitySign && (this.addInitParam("userIdentitySign", this._userIdentitySign), this.addInitParam("userRandomToken", this._userRandomToken)), this.addInitParam("runMode", this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? "mxcad" : "browse"), this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? ("empty" == this._openFile && (this._openFile = ""), this._mxCAD = new g.MxCADObject(this)) : this._mxCAD = null, this._userCanvas = t; var i = window.innerWidth, r = window.innerHeight; null != t && (i = t.clientWidth, r = t.clientHeight), this._viewWidth = i, this._viewHeight = r, this.m_mxDatabase.getSelectManager().setCanvasSize(i, r), this.onInitThreejs(), this.onCreate(), this.m_mxDatabase.init(this), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this._is2d && (this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp || (this.controls.mouseButtons.LEFT = -1, this.controls.mouseButtons.RIGHT = -1, this.controls.mouseButtons.MIDDLE = c.MOUSE.PAN)), this._select = new d.MxSelect(this, this.getCanvas()), this._select.enabled = u.MxFun.isEnableSelect(), this._select.init(), this._is2d || (this._select.enabled = !1), this._runMode != s.kBrowse && (this._select.enabled = !1), p.MxManager.add(this), p.MxManager.setCurrentMx(this); var a = this; if (this.controls.addEventListener("change", function () { f.MxJigCmdManager.OnThreeControlsChage(), a.callEvent("viewchange"); var t = a.getMxCAD(); t && t.getGrip().onControlsChage(), a.updateDisplay(); }), this.updateDisplay(), null == t)
|
|
6181
|
+
} "" != this._userIdentitySign && (this.addInitParam("userIdentitySign", this._userIdentitySign), this.addInitParam("userRandomToken", this._userRandomToken)), this.addInitParam("runMode", this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? "mxcad" : "browse"), this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? ("empty" == this._openFile && (this._openFile = ""), this._mxCAD = new g.MxCADObject(this)) : this._mxCAD = null, this._userCanvas = t; var i = window.innerWidth, r = window.innerHeight; null != t && (i = t.clientWidth, r = t.clientHeight), this._viewWidth = i, this._viewHeight = r, this.m_mxDatabase.getSelectManager().setCanvasSize(i, r), this.onInitThreejs(), this.onCreate(), this.m_mxDatabase.init(this), this._parentDocObject = new c.Object3D, this.scene.add(this._parentDocObject), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this._is2d && (this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp || (this.controls.mouseButtons.LEFT = -1, this.controls.mouseButtons.RIGHT = -1, this.controls.mouseButtons.MIDDLE = c.MOUSE.PAN)), this._select = new d.MxSelect(this, this.getCanvas()), this._select.enabled = u.MxFun.isEnableSelect(), this._select.init(), this._is2d || (this._select.enabled = !1), this._runMode != s.kBrowse && (this._select.enabled = !1), p.MxManager.add(this), p.MxManager.setCurrentMx(this); var a = this; if (this.controls.addEventListener("change", function () { f.MxJigCmdManager.OnThreeControlsChage(), a.callEvent("viewchange"); var t = a.getMxCAD(); t && t.getGrip().onControlsChage(), a.updateDisplay(); }), this.updateDisplay(), null == t)
|
|
6180
6182
|
window.addEventListener("resize", function () { a._viewWidth = window.innerWidth, a._viewHeight = window.innerHeight, a.onResizeImp(), a.updateDisplay(); }, !1);
|
|
6181
6183
|
else {
|
|
6182
6184
|
var o = function () { if (a._viewWidth = a._userCanvas.clientWidth, a._viewHeight = a._userCanvas.clientHeight, null != a._event.onResize) {
|
|
@@ -6184,7 +6186,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6184
6186
|
null != t && (a._viewWidth = parseInt(t.width), a._viewHeight = parseInt(t.height));
|
|
6185
6187
|
} a.onResizeImp(a._viewWidth, a._viewHeight), a.updateDisplay(); };
|
|
6186
6188
|
null != this._event.addResizeEvent ? this._event.addResizeEvent(o, t) : window.addEventListener("resize", o, !1), null != this._event.onResize && (o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(); }, 600); }, 200); }, 50); }, 20));
|
|
6187
|
-
} this.onLoad(); }, _.prototype.initResize = function () { if (null == this._userCanvas)
|
|
6189
|
+
} this.onLoad(), this._isCreate = !0; }, _.prototype.initResize = function () { if (null == this._userCanvas)
|
|
6188
6190
|
this._viewWidth = window.innerWidth, this._viewHeight = window.innerHeight, this.onResizeImp();
|
|
6189
6191
|
else {
|
|
6190
6192
|
if (this._viewWidth = this._userCanvas.clientWidth, this._viewHeight = this._userCanvas.clientHeight, null != this._event.onResize) {
|
|
@@ -6195,7 +6197,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6195
6197
|
} this.updateDisplay(); }, _.prototype.is2D = function () { return this._is2d; }, _.prototype.getOpenFile = function () { return this._openFile; }, _.prototype.getFileTitle = function () { var t = this._openFile; if ("wgh" == this._openFile.substring(this._openFile.lastIndexOf(".") + 1).toLowerCase()) {
|
|
6196
6198
|
var e = this._openFile.substring(0, this._openFile.indexOf(".mxb1.wgh")).split("/");
|
|
6197
6199
|
"$" == (t = 1 == e.length ? e[0] : e[e.length - 1])[0] && (t = t.substring(1));
|
|
6198
|
-
} return t; }, _.prototype.getIniParam = function () { return this._iniParam; }, _.prototype.getOpenFileExtName = function () { return this._openFileExtName; }, _.prototype.loadCodeToServer = function (t, e) { this._net.getSend().CallLoadCodeToServer(t, e); }, _.prototype.
|
|
6200
|
+
} return t; }, _.prototype.getIniParam = function () { return this._iniParam; }, _.prototype.getOpenFileExtName = function () { return this._openFileExtName; }, _.prototype.loadCodeToServer = function (t, e) { this._net.getSend().CallLoadCodeToServer(t, e); }, _.prototype.userLogin = function (t, e) { this._net.getSend().UserLogin(t, e); }, _.prototype.getUserCanvas = function () { return this._userCanvas; }, _.prototype.getCanvas = function () { return null != this._userCanvas ? this._userCanvas : this.renderer.domElement; }, _.prototype.getScene = function () { return this.scene; }, _.prototype.getCamera = function () { return this.camera; }, _.prototype.callCommand = function (t, e, n) { void 0 === e && (e = ""), this._net.getSend().DoCommand(t, e, n); }, _.prototype.undoMark = function () { this._net.getSend().UndoMark(); }, _.prototype.loadCodeFileToServer = function (t, e, n) { var i = '{"path":"' + t + '","reload":' + (null != n ? "true" : "false") + "}"; this._net.getSend().DoCommand("Mx_LoadCodeFormServerFile", i, e); }, _.prototype.deleteAll = function () { this.removeAllEntity(), this.callCommand("Mx_ClearAll"), this.updateDisplay(); }, _.prototype.undo = function () { this.callCommand("Mx_Undo"); }, _.prototype.save = function () { this.callCommand("Mx_Save"); }, _.prototype.initAllLayoutName = function (t) { this._allLayoutName = t; }, _.prototype.getAllLayoutName = function () { return this._allLayoutName; }, _.prototype.updataClipMaterial = function () { this._blocks.updataClipMaterial(this); }, _.prototype.getSketchLayers = function () { return this._sketchLayers; }, _.prototype.getExtRefManager = function () { return this._extRefManager; }, _.prototype.showLayer = function (t, e, n) { "string" == typeof t && (t = this._layers.getLayerIdForName(t)), n ? this._sketchLayers.getLayer(t).show(e) : this._blocks.showLayer(t, e), this.updateDisplay(); }, _.prototype.addLayerInfo = function (t, e, n) { e = this.automaticInversionColor(16777215 & e), this._layers.add(t, e, n); }, _.prototype.setZeroLayerId = function (t) { this._layers.setZeroLayerId(t); }, _.prototype.addLayerInfoComplete = function () { this._layers.initComplete(); }, _.prototype.addEntity = function (t, e) { var n = this._mapId2Entity.get(t); null == n && (n = new Array, this._mapId2Entity.set(t, n)), n.push(e); }, _.prototype.getEntity = function (t) { return this._mapId2Entity.get(t); }, _.prototype.clearThreejsScence = function () { this.scene.remove(), this.scene.dispose(), this.scene = new c.Scene, this.scene.background = new c.Color(this._viewcolor), u.MxFun.removeThreejsObject(this.threejsselectObjects, this.scene), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), u.MxFun.removeThreejsObject(this._parentDocObject, this.scene), this._parentDocObject = new c.Object3D, this.scene.add(this._parentDocObject), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this.m_mxDatabase.init(this), this.onInitScene(); }, _.prototype.reInit = function () { this.clearThreejsScence(), this._openFile = "", this._openFileExtName = "", this._select.removeAll(), this._is2d || (this._select.enabled = !1), this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._tzDwgStaticFile = "", this._devicePixelRatio = window.devicePixelRatio, this._blocks.initRootBlockRef(); }, _.prototype.removeEntity = function (t) { if (null == this._setAdyDelete[t]) {
|
|
6199
6201
|
this._setAdyDelete[t] = !0;
|
|
6200
6202
|
var e = this._mapId2Entity.get(t);
|
|
6201
6203
|
if (null != e) {
|
|
@@ -6207,7 +6209,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6207
6209
|
var i = t.getInt32(4 * (n + 20), !0);
|
|
6208
6210
|
this.removeEntity(i);
|
|
6209
6211
|
} }, _.prototype.removeAllEntity = function () { var r = this; this._mapId2Entity.forEach(function (t, e, n) { for (var i in t)
|
|
6210
|
-
r.scene.remove(t[i]); }), this._mapId2Entity.clear(), this._sketchLayers.removeAllEntity(); }, _.prototype.mxWebAddEntity = function (t) { this._setAdyDelete.clear(); var e = this.mxWebAddEntity_3DChild(t); this.mxWebAddEntity_Curve(t, e), this._setAdyDelete.clear(); }, _.prototype.screenCoord2World = function (t, e, n) { var i = this.getCanvas(), r = i.clientWidth, a = i.clientHeight; n = .5; var o = this.camera; o && o.isOrthographicCamera && (n = (o.near + o.far) / (o.near - o.far)); var s = new c.Vector3(t / r * 2 - 1, -e / a * 2 + 1, n); return s.unproject(this.camera), s; }, _.prototype.worldCoord2Screen = function (t, e, n) { var i = new c.Vector3(t, e, n).project(this.camera), r = this.getCanvas(), a = r.clientWidth / 2, o = r.clientHeight / 2, s = Math.round(i.x * a + a), l = Math.round(-i.y * o + o); return new c.Vector3(s, l, 0); }, _.prototype.worldCoordLong2Doc = function (t) { var e = this.worldCoord2Doc(0, 0, 0), n = this.worldCoord2Doc(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoordLong2World = function (t) { var e = this.docCoord2World(0, 0, 0), n = this.docCoord2World(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoord2World = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._doc2World), i; }, _.prototype.worldCoord2Doc = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._word2doc), i; }, _.prototype.screenCoord2Doc = function (t, e, n) { var i = this.screenCoord2World(t, e, n); return this.worldCoord2Doc(i.x, i.y,
|
|
6212
|
+
r.scene.remove(t[i]); }), this._mapId2Entity.clear(), this._sketchLayers.removeAllEntity(); }, _.prototype.mxWebAddEntity = function (t) { this._setAdyDelete.clear(); var e = this.mxWebAddEntity_3DChild(t); this.mxWebAddEntity_Curve(t, e), this._setAdyDelete.clear(); }, _.prototype.screenCoord2World = function (t, e, n) { var i = this.getCanvas(), r = i.clientWidth, a = i.clientHeight; n = .5; var o = this.camera; o && o.isOrthographicCamera && (n = (o.near + o.far) / (o.near - o.far)); var s = new c.Vector3(t / r * 2 - 1, -e / a * 2 + 1, n); return s.unproject(this.camera), s; }, _.prototype.worldCoord2Screen = function (t, e, n) { var i = new c.Vector3(t, e, n).project(this.camera), r = this.getCanvas(), a = r.clientWidth / 2, o = r.clientHeight / 2, s = Math.round(i.x * a + a), l = Math.round(-i.y * o + o); return new c.Vector3(s, l, 0); }, _.prototype.worldCoordLong2Doc = function (t) { var e = this.worldCoord2Doc(0, 0, 0), n = this.worldCoord2Doc(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoordLong2World = function (t) { var e = this.docCoord2World(0, 0, 0), n = this.docCoord2World(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoord2World = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._doc2World), i; }, _.prototype.worldCoord2Doc = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._word2doc), i; }, _.prototype.screenCoord2Doc = function (t, e, n) { var i = this.screenCoord2World(t, e, n); return this.worldCoord2Doc(i.x, i.y, 0); }, _.prototype.docCoord2Screen = function (t, e, n) { var i = this.docCoord2World(t, e, n); return this.worldCoord2Screen(i.x, i.y, i.z); }, _.prototype.screenCoordLong2Doc = function (t) { var e = this.screenCoord2Doc(0, 0, 0), n = this.screenCoord2Doc(t, 0, 0); return e.distanceTo(n); }, _.prototype.screenCoordLong2DocScale = function () { var t = this.screenCoord2Doc(0, 0, 0), e = this.screenCoord2Doc(1, 0, 0); return t.distanceTo(e); }, _.prototype.docCoordLong2Screen = function (t) { var e = this.docCoord2Screen(0, 0, 0), n = this.docCoord2Screen(t, 0, 0); return e.distanceTo(n); }, _.prototype.screenCoordLong2World = function (t) { var e = this.screenCoord2World(0, 0, 0), n = this.screenCoord2World(t, 0, 0); return e.distanceTo(n); }, _.prototype.worldCoordLong2Screen = function (t) { var e = this.worldCoord2Screen(0, 0, 0), n = this.worldCoord2Screen(t, 0, 0); return e.distanceTo(n); }, _.prototype.intiDoc2Wold = function (t) { this._doc2World.fromArray(t), this._word2doc.getInverse(this._doc2World), this.m_mxDatabase.intiDoc2Wold(this._doc2World), this._parentDocObject.matrix = this._doc2World, this._parentDocObject.matrixAutoUpdate = !1, this.threejsselectObjects.matrix = this._doc2World, this.threejsselectObjects.matrixAutoUpdate = !1; }, _.prototype.getDrawContainer = function () { return this.threejsselectObjects; }, _.prototype.getTheTempDrawContainer = function () { return this._parentDocObject; }, _.prototype.enableSingleTouchPan = function (t) { this.controls.enablePan = t; }, _.prototype.mxWebAddEntityFor2dPointMeshBuffers = function (t, e) { var n = new O.MxNetData(t), i = n.getdPointMeshBuffersHead(), r = i.zeroLayerIdIndex, a = i.databaseIndex; -1 != e && (a = e); for (var o = i.datasize, s = 0; s < i.datacount; s++) {
|
|
6211
6213
|
var l = n.getdPointMeshBufferDataHead(o);
|
|
6212
6214
|
o = l.offset;
|
|
6213
6215
|
var c = l.layerId, u = c == r, h = l.blkId, d = l.pointCount;
|
|
@@ -6312,7 +6314,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6312
6314
|
C.addGeometryMesh(l, c, r, h, u, d), M.createThreejsObj(C, this, S);
|
|
6313
6315
|
}
|
|
6314
6316
|
} }, _.prototype.mxWebCreateAllBlocks = function (t, e) { var n = new O.MxNetData(t).getDatabaseIndex(); -1 != e && (n = e); var i = this._blocks; 0 != n && (i = this._extRefManager.getBlocks(n)), i.createBlocks(t, this.scene); }, _.prototype.mxWebEntitysData = function (t, e) { -1 == e && this._objectsOsnap.mxWebEntitysData(t, e); }, _.prototype.getObjectOsnap = function () { return this._objectsOsnap; }, _.prototype.saveMxEntityToJson = function () { return this.m_mxDatabase.saveJson(); }, _.prototype.loadMxEntityFromJson = function (t) { return this.m_mxDatabase.loadJson(t); }, _);
|
|
6315
|
-
function _() { this._is2d = !0, this._runMode = s.kBrowse, this._mxCAD = null, this._userCanvas = null, this._openFile = "empty", this._openFileExtName = "", this._userIdentitySign = "", this._rendererParam = void 0, this._userRandomToken = "", this._isCreate = !1, this.m_iniSet = {}, this._net = null, this._staticNet = null, this._staticLoadTzNet = null, this._staticLocalNet = null, this._isStaticLocalLoad = !1, this._staticLocalLoadPath = "", this._viewWidth = 1, this._viewHeight = 1, this.m_sysVariable = new m.MxSystemVariable, this._color = "#FFFFFF", this._viewcolor = 15790320, this._isAnimation = !1, this._isAnimationStarting = !1, this._isWaiteCount = 0, this._callCreateCanvasImageData = void 0, this._event = {}, this.scene = null, this.camera = null, this.secenView = null, this.cameraView = null, this.renderer = null, this.controls = null, this.
|
|
6317
|
+
function _() { this._is2d = !0, this._runMode = s.kBrowse, this._mxCAD = null, this._userCanvas = null, this._openFile = "empty", this._openFileExtName = "", this._userIdentitySign = "", this._rendererParam = void 0, this._userRandomToken = "", this._isCreate = !1, this.m_iniSet = {}, this._net = null, this._staticNet = null, this._staticLoadTzNet = null, this._staticLocalNet = null, this._isStaticLocalLoad = !1, this._staticLocalLoadPath = "", this._viewWidth = 1, this._viewHeight = 1, this.m_sysVariable = new m.MxSystemVariable, this._color = "#FFFFFF", this._viewcolor = 15790320, this._isAnimation = !1, this._isAnimationStarting = !1, this._isWaiteCount = 0, this._callCreateCanvasImageData = void 0, this._event = {}, this.scene = null, this.camera = null, this.secenView = null, this.cameraView = null, this.renderer = null, this.controls = null, this.threejsselectObjectsView = null, this._mouseRightRotate = !0, this._isMouseMiddlePan = -1, this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._devicePixelRatio = 1, this._tzDwgStaticFile = "", this._requestHeader = "", this._objectsOsnap = null, this._initZoomwCoordPt1 = null, this._initZoomWCoordPt2 = null, this.m_mxDatabase = null, this._parentDocObject = null, this.threejsselectObjects = null, this._blocks.initRootBlockRef(), this.m_iniSet[r.kEnableOsnapFunction] = !1, this.m_sysVariable.init(this), this.m_mxDatabase = new x.MxDbDatabase; }
|
|
6316
6318
|
n.MxDrawObject = b;
|
|
6317
6319
|
}, { "./MxBrowseDisplay": 24, "./MxBrowseLayerData": 25, "./MxCADObject": 29, "./MxCadSketchLayer": 32, "./MxDbDatabase": 34, "./MxDbEntity": 35, "./MxDrawObjectOsnap": 44, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxNetData": 53, "./MxSelect": 54, "./MxSystemVariable": 57, three: 19 }], 42: [function (t, e, n) {
|
|
6318
6320
|
"use strict";
|
|
@@ -6328,7 +6330,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6328
6330
|
l.left = -c * u, l.right = c * u, l.top = c, l.bottom = -c;
|
|
6329
6331
|
}
|
|
6330
6332
|
else
|
|
6331
|
-
c = .5 * o, u = a / r, l.left = -c, l.right = c, l.top = c * u, l.bottom = -c * u; var h = o, d = s, p = h; p < h && (p = d), l.far = p; var f = t.x + .5 * h, m = t.y + .5 * d; l.zoom = 1, l.position.set(f, m, .5 * p), l.lookAt(new g.Vector3(f, m, 0)), l.updateProjectionMatrix(), this.controls.target.x = f, this.controls.target.y = m, this.controls.target.z = 0, this.controls.update(); }, d.prototype.zoomScale = function (t) { var e = this.getOrthographicCamera(); e.zoom = Math.max(this.controls.minZoom, Math.min(this.controls.maxZoom, e.zoom * t)), e.updateProjectionMatrix(), this.controls.update(); }, d.prototype.zoomCenter = function (t, e) { var n = this.getOrthographicCamera(), i = this.docCoord2World(t, e, 0); t = i.x, e = i.y, n.position.set(t, e, n.position.z), n.lookAt(new g.Vector3(t, e, 0)), n.updateProjectionMatrix(), this.controls.target.x = t, this.controls.target.y = e, this.controls.target.z = 0, this.controls.update(); }, d.prototype.calcCameraUp = function (t) { var e = new g.Vector3(0, 1, 0), n = new g.Matrix4; return n.makeRotationZ(t), e.applyMatrix4(n), e; }, d.prototype.updateCameraDisplayRange = function (t, e, n) { null != this._initZoomwCoordPt1 && null != this._initZoomWCoordPt2 ? (this._minDisplayPoint = this.docCoord2World(this._initZoomwCoordPt1.x, this._initZoomwCoordPt1.y, 0), this._maxDisplayPoint = this.docCoord2World(this._initZoomWCoordPt2.x, this._initZoomWCoordPt2.y, 0)) : (this._minDisplayPoint = t, this._maxDisplayPoint = e), this.camera.up = this.calcCameraUp(n), this.cameraView.up = this.calcCameraUp(n), this.cameraView.updateProjectionMatrix(), this.zoomW(this._minDisplayPoint, this._maxDisplayPoint, !0); }, d.prototype.zoomInitialStates = function () { null != this._minDisplayPoint && null != this._maxDisplayPoint ? this.zoomW(this._minDisplayPoint, this._maxDisplayPoint, !0) : console.log("mx assert(0)"); }, d.prototype.onInitScene = function () { var t = this.getEvent(), e = 0; if (null != t.initScene && (e = t.initScene(this.scene, this.controls, !0)), 0 == e) {
|
|
6333
|
+
c = .5 * o, u = a / r, l.left = -c, l.right = c, l.top = c * u, l.bottom = -c * u; var h = o, d = s, p = h; p < h && (p = d), l.far < 2 * p && (l.far = 2 * p); var f = t.x + .5 * h, m = t.y + .5 * d; l.zoom = 1, l.position.set(f, m, .5 * p), l.lookAt(new g.Vector3(f, m, 0)), l.updateProjectionMatrix(), this.controls.target.x = f, this.controls.target.y = m, this.controls.target.z = 0, this.controls.update(); }, d.prototype.zoomScale = function (t) { var e = this.getOrthographicCamera(); e.zoom = Math.max(this.controls.minZoom, Math.min(this.controls.maxZoom, e.zoom * t)), e.updateProjectionMatrix(), this.controls.update(); }, d.prototype.zoomCenter = function (t, e) { var n = this.getOrthographicCamera(), i = this.docCoord2World(t, e, 0); t = i.x, e = i.y, n.position.set(t, e, n.position.z), n.lookAt(new g.Vector3(t, e, 0)), n.updateProjectionMatrix(), this.controls.target.x = t, this.controls.target.y = e, this.controls.target.z = 0, this.controls.update(); }, d.prototype.calcCameraUp = function (t) { var e = new g.Vector3(0, 1, 0), n = new g.Matrix4; return n.makeRotationZ(t), e.applyMatrix4(n), e; }, d.prototype.updateCameraDisplayRange = function (t, e, n) { null != this._initZoomwCoordPt1 && null != this._initZoomWCoordPt2 ? (this._minDisplayPoint = this.docCoord2World(this._initZoomwCoordPt1.x, this._initZoomwCoordPt1.y, 0), this._maxDisplayPoint = this.docCoord2World(this._initZoomWCoordPt2.x, this._initZoomWCoordPt2.y, 0)) : (this._minDisplayPoint = t, this._maxDisplayPoint = e), this.camera.up = this.calcCameraUp(n), this.cameraView.up = this.calcCameraUp(n), this.cameraView.updateProjectionMatrix(), this.zoomW(this._minDisplayPoint, this._maxDisplayPoint, !0); }, d.prototype.zoomInitialStates = function () { null != this._minDisplayPoint && null != this._maxDisplayPoint ? this.zoomW(this._minDisplayPoint, this._maxDisplayPoint, !0) : console.log("mx assert(0)"); }, d.prototype.onInitScene = function () { var t = this.getEvent(), e = 0; if (null != t.initScene && (e = t.initScene(this.scene, this.controls, !0)), 0 == e) {
|
|
6332
6334
|
var n = new g.AmbientLight(3355443, 1);
|
|
6333
6335
|
this.scene.add(n);
|
|
6334
6336
|
var i = new g.DirectionalLight(16777215, 1);
|
|
@@ -6487,45 +6489,51 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6487
6489
|
}, { "./MxDrawData": 40, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 45: [function (t, e, n) {
|
|
6488
6490
|
"use strict";
|
|
6489
6491
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxFun = void 0;
|
|
6490
|
-
var
|
|
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");
|
|
6491
6493
|
function k(t) { t.cmd && z(t.cmd); }
|
|
6492
6494
|
function N(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
|
|
6493
6495
|
function B() { return y.MxManager.currentMx(); }
|
|
6494
6496
|
function F() { return y.MxManager.currentMx(); }
|
|
6495
6497
|
function z(t, e) { var n = F(); if (n)
|
|
6496
6498
|
return C.MxCmdRunManager.runCmd(n, t, e); }
|
|
6497
|
-
function j(t) { null != t && (t.init(), T.MxUiVue.init(t)),
|
|
6498
|
-
|
|
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
6501
|
for (var i = 0; i < e.length; i++) {
|
|
6500
6502
|
var r = e[i].replace(/[=|^==]/, "&").split("&");
|
|
6501
6503
|
if (1 < r.length) {
|
|
6502
6504
|
var a = new Array;
|
|
6503
6505
|
a.push(decodeURIComponent(r[0])), a.push(decodeURIComponent(r[1])), n.push(a);
|
|
6504
6506
|
}
|
|
6505
|
-
} return n; },
|
|
6506
|
-
return 1 == a; var t = N("select"); return a = 0, null != t && "y" == t.toLowerCase() && (a = 1), 1 == a; },
|
|
6507
|
-
return 1 ==
|
|
6508
|
-
return 1 == o; var t = N("static"); return o = 0, null != t && "y" == t.toLowerCase() && (o = 1), 1 == o; },
|
|
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)
|
|
6509
6511
|
return r; var t = N("file"); if (r = !1, null != t) {
|
|
6510
6512
|
var e = t.substring(t.lastIndexOf(".") + 1);
|
|
6511
6513
|
"dwg" != e.toLowerCase() && "dxf" != e.toLowerCase() && "dwf" != e.toLowerCase() && "mwg" != e.toLowerCase() || (r = !0);
|
|
6512
|
-
} return r; },
|
|
6513
|
-
return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); },
|
|
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++)
|
|
6514
6516
|
e[n - 1] = arguments[n]; for (var i = 0; i < e.length; i++)
|
|
6515
|
-
t = t.replace("{".concat(i, "}"), e[i]); return t; },
|
|
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) {
|
|
6516
6518
|
0 == e.length && (e = "empty");
|
|
6517
|
-
var
|
|
6518
|
-
"dwg" !=
|
|
6519
|
+
var s = e.substring(e.lastIndexOf(".") + 1).toLowerCase();
|
|
6520
|
+
if ("dwg" != s && "dxf" != s && "dwf" != s && "mwg" != s && "wgh" != s || (o = !0), 1 != a && null != a && "wgh" != s) {
|
|
6521
|
+
var l = void 0, c = e.split("/");
|
|
6522
|
+
"$" == (l = 1 == c.length ? c[0] : c[c.length - 1])[0] && (l = l.substring(1));
|
|
6523
|
+
for (var u = void 0, h = 0; h < c.length - 1; h++)
|
|
6524
|
+
u = 0 == h ? c[h] : u + "/" + c[h];
|
|
6525
|
+
e = u + "/$" + l + ".mxb1.wgh";
|
|
6526
|
+
}
|
|
6519
6527
|
}
|
|
6520
6528
|
else
|
|
6521
|
-
e = "empty"; 1 == r && (e = ""); var
|
|
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++)
|
|
6522
6530
|
e[n - 1] = arguments[n]; if (!T.MxUiVue.isNull()) {
|
|
6523
6531
|
for (var i = arguments, r = i[0], a = 0; a < i.length - 1; a++) {
|
|
6524
6532
|
var o = new RegExp("\\{" + a + "\\}", "gm");
|
|
6525
6533
|
r = r.replace(o, i[a + 1]);
|
|
6526
6534
|
}
|
|
6527
6535
|
T.MxUiVue.AcutPrintfNoFormat(r, !0);
|
|
6528
|
-
} },
|
|
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); };
|
|
6529
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) {
|
|
6530
6538
|
"use strict";
|
|
6531
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,10 +6548,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6540
6548
|
var n = { x1: this.m_pt1.x, y1: this.m_pt1.y, x2: this.m_pt2.x, y2: this.m_pt2.y };
|
|
6541
6549
|
e.callCommand("MxCAD_IntelliSelect", JSON.stringify(n), function (t) { e.getMxCAD().getGrip().onIntelliSelect(t); });
|
|
6542
6550
|
}
|
|
6543
|
-
} return s.MxJigCmdManager.DoneStatius.kExitCommand; }, h.prototype.doPointSelect = function (t, e, n) { var i = t.
|
|
6551
|
+
} return s.MxJigCmdManager.DoneStatius.kExitCommand; }, h.prototype.doPointSelect = function (t, e, n) { var i = t.screenCoordLong2Doc(16), r = { x: e.x, y: e.y, tol: i }; t.callCommand("MxCAD_IntelliSelect_Point", JSON.stringify(r), function (t) { n(t); }); }, h.prototype.upDisplay = function () { var t = new l.Vector3(this.m_pt1.x, this.m_pt2.y, this.m_pt2.z), e = new l.Vector3(this.m_pt2.x, this.m_pt1.y, this.m_pt2.z), n = []; n.push(this.m_pt1), n.push(t), n.push(this.m_pt2), n.push(e), n.push(this.m_pt1); var i = null, r = 65280; if (this.m_pt2.x > this.m_pt1.x)
|
|
6544
6552
|
i = c.MxThreeJS.createLines(n, 16777215), r = 255;
|
|
6545
6553
|
else {
|
|
6546
|
-
var a = this.getMxObject().
|
|
6554
|
+
var a = this.getMxObject().screenCoordLong2Doc(3);
|
|
6547
6555
|
i = c.MxThreeJS.createDashedLines(n, 16777215, 2 * a, a);
|
|
6548
6556
|
} var o = []; o.push(this.m_pt1), o.push(t), o.push(this.m_pt2), o.push(this.m_pt1), o.push(this.m_pt2), o.push(e); var s = c.MxThreeJS.createTriangle(o, r, .27); this.drawEntity(s, 30), this.drawEntity(i, 31); }, h);
|
|
6549
6557
|
function h(t, e) { var n = a.call(this) || this; return n.m_pt1 = t, n.m_pt2 = t, n.m_isFrontEndWebpage = e, n; }
|
|
@@ -6559,8 +6567,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6559
6567
|
} return this.m_isInputStatus = !1, 0; }, u.prototype.isInputStatus = function () { return this.m_isInputStatus; }, u.prototype.initDynInput = function (t) { this.m_jig = t; var e = this.m_jig.getMxObject(); s.MxUiVue.DynamicInput_setType(this.m_dynType), this.m_dynType == a.MxJigCmdManager.DynamicInputType.kAutoInput && (null != this._dynamicInputBasePoint || e.sysVariable().getSysVarNumber("GETPOINTSTATUS") & a.MxJigCmdManager.GETPOINTSTATUS.OsModeSValidLastPoint ? s.MxUiVue.DynamicInput_setType(a.MxJigCmdManager.DynamicInputType.kDistanceInput) : s.MxUiVue.DynamicInput_setType(a.MxJigCmdManager.DynamicInputType.kXYCoordInput)); }, u.prototype.setFocus = function (t) { s.MxUiVue.OnMxEvent({ name: "dynInputSetFocus", param: { isFocus: t } }); }, u.prototype.exitDynInput = function () { this._dynamicInputBasePoint = void 0, s.MxUiVue.DynamicInput_setShow(!1), s.MxUiVue.DynamicInput_upDisplay(); }, u.prototype.isShow = function () { return s.MxUiVue.DynamicInput_isShow(); }, u.prototype.upDynInput = function () { var t = this.m_jig.getMxObject(), e = !1; if (e = !this.m_jig.isDisableDynInput() && t.sysVariable().getSysVarBool("DYNINPUT"), s.MxUiVue.DynamicInput_setShow(e), e) {
|
|
6560
6568
|
if (s.MxUiVue.DynamicInput_setTip(s.MxUiVue.getCmdTip()), a.MxJigCmdManager.getAcquireStatus() == a.MxJigCmdManager.AcquireStatus.kMove) {
|
|
6561
6569
|
var n = a.MxJigCmdManager.getAcquirePoint();
|
|
6562
|
-
if (s.MxUiVue.DynamicInput_setPos(m.MxFun.
|
|
6563
|
-
var i =
|
|
6570
|
+
if (s.MxUiVue.DynamicInput_setPos(m.MxFun.docCoord2Screen(n.x, n.y, n.z)), s.MxUiVue.DynamicInput_getType() == a.MxJigCmdManager.DynamicInputType.kXYCoordInput) {
|
|
6571
|
+
var i = n;
|
|
6564
6572
|
s.MxUiVue.DynamicInput_setValue1(i.x.toFixed(3)), s.MxUiVue.DynamicInput_setValue2(i.y.toFixed(3));
|
|
6565
6573
|
}
|
|
6566
6574
|
else
|
|
@@ -6570,12 +6578,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6570
6578
|
} }, u.prototype.setDynamicInputBasePoint = function (t) { this._dynamicInputBasePoint = t; }, u.prototype.setDynamicInputType = function (t) { this.m_dynType = t; }, u.prototype.getDynamicInputType = function () { return this.m_dynType; }, u);
|
|
6571
6579
|
function u(t) { this.m_dynType = a.MxJigCmdManager.DynamicInputType.kAutoInput, this._dynamicInputBasePoint = void 0, this.m_isInputStatus = !1, this.m_jig = t; }
|
|
6572
6580
|
n.MxDynamicInput = c;
|
|
6573
|
-
var h = (d.prototype.getTypeName = function () { return ""; }, d.prototype.onExitCommand = function (t) { t && this.m_dynInput.exitDynInput(), this.m_osnap.endDrag(); }, d.prototype.getOsnap = function () { return this.m_osnap; }, d.prototype.isDisableDynInput = function () { return this.m_isDisableDynInput; }, d.prototype.setDisableDynInput = function (t) { this.m_isDisableDynInput = t; }, d.prototype.setDisableOsnap = function (t) { this.m_isDisableOsnap = t; }, d.prototype.isDisableOsnap = function () { return this.m_isDisableOsnap; }, d.prototype.onStartCommand = function () { this._isCancle = !1, this._isExit = !1, this.m_dynInput.initDynInput(this), r.McEdImpJigGlobalData.intiStartDrag(this._mxObject), this.m_osnap.startDrag(this.m_isOffsetInputPostion, this); var t = l.MxWindowsEvent.getCurrentMousePostion(), e = this._mxObject.
|
|
6581
|
+
var h = (d.prototype.getTypeName = function () { return ""; }, d.prototype.getSence = function () { return this._mxObject.getTheTempDrawContainer(); }, d.prototype.onExitCommand = function (t) { t && this.m_dynInput.exitDynInput(), this.m_osnap.endDrag(); }, d.prototype.getOsnap = function () { return this.m_osnap; }, d.prototype.isDisableDynInput = function () { return this.m_isDisableDynInput; }, d.prototype.setDisableDynInput = function (t) { this.m_isDisableDynInput = t; }, d.prototype.setDisableOsnap = function (t) { this.m_isDisableOsnap = t; }, d.prototype.isDisableOsnap = function () { return this.m_isDisableOsnap; }, d.prototype.onStartCommand = function () { this._isCancle = !1, this._isExit = !1, this.m_dynInput.initDynInput(this), r.McEdImpJigGlobalData.intiStartDrag(this._mxObject), this.m_osnap.startDrag(this.m_isOffsetInputPostion, this); var t = l.MxWindowsEvent.getCurrentMousePostion(), e = this._mxObject.screenCoord2Doc(t.x, t.y, 0); this.m_osnap.setPoint(e), a.MxJigCmdManager.doMouseMoveImp(), this.m_dynInput.setFocus(!0); }, d.prototype.getDynImput = function () { return this.m_dynInput; }, d.prototype.setMxObject = function (t) { this._mxObject = t; }, d.prototype.getMxObject = function () { return this._mxObject; }, d.prototype.setColor = function (t) { this._iColor = t; }, d.prototype.getColor = function () { return this._iColor; }, d.prototype.setDynamicInputType = function (t) { this.m_dynInput.setDynamicInputType(t); }, d.prototype.getDynamicInputType = function () { return this.m_dynInput.getDynamicInputType(); }, d.prototype.createTriangle = function (t, e, n) { var i = new f.MeshBasicMaterial({ color: this._iColor, side: f.DoubleSide }), r = new f.Geometry; r.vertices.push(t), r.vertices.push(e), r.vertices.push(n); var a = new f.Vector3(1, 1, 1), o = new f.Color(this._iColor), s = new f.Face3(0, 1, 2, a, o, 0); return r.faces.push(s), r.computeFaceNormals(), r.computeVertexNormals(), new f.Mesh(r, i); }, d.prototype.createPoint = function (t) { var e = new f.Geometry; e.vertices.push(t); var n = new f.PointsMaterial({ color: this._iColor, size: 3 }); return new f.Points(e, n); }, d.prototype.createLine = function (t, e) { var n = new f.Geometry, i = new f.LineBasicMaterial({ color: this._iColor }); return n.vertices.push(t, e), new f.Line(n, i); }, d.prototype.drawReserve = function (t) { this.m_isReserveDrawStatus = !0, this.m_callReserveDrawAddEntity = t, this.upDisplay(), this.m_isReserveDrawStatus = !1, this.m_callReserveDrawAddEntity = null; }, d.prototype.drawEntity = function (t, e) { if (null != t)
|
|
6574
6582
|
if (this.m_isReserveDrawStatus)
|
|
6575
|
-
t.renderOrder = null != e ? e : i.MxData.iDynJigRenderOrder, this._mxObject.addObject(t
|
|
6583
|
+
t.renderOrder = null != e ? e : i.MxData.iDynJigRenderOrder, this._mxObject.addObject(t), this.m_callReserveDrawAddEntity && this.m_callReserveDrawAddEntity(t);
|
|
6576
6584
|
else {
|
|
6577
6585
|
var n = "MxDynDraw_" + this._DynNameId.toString();
|
|
6578
|
-
t.name = n, t.renderOrder = null != e ? e : i.MxData.iDynJigRenderOrder, null == this._aryDynDrawObjectNamesId && (this._aryDynDrawObjectNamesId = new Array), this._aryDynDrawObjectNamesId.push(this._DynNameId), this._DynNameId++, this.
|
|
6586
|
+
t.name = n, t.renderOrder = null != e ? e : i.MxData.iDynJigRenderOrder, null == this._aryDynDrawObjectNamesId && (this._aryDynDrawObjectNamesId = new Array), this._aryDynDrawObjectNamesId.push(this._DynNameId), this._DynNameId++, this.getSence().add(t);
|
|
6579
6587
|
} }, d.prototype.floorPowerOfTwo = function (t) { return Math.pow(2, Math.floor(Math.log(t) / Math.LN2)); }, d.prototype.makeTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = m.MxFun.formatString("normal {0}px Arial", "256"); s.font = l; var c = s.measureText(t); a = 2 * this.floorPowerOfTwo(c.width), o.width = a, o.height = 256, s.font = l, s.textAlign = "center", s.textBaseline = "middle"; var u = m.MxFun.formatString("#{0}", r.toString(16)); s.fillStyle = u, s.fillText(t, a / 2, 128); var h = new f.Texture(o); h.needsUpdate = !0; var d = new f.SpriteMaterial({ map: h }); d.transparent = !1, d.rotation = i; var p = new f.Sprite(d); return p.scale.set(a / 256 * n, n, 1), p.position.set(e.x, e.y, 0), p; }, d.prototype.drawText = function (t, e, n, i) { var r = this.makeTextSprite(t, i, e, n, this._iColor); this.drawEntity(r); }, d.prototype.drawPoints = function (t) { for (var e = 0; e < t.length; e++) {
|
|
6580
6588
|
var n = new f.Geometry;
|
|
6581
6589
|
n.vertices.push(t[e]);
|
|
@@ -6584,8 +6592,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6584
6592
|
} }, d.prototype.drawPoint = function (t) { var e = new f.Geometry; e.vertices.push(t); var n = new f.PointsMaterial({ color: this._iColor, size: 3 }), i = new f.Points(e, n); this.drawEntity(i); }, d.prototype.drawPolyline = function (t) { for (var e = new f.Geometry, n = 0; n < t.length; n++)
|
|
6585
6593
|
e.vertices.push(t[n]); var i = new f.LineBasicMaterial({ color: this._iColor }), r = new f.Line(e, i); this.drawEntity(r); }, d.prototype.drawSpline = function (t) { }, d.prototype.drawCircle = function (t, e) { var n = new f.CircleGeometry(e, 64, 3, 2 * Math.PI), i = new f.LineBasicMaterial({ color: this._iColor }); n.vertices.shift(); var r = new f.LineLoop(n, i); r.position.x = t.x, r.position.y = t.y, r.position.z = t.z, this.drawEntity(r); }, d.prototype.drawArc = function (t, e, n, i) { var r = new f.CircleGeometry(e, 64, n, i), a = new f.LineBasicMaterial({ color: this._iColor }); r.vertices.shift(); var o = new f.Line(r, a); o.position.x = t.x, o.position.y = t.y, o.position.z = t.z, this.drawEntity(o); }, d.prototype.drawLine = function (t, e) { var n = new f.Geometry, i = new f.LineBasicMaterial({ color: this._iColor }); n.vertices.push(t, e); var r = new f.Line(n, i); this.drawEntity(r); }, d.prototype.removeDynDrawObject = function () { if (null != this._aryDynDrawObjectNamesId) {
|
|
6586
6594
|
for (var t = 0; t < this._aryDynDrawObjectNamesId.length; t++) {
|
|
6587
|
-
var e = "MxDynDraw_" + this._aryDynDrawObjectNamesId[t].toString(), n = this.
|
|
6588
|
-
m.MxFun.removeThreejsObject(n, this.
|
|
6595
|
+
var e = "MxDynDraw_" + this._aryDynDrawObjectNamesId[t].toString(), n = this.getSence().getObjectByName(e);
|
|
6596
|
+
m.MxFun.removeThreejsObject(n, this.getSence());
|
|
6589
6597
|
}
|
|
6590
6598
|
this._aryDynDrawObjectNamesId = [];
|
|
6591
6599
|
} }, d.prototype.acquirePoint = function (t) { var e = a.MxJigCmdManager.acquirePoint(t); return this._isExit = e.exit, e; }, d.prototype.notifyCancleExit = function () { this._isCancle = !0, this.removeDynDrawObject(), this.done(a.MxJigCmdManager.DragStatus.kCancel), this.onExitCommand(!0), a.MxJigCmdManager.commandRunComplete(this); }, d.prototype.notifySampler = function () { var t = this.sampler(); if (this.m_dynInput.upDynInput(), t == a.MxJigCmdManager.DragStatus.kNormal && (this.removeDynDrawObject(), this.upDisplay()), this._isExit) {
|
|
@@ -6611,7 +6619,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6611
6619
|
return;
|
|
6612
6620
|
if (w.getDynImput().isInputStatus())
|
|
6613
6621
|
return;
|
|
6614
|
-
C.x = t.offsetX, C.y = t.offsetY, x = w.getMxObject().
|
|
6622
|
+
C.x = t.offsetX, C.y = t.offsetY, x = w.getMxObject().screenCoord2Doc(t.offsetX, t.offsetY, 0), M = a.kMouseUp, S = t.button, P();
|
|
6615
6623
|
}
|
|
6616
6624
|
} } function N(t) { if (t.button == u.kLeft) {
|
|
6617
6625
|
null != w && w.getDynImput().isShow() && w.getDynImput().setFocus(!0);
|
|
@@ -6622,19 +6630,19 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6622
6630
|
if (w.getDynImput().isInputStatus())
|
|
6623
6631
|
return;
|
|
6624
6632
|
C.x = t.offsetX, C.y = t.offsetY;
|
|
6625
|
-
var n = w.getMxObject().
|
|
6633
|
+
var n = w.getMxObject().screenCoord2Doc(t.offsetX, t.offsetY, 0), i = w.getOsnap(), r = i.getCurrentOSnapPoint(n);
|
|
6626
6634
|
n = r.pt, r.osmode, at.McEdImpJigGlobalData.setPrvPoint(n), i.seInValidPoint(), x = n, M = a.kMouseDown, S = t.button, P();
|
|
6627
6635
|
}
|
|
6628
6636
|
} } function B(t) { if (0 != t.touches.length) {
|
|
6629
6637
|
var e = t.touches[0].pageX, n = t.touches[0].pageY;
|
|
6630
|
-
x = Y.MxFun.
|
|
6638
|
+
x = Y.MxFun.screenCoord2Doc(e, n, 0), M = a.kBegan, P();
|
|
6631
6639
|
} } function F(t) { if (0 != t.touches.length) {
|
|
6632
6640
|
var e = t.touches[0].pageX, n = t.touches[0].pageY;
|
|
6633
|
-
x = Y.MxFun.
|
|
6641
|
+
x = Y.MxFun.screenCoord2Doc(e, n, 0);
|
|
6634
6642
|
} M = a.kEnd, P(); } function z(t) { if (0 != t.touches.length) {
|
|
6635
6643
|
var e = t.touches[0].pageX, n = t.touches[0].pageY;
|
|
6636
|
-
x = Y.MxFun.
|
|
6637
|
-
} } function j(t) { A = !1, null == t && (t = C); var e = w.getMxObject().
|
|
6644
|
+
x = Y.MxFun.screenCoord2Doc(e, n, 0), M = a.kMove, P();
|
|
6645
|
+
} } function j(t) { A = !1, null == t && (t = C); var e = w.getMxObject().screenCoord2Doc(t.x, t.y, 0), n = w.getOsnap(), i = w.getMxObject().screenCoordLong2Doc(.5 * ot.MxDrawData.getCursorWidthPixels()); n.setPoint(e, i), r.OsnapMode.kOsModekValid, x = e, M = a.kMove, P.call(this); } function V() { _ || (_ = !0, Y.MxFun.isPC() ? (document.addEventListener("mouseup", k, !1), document.addEventListener("mousemove", R, !1), document.addEventListener("mousedown", N, !1)) : (document.addEventListener("touchstart", B, !1), document.addEventListener("touchend", F, !1), document.addEventListener("touchmove", z, !1))); } function U() { _ && (_ = !1, Y.MxFun.isPC() ? (document.removeEventListener("mouseup", k, !1), document.removeEventListener("mousemove", R, !1), document.removeEventListener("mousedown", N, !1)) : (document.removeEventListener("touchstart", B, !1), document.removeEventListener("touchend", F, !1), document.removeEventListener("touchmove", z, !1))); } function G(t) { t.getRunMode() == rt.MxRunMode.kBrowse && t.enableSingleTouchPan(!1), t.tempDisableSelect(!0), t.updateDisplay(); } function H(t) { var e = new X.Vector3, n = !1, i = new nt.MxString(t), r = i.AnalyzeString(","); if (r.length < 2)
|
|
6638
6646
|
for (; !i.IsEmpty() && et.MxTools.IsNumerical(i);) {
|
|
6639
6647
|
var a = et.MxTools._tstof(i.m_val);
|
|
6640
6648
|
if (et.MxTools.IsZero(a))
|
|
@@ -6687,7 +6695,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6687
6695
|
var e = $.MxManager.currentMx();
|
|
6688
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);
|
|
6689
6697
|
} }, r.GetAcqurePointFromStringTo = H, r.ProcCommandRetResult = J, r.GetCommandLineContent = q, r.acquirePoint = function (t) { var e = new st; if (null == w)
|
|
6690
|
-
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 =
|
|
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 = {}));
|
|
6691
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) {
|
|
6692
6700
|
"use strict";
|
|
6693
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)
|
|
@@ -6918,7 +6926,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6918
6926
|
"use strict";
|
|
6919
6927
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxThreeJS = void 0;
|
|
6920
6928
|
var i, m = t("three"), g = t("./MxFun");
|
|
6921
|
-
(i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n, i) { var r, a = new m.Geometry; return r = i ? new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1, opacity: i }) : new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }), a.vertices.push(t, e), new m.Line(a, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); if (null == s)
|
|
6929
|
+
(i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n, i) { var r, a = new m.Geometry; return r = i || 0 == i ? new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1, opacity: i }) : new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }), a.vertices.push(t, e), new m.Line(a, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); if (null == s)
|
|
6922
6930
|
return null; s.font = l; var c, u = s.measureText(t); a = 2 * (c = u.width, Math.pow(2, Math.floor(Math.log(c) / Math.LN2))), o.width = a, o.height = 256, s.font = l, s.textAlign = "center", s.textBaseline = "middle"; var h = g.MxFun.formatString("rgba({0}, {1}, {2}, 1.0)", (r >> 16 & 255) + "", (r >> 8 & 255) + "", (255 & r) + ""); s.fillStyle = h, s.fillText(t, a / 2, 128); var d = new m.Texture(o); d.needsUpdate = !0; var p = new m.SpriteMaterial({ transparent: !0, depthTest: !1, map: d }); p.rotation = i; var f = new m.Sprite(p); return f.scale.set(a / 256 * n, n, 1), f.position.set(e.x, e.y, e.z), f; }, i.createTriangle = function (t, e, n) { if (!(t.length < 3)) {
|
|
6923
6931
|
for (var i = t.length, r = new m.Geometry, a = 0; a + 2 < i; a += 3) {
|
|
6924
6932
|
r.vertices.push(t[a]), r.vertices.push(t[a + 1]), r.vertices.push(t[a + 2]);
|
|
@@ -6928,7 +6936,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
6928
6936
|
r.computeFaceNormals(), r.computeVertexNormals(), null == n && (n = 1);
|
|
6929
6937
|
var s = new m.MeshBasicMaterial({ color: e, transparent: !0, depthTest: !1, side: m.DoubleSide, opacity: n });
|
|
6930
6938
|
return new m.Mesh(r, s);
|
|
6931
|
-
} }, i.createLines = function (t, e, n) { var i, r = new m.Geometry; return r.vertices = t, i = n ? new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1, opacity: n }) : new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1 }), new m.Line(r, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i, transparent: !0, depthTest: !1 })); return a.computeLineDistances(), a; };
|
|
6939
|
+
} }, i.createLines = function (t, e, n) { var i, r = new m.Geometry; return r.vertices = t, i = n || 0 == n ? new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1, opacity: n }) : new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1 }), new m.Line(r, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i, transparent: !0, depthTest: !1 })); return a.computeLineDistances(), a; };
|
|
6932
6940
|
}, { "./MxFun": 45, three: 19 }], 59: [function (t, e, n) {
|
|
6933
6941
|
"use strict";
|
|
6934
6942
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxPair = n.MxTools = void 0;
|
|
@@ -7141,7 +7149,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7141
7149
|
var n = c.MxManager.getMxObject(e);
|
|
7142
7150
|
if (null == n)
|
|
7143
7151
|
return;
|
|
7144
|
-
var i = n.
|
|
7152
|
+
var i = n.screenCoord2Doc(t.offsetX, t.offsetY, 0);
|
|
7145
7153
|
if (d.MxDrawData.m_intelliSelectType == d.IntelliSelectType.kBackgroundServicesModel) {
|
|
7146
7154
|
var r = n.getMxCAD();
|
|
7147
7155
|
if (!r)
|
|
@@ -7185,7 +7193,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7185
7193
|
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
|
|
7186
7194
|
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
|
|
7187
7195
|
Object.defineProperty(n, "__esModule", { value: !0 }), n.MxTest = void 0;
|
|
7188
|
-
var a, o, s, l = t("../MrxDbgUiPrBase"), c = t("../MrxDbgUiPrPoint"), u = t("../MxThreeJS"), h = t("three"), d = t("../MxFun"), p = t("../MxDbEntity"), f = (a = p.MxDbEntityUserObject, r(m, a), m.prototype.worldDraw = function (t) { t.drawCircle(this.pt, this.r); var e = new h.Vector3(this.pt.x - this.r, this.pt.y - this.r, 0), n = new h.Vector3(this.pt.x + this.r, this.pt.y + this.r, 0), i = new h.Vector3(e.x, n.y), r = new h.Vector3(n.x, e.y), a = []; a.push(e), a.push(n), a.push(i), a.push(r), t.drawLine(e, i), t.drawLine(i, n), t.drawLine(n, r), t.drawLine(r, e), t.drawText("Test", t.getMxObject().
|
|
7196
|
+
var a, o, s, l = t("../MrxDbgUiPrBase"), c = t("../MrxDbgUiPrPoint"), u = t("../MxThreeJS"), h = t("three"), d = t("../MxFun"), p = t("../MxDbEntity"), f = (a = p.MxDbEntityUserObject, r(m, a), m.prototype.worldDraw = function (t) { t.drawCircle(this.pt, this.r); var e = new h.Vector3(this.pt.x - this.r, this.pt.y - this.r, 0), n = new h.Vector3(this.pt.x + this.r, this.pt.y + this.r, 0), i = new h.Vector3(e.x, n.y), r = new h.Vector3(n.x, e.y), a = []; a.push(e), a.push(n), a.push(i), a.push(r), t.drawLine(e, i), t.drawLine(i, n), t.drawLine(n, r), t.drawLine(r, e), t.drawText("Test", t.getMxObject().screenCoordLong2Doc(50), 0, e); }, m.prototype.setPoint = function (t) { this.pt = t; }, m.prototype.setR = function (t) { this.r = t; }, m.prototype.getTypeName = function () { return "MxDbTest"; }, m.prototype.getGripPoints = function () { var t = []; return t.push(this.pt), t; }, m.prototype.moveGripPointsAt = function (t, e) { return 0 == t && this.pt.add(e), !0; }, m.prototype.dwgIn = function (t) { return a.prototype.dwgIn.call(this, t), this.pt.copy(t.pt), this.r = t.r, !0; }, m.prototype.dwgOut = function (t) { return a.prototype.dwgOut.call(this, t), t.pt = this.pt, t.r = this.r, t; }, m.prototype.create = function () { return new m; }, m);
|
|
7189
7197
|
function m() { var t = null !== a && a.apply(this, arguments) || this; return t.pt = new h.Vector3, t.r = 100, t; }
|
|
7190
7198
|
function g(t) { var a = new c.MrxDbgUiPrPoint; a.setMessage("\n指定第一点:"), a.go(function (t) { if (0 == t) {
|
|
7191
7199
|
var r = a.value(), n = new h.Vector3;
|
|
@@ -7198,10 +7206,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7198
7206
|
} }); }
|
|
7199
7207
|
function v() { var i = new c.MrxDbgUiPrPoint; i.setMessage("\n指定第一点:"), i.go(function (t) { if (0 == t) {
|
|
7200
7208
|
var e = d.MxFun.getCurrentDraw(), n = new f;
|
|
7201
|
-
n.setColor(16711680), n.setPoint(i.value()), n.setR(e.
|
|
7209
|
+
n.setColor(16711680), n.setPoint(i.value()), n.setR(e.screenCoordLong2Doc(100)), e.addMxEntity(n), e.addMxCurrentSelect(n.objectId());
|
|
7202
7210
|
} }); }
|
|
7203
7211
|
function y() { var t = d.MxFun.getCurrentDraw(); 0 == s.length ? (s = t.saveMxEntityToJson(), console.log(s)) : (t.eraseAllMxEntity(), t.loadMxEntityFromJson(s)); }
|
|
7204
|
-
|
|
7212
|
+
function x() { d.MxFun.getCurrentDraw().openFile("test5.dwg"); }
|
|
7213
|
+
o = n.MxTest || (n.MxTest = {}), s = "", o.registerCommand = function () { console.log("regist mx test"), (new f).init(), d.MxFun.addCommand("MxTest_GetPoint", g), d.MxFun.addCommand("MxTest_DrawCustomEntity", v), d.MxFun.addCommand("MxTest_SaveMxDbEntityToJson", y), d.MxFun.addCommand("MxTest_OpenFile", x), d.MxFun.addWindowsEvent(function (t, e) { if ("mouseup" == t) {
|
|
7205
7214
|
if (d.MxFun.isRunningCommand())
|
|
7206
7215
|
return 0;
|
|
7207
7216
|
if (0 != e.button)
|
|
@@ -7209,7 +7218,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
|
|
|
7209
7218
|
var n = e.srcElement;
|
|
7210
7219
|
if (n && "CANVAS" == n.tagName) {
|
|
7211
7220
|
var i = d.MxFun.getCurrentDraw(), r = new h.Vector3(e.offsetX, e.offsetY, 0);
|
|
7212
|
-
i.findMxEntityAtPoint(r).length && e.preventDefault();
|
|
7221
|
+
i.findMxEntityAtPoint(r, !1).length && e.preventDefault();
|
|
7213
7222
|
}
|
|
7214
7223
|
return 0;
|
|
7215
7224
|
} }); };
|