mxcad 1.0.330 → 1.0.331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mxcad.d.ts +10 -0
- package/dist/mxcad.es.js +177 -237
- package/dist/mxcad.umd.js +3 -3
- package/dist/wasm/2d/mxdrawassembly_min.js +586 -586
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +587 -587
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +3 -3
package/dist/mxcad.d.ts
CHANGED
|
@@ -2904,6 +2904,7 @@ export declare class MxCADSelectionSet extends McRxObject {
|
|
|
2904
2904
|
* ```
|
|
2905
2905
|
* */
|
|
2906
2906
|
private selectPt2;
|
|
2907
|
+
private selectPoints;
|
|
2907
2908
|
/**
|
|
2908
2909
|
* 构造函数
|
|
2909
2910
|
* @example
|
|
@@ -2930,6 +2931,14 @@ export declare class MxCADSelectionSet extends McRxObject {
|
|
|
2930
2931
|
pt1: McGePoint3d;
|
|
2931
2932
|
pt2: McGePoint3d;
|
|
2932
2933
|
};
|
|
2934
|
+
/**
|
|
2935
|
+
* 返回选择点数组。
|
|
2936
|
+
* @returns
|
|
2937
|
+
* @example
|
|
2938
|
+
* ```ts
|
|
2939
|
+
* ```
|
|
2940
|
+
* */
|
|
2941
|
+
getSelectPoints(): McGePoint3d[];
|
|
2933
2942
|
/** 全选
|
|
2934
2943
|
* @param filter 过滤对象
|
|
2935
2944
|
* @example
|
|
@@ -3081,6 +3090,7 @@ export declare class MxCADSelectionSet extends McRxObject {
|
|
|
3081
3090
|
* ```
|
|
3082
3091
|
* */
|
|
3083
3092
|
userSelect(strPrompt?: string, filter?: MxCADResbuf | null, init?: (getPoint: MrxDbgUiPrPoint) => any): Promise<boolean>;
|
|
3093
|
+
fenceSelect(strPrompt?: string, filter?: MxCADResbuf | null, init?: (getPoint: MrxDbgUiPrPoint) => any): Promise<boolean>;
|
|
3084
3094
|
}
|
|
3085
3095
|
/** MxCADUiPrBase 作为 MxCADUiPr* 系列的基类,提供了一些基础的功能。 */
|
|
3086
3096
|
export declare class MxCADUiPrBase {
|
package/dist/mxcad.es.js
CHANGED
|
@@ -16419,6 +16419,7 @@ var MxCADSelectionSet = /*#__PURE__*/function (_McRxObject2) {
|
|
|
16419
16419
|
_defineProperty(_assertThisInitialized$1(_this3), "isSelectHighlight", true);
|
|
16420
16420
|
_defineProperty(_assertThisInitialized$1(_this3), "selectPt1", new McGePoint3d());
|
|
16421
16421
|
_defineProperty(_assertThisInitialized$1(_this3), "selectPt2", new McGePoint3d());
|
|
16422
|
+
_defineProperty(_assertThisInitialized$1(_this3), "selectPoints", []);
|
|
16422
16423
|
_this3.initTempObject(new MxCpp.mxcadassemblyimp.McDrawSelSet());
|
|
16423
16424
|
_this3.isWhileSelect = MxFun.isPC();
|
|
16424
16425
|
return _this3;
|
|
@@ -16431,6 +16432,11 @@ var MxCADSelectionSet = /*#__PURE__*/function (_McRxObject2) {
|
|
|
16431
16432
|
pt2: this.selectPt2
|
|
16432
16433
|
};
|
|
16433
16434
|
}
|
|
16435
|
+
}, {
|
|
16436
|
+
key: "getSelectPoints",
|
|
16437
|
+
value: function getSelectPoints() {
|
|
16438
|
+
return this.selectPoints;
|
|
16439
|
+
}
|
|
16434
16440
|
}, {
|
|
16435
16441
|
key: "allSelect",
|
|
16436
16442
|
value: function allSelect() {
|
|
@@ -16502,6 +16508,7 @@ var MxCADSelectionSet = /*#__PURE__*/function (_McRxObject2) {
|
|
|
16502
16508
|
case 0:
|
|
16503
16509
|
filter = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : null;
|
|
16504
16510
|
init = _args4.length > 2 ? _args4[2] : undefined;
|
|
16511
|
+
this.selectPoints = [];
|
|
16505
16512
|
this.selectPt1 = new McGePoint3d();
|
|
16506
16513
|
this.selectPt2 = new McGePoint3d();
|
|
16507
16514
|
getPoint = new MrxDbgUiPrPoint();
|
|
@@ -16511,78 +16518,81 @@ var MxCADSelectionSet = /*#__PURE__*/function (_McRxObject2) {
|
|
|
16511
16518
|
getPoint.setCursorType(MxCursorType.kRect);
|
|
16512
16519
|
getPoint.setDynamicInputType(DynamicInputType.kDynTip);
|
|
16513
16520
|
getPoint.disableAllTrace();
|
|
16514
|
-
getPoint.
|
|
16521
|
+
getPoint.setDisableOsnap(true);
|
|
16515
16522
|
retcode = 0;
|
|
16516
16523
|
init && init(getPoint);
|
|
16517
16524
|
filterImp = getFilterImp(filter);
|
|
16518
|
-
case
|
|
16525
|
+
case 14:
|
|
16519
16526
|
getPoint.setDynamicInputType(DynamicInputType.kDynTip);
|
|
16520
16527
|
getPoint.setInputToucheType(MxType.InputToucheType.kGetBegan);
|
|
16521
|
-
_context4.next =
|
|
16528
|
+
_context4.next = 19;
|
|
16522
16529
|
return getPoint.go();
|
|
16523
|
-
case
|
|
16530
|
+
case 19:
|
|
16524
16531
|
pt1 = _context4.sent;
|
|
16525
16532
|
getPoint.clearLastInputPoint();
|
|
16526
16533
|
retcode = getPoint.getDetailedResult();
|
|
16527
16534
|
if (pt1) {
|
|
16528
|
-
_context4.next =
|
|
16535
|
+
_context4.next = 24;
|
|
16529
16536
|
break;
|
|
16530
16537
|
}
|
|
16531
|
-
return _context4.abrupt("break",
|
|
16532
|
-
case
|
|
16538
|
+
return _context4.abrupt("break", 49);
|
|
16539
|
+
case 24:
|
|
16533
16540
|
pt1CAD = MxCoordConvert.doc2cad1(pt1);
|
|
16534
16541
|
if (!(this.imp.userPointSelect(pt1CAD.x, pt1CAD.y, filterImp, this.isSelectHighlight) == 0 /* kSelected */)) {
|
|
16535
|
-
_context4.next =
|
|
16542
|
+
_context4.next = 34;
|
|
16536
16543
|
break;
|
|
16537
16544
|
}
|
|
16538
16545
|
this.selectPt1.copy(pt1CAD);
|
|
16539
16546
|
this.selectPt2.copy(pt1CAD);
|
|
16547
|
+
this.selectPoints.push(pt1CAD);
|
|
16540
16548
|
if (!this.isWhileSelect) {
|
|
16541
|
-
_context4.next =
|
|
16549
|
+
_context4.next = 33;
|
|
16542
16550
|
break;
|
|
16543
16551
|
}
|
|
16544
|
-
return _context4.abrupt("continue",
|
|
16545
|
-
case
|
|
16546
|
-
return _context4.abrupt("break",
|
|
16547
|
-
case
|
|
16548
|
-
_context4.next =
|
|
16552
|
+
return _context4.abrupt("continue", 14);
|
|
16553
|
+
case 33:
|
|
16554
|
+
return _context4.abrupt("break", 49);
|
|
16555
|
+
case 34:
|
|
16556
|
+
_context4.next = 36;
|
|
16549
16557
|
return MrxDbgUtils.getCorner(pt1, strPrompt, true, function (ret) {
|
|
16550
16558
|
retcode = ret.detailedResult;
|
|
16551
16559
|
});
|
|
16552
|
-
case
|
|
16560
|
+
case 36:
|
|
16553
16561
|
pt2 = _context4.sent;
|
|
16554
16562
|
if (pt2) {
|
|
16555
|
-
_context4.next =
|
|
16563
|
+
_context4.next = 39;
|
|
16556
16564
|
break;
|
|
16557
16565
|
}
|
|
16558
|
-
return _context4.abrupt("break",
|
|
16559
|
-
case
|
|
16566
|
+
return _context4.abrupt("break", 49);
|
|
16567
|
+
case 39:
|
|
16560
16568
|
pt2CAD = MxCoordConvert.doc2cad1(pt2);
|
|
16561
16569
|
this.imp.userSelect(pt1CAD.x, pt1CAD.y, pt2CAD.x, pt2CAD.y, filterImp, this.isSelectHighlight);
|
|
16562
16570
|
this.selectPt1.copy(pt1CAD);
|
|
16563
16571
|
this.selectPt2.copy(pt2CAD);
|
|
16572
|
+
this.selectPoints.push(pt1CAD);
|
|
16573
|
+
this.selectPoints.push(pt2CAD);
|
|
16564
16574
|
if (this.isWhileSelect) {
|
|
16565
|
-
_context4.next =
|
|
16575
|
+
_context4.next = 47;
|
|
16566
16576
|
break;
|
|
16567
16577
|
}
|
|
16568
|
-
return _context4.abrupt("break",
|
|
16569
|
-
case
|
|
16570
|
-
_context4.next =
|
|
16578
|
+
return _context4.abrupt("break", 49);
|
|
16579
|
+
case 47:
|
|
16580
|
+
_context4.next = 14;
|
|
16571
16581
|
break;
|
|
16572
|
-
case
|
|
16582
|
+
case 49:
|
|
16573
16583
|
if (this.isSelectHighlight) this.imp.highlightEntity(false);
|
|
16574
16584
|
if (!(retcode == DetailedResult.kEcsIn || retcode == DetailedResult.kNewCommadIn || retcode == DetailedResult.kUnknown)) {
|
|
16575
|
-
_context4.next =
|
|
16585
|
+
_context4.next = 54;
|
|
16576
16586
|
break;
|
|
16577
16587
|
}
|
|
16578
16588
|
return _context4.abrupt("return", new Promise(function (resolve) {
|
|
16579
16589
|
resolve(false);
|
|
16580
16590
|
}));
|
|
16581
|
-
case
|
|
16591
|
+
case 54:
|
|
16582
16592
|
return _context4.abrupt("return", new Promise(function (resolve) {
|
|
16583
16593
|
resolve(true);
|
|
16584
16594
|
}));
|
|
16585
|
-
case
|
|
16595
|
+
case 55:
|
|
16586
16596
|
case "end":
|
|
16587
16597
|
return _context4.stop();
|
|
16588
16598
|
}
|
|
@@ -16593,6 +16603,106 @@ var MxCADSelectionSet = /*#__PURE__*/function (_McRxObject2) {
|
|
|
16593
16603
|
}
|
|
16594
16604
|
return userSelect;
|
|
16595
16605
|
}()
|
|
16606
|
+
}, {
|
|
16607
|
+
key: "fenceSelect",
|
|
16608
|
+
value: function () {
|
|
16609
|
+
var _fenceSelect = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee5(strPrompt) {
|
|
16610
|
+
var filter,
|
|
16611
|
+
init,
|
|
16612
|
+
getPoint,
|
|
16613
|
+
retcode,
|
|
16614
|
+
filterImp,
|
|
16615
|
+
pt1CAD,
|
|
16616
|
+
pt1,
|
|
16617
|
+
pt2,
|
|
16618
|
+
pt2CAD,
|
|
16619
|
+
_args5 = arguments;
|
|
16620
|
+
return regenerator.wrap(function _callee5$(_context5) {
|
|
16621
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
16622
|
+
case 0:
|
|
16623
|
+
filter = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : null;
|
|
16624
|
+
init = _args5.length > 2 ? _args5[2] : undefined;
|
|
16625
|
+
getPoint = new MrxDbgUiPrPoint();
|
|
16626
|
+
if (strPrompt) {
|
|
16627
|
+
getPoint.setMessage(strPrompt);
|
|
16628
|
+
}
|
|
16629
|
+
getPoint.setCursorType(MxCursorType.kCross);
|
|
16630
|
+
getPoint.setDynamicInputType(DynamicInputType.kDynTip);
|
|
16631
|
+
getPoint.disableAllTrace();
|
|
16632
|
+
getPoint.setDisableOsnap(true);
|
|
16633
|
+
retcode = 0;
|
|
16634
|
+
init && init(getPoint);
|
|
16635
|
+
filterImp = getFilterImp(filter);
|
|
16636
|
+
case 11:
|
|
16637
|
+
if (pt1CAD) {
|
|
16638
|
+
_context5.next = 24;
|
|
16639
|
+
break;
|
|
16640
|
+
}
|
|
16641
|
+
getPoint.setDynamicInputType(DynamicInputType.kDynTip);
|
|
16642
|
+
getPoint.setInputToucheType(MxType.InputToucheType.kGetBegan);
|
|
16643
|
+
_context5.next = 17;
|
|
16644
|
+
return getPoint.go();
|
|
16645
|
+
case 17:
|
|
16646
|
+
pt1 = _context5.sent;
|
|
16647
|
+
retcode = getPoint.getDetailedResult();
|
|
16648
|
+
getPoint.clearLastInputPoint();
|
|
16649
|
+
if (pt1) {
|
|
16650
|
+
_context5.next = 22;
|
|
16651
|
+
break;
|
|
16652
|
+
}
|
|
16653
|
+
return _context5.abrupt("break", 39);
|
|
16654
|
+
case 22:
|
|
16655
|
+
pt1CAD = MxCoordConvert.doc2cad1(pt1);
|
|
16656
|
+
this.selectPoints.push(pt1CAD);
|
|
16657
|
+
case 24:
|
|
16658
|
+
_context5.next = 26;
|
|
16659
|
+
return getPoint.go();
|
|
16660
|
+
case 26:
|
|
16661
|
+
pt2 = _context5.sent;
|
|
16662
|
+
getPoint.clearLastInputPoint();
|
|
16663
|
+
retcode = getPoint.getDetailedResult();
|
|
16664
|
+
if (pt2) {
|
|
16665
|
+
_context5.next = 31;
|
|
16666
|
+
break;
|
|
16667
|
+
}
|
|
16668
|
+
return _context5.abrupt("break", 39);
|
|
16669
|
+
case 31:
|
|
16670
|
+
pt2CAD = MxCoordConvert.doc2cad1(pt2);
|
|
16671
|
+
this.imp.fenceSelect(pt1CAD.x, pt1CAD.y, pt2CAD.x, pt2CAD.y, filterImp, this.isSelectHighlight);
|
|
16672
|
+
this.selectPoints.push(pt2CAD);
|
|
16673
|
+
pt2CAD = pt1CAD;
|
|
16674
|
+
if (this.isWhileSelect) {
|
|
16675
|
+
_context5.next = 37;
|
|
16676
|
+
break;
|
|
16677
|
+
}
|
|
16678
|
+
return _context5.abrupt("break", 39);
|
|
16679
|
+
case 37:
|
|
16680
|
+
_context5.next = 11;
|
|
16681
|
+
break;
|
|
16682
|
+
case 39:
|
|
16683
|
+
if (this.isSelectHighlight) this.imp.highlightEntity(false);
|
|
16684
|
+
if (!(retcode == DetailedResult.kEcsIn || retcode == DetailedResult.kNewCommadIn || retcode == DetailedResult.kUnknown)) {
|
|
16685
|
+
_context5.next = 44;
|
|
16686
|
+
break;
|
|
16687
|
+
}
|
|
16688
|
+
return _context5.abrupt("return", new Promise(function (resolve) {
|
|
16689
|
+
resolve(false);
|
|
16690
|
+
}));
|
|
16691
|
+
case 44:
|
|
16692
|
+
return _context5.abrupt("return", new Promise(function (resolve) {
|
|
16693
|
+
resolve(true);
|
|
16694
|
+
}));
|
|
16695
|
+
case 45:
|
|
16696
|
+
case "end":
|
|
16697
|
+
return _context5.stop();
|
|
16698
|
+
}
|
|
16699
|
+
}, _callee5, this);
|
|
16700
|
+
}));
|
|
16701
|
+
function fenceSelect(_x7) {
|
|
16702
|
+
return _fenceSelect.apply(this, arguments);
|
|
16703
|
+
}
|
|
16704
|
+
return fenceSelect;
|
|
16705
|
+
}()
|
|
16596
16706
|
}]);
|
|
16597
16707
|
return MxCADSelectionSet;
|
|
16598
16708
|
}(McRxObject);
|
|
@@ -42940,33 +43050,30 @@ function Mx_Trim() {
|
|
|
42940
43050
|
}
|
|
42941
43051
|
function _Mx_Trim() {
|
|
42942
43052
|
_Mx_Trim = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee18() {
|
|
42943
|
-
var
|
|
43053
|
+
var filter, getPoint, ss, aryId, aryIdLong, mxcadTrimAssert, _loop7, _ret7;
|
|
42944
43054
|
return regenerator.wrap(function _callee18$(_context25) {
|
|
42945
43055
|
while (1) switch (_context25.prev = _context25.next) {
|
|
42946
43056
|
case 0:
|
|
42947
|
-
isByWindow = false;
|
|
42948
|
-
isExtend = false;
|
|
42949
|
-
cachings = [];
|
|
42950
43057
|
filter = new MxCADResbuf();
|
|
42951
43058
|
filter.AddMcDbEntityTypes("LINE,LWPOLYLINE,ELLIPSE,ARC,CIRCLE,SPLINE,XLINE");
|
|
42952
43059
|
aryId = MxCADUtility.getCurrentSelect(filter);
|
|
42953
43060
|
if (!(aryId.length === 0)) {
|
|
42954
|
-
_context25.next =
|
|
43061
|
+
_context25.next = 12;
|
|
42955
43062
|
break;
|
|
42956
43063
|
}
|
|
42957
|
-
_context25.next =
|
|
43064
|
+
_context25.next = 6;
|
|
42958
43065
|
return MxCADUtility.userSelect("\u9009\u62E9\u5BF9\u8C61\u6216<\u5168\u90E8\u9009\u62E9>", filter, function (_ss, _getPoint) {
|
|
42959
43066
|
getPoint = _getPoint;
|
|
42960
43067
|
ss = _ss;
|
|
42961
43068
|
});
|
|
42962
|
-
case
|
|
43069
|
+
case 6:
|
|
42963
43070
|
aryId = _context25.sent;
|
|
42964
43071
|
if (!(getPoint.getStatus() === MrxDbgUiPrBaseReturn.kCancel)) {
|
|
42965
|
-
_context25.next =
|
|
43072
|
+
_context25.next = 9;
|
|
42966
43073
|
break;
|
|
42967
43074
|
}
|
|
42968
43075
|
return _context25.abrupt("return");
|
|
42969
|
-
case
|
|
43076
|
+
case 9:
|
|
42970
43077
|
if (getPoint.getStatus() === MrxDbgUiPrBaseReturn.kNone) {
|
|
42971
43078
|
if (aryId.length === 0) {
|
|
42972
43079
|
ss.allSelect(filter);
|
|
@@ -42976,38 +43083,22 @@ function _Mx_Trim() {
|
|
|
42976
43083
|
}
|
|
42977
43084
|
}
|
|
42978
43085
|
if (!(aryId.length === 0)) {
|
|
42979
|
-
_context25.next =
|
|
43086
|
+
_context25.next = 12;
|
|
42980
43087
|
break;
|
|
42981
43088
|
}
|
|
42982
43089
|
return _context25.abrupt("return");
|
|
42983
|
-
case
|
|
43090
|
+
case 12:
|
|
42984
43091
|
aryIdLong = new McGeLongArray();
|
|
42985
43092
|
aryIdLong.copyFormAryId(aryId);
|
|
42986
43093
|
mxcadTrimAssert = new MxCpp.mxcadassemblyimp.MxDrawTrimAssist();
|
|
42987
43094
|
if (mxcadTrimAssert.Init(aryIdLong.imp)) {
|
|
42988
|
-
_context25.next =
|
|
42989
|
-
break;
|
|
42990
|
-
}
|
|
42991
|
-
return _context25.abrupt("return");
|
|
42992
|
-
case 21:
|
|
42993
|
-
mxcadExtendAssert = new MxCpp.mxcadassemblyimp.MxDrawExtendAssist();
|
|
42994
|
-
if (mxcadExtendAssert.Init(aryIdLong.imp)) {
|
|
42995
|
-
_context25.next = 24;
|
|
43095
|
+
_context25.next = 17;
|
|
42996
43096
|
break;
|
|
42997
43097
|
}
|
|
42998
43098
|
return _context25.abrupt("return");
|
|
42999
|
-
case
|
|
43000
|
-
isShiftKey2 = false;
|
|
43001
|
-
onKeydown2 = function onKeydown2(e) {
|
|
43002
|
-
isShiftKey2 = e.key === "Shift";
|
|
43003
|
-
};
|
|
43004
|
-
window.addEventListener("keydown", onKeydown2);
|
|
43005
|
-
onkeyup = function onkeyup() {
|
|
43006
|
-
return isShiftKey2 = false;
|
|
43007
|
-
};
|
|
43008
|
-
window.addEventListener("keyup", onkeyup);
|
|
43099
|
+
case 17:
|
|
43009
43100
|
_loop7 = /*#__PURE__*/regenerator.mark(function _loop7() {
|
|
43010
|
-
var ss2, getPoint2,
|
|
43101
|
+
var ss2, getPoint2, ids, selPoint;
|
|
43011
43102
|
return regenerator.wrap(function _loop7$(_context24) {
|
|
43012
43103
|
while (1) switch (_context24.prev = _context24.next) {
|
|
43013
43104
|
case 0:
|
|
@@ -43015,9 +43106,9 @@ function _Mx_Trim() {
|
|
|
43015
43106
|
ss2.isWhileSelect = false;
|
|
43016
43107
|
ss2.isSelectHighlight = false;
|
|
43017
43108
|
_context24.next = 5;
|
|
43018
|
-
return ss2.userSelect("\u9009\u62E9\u8981\u4FEE\u526A\u7684\u5BF9\u8C61
|
|
43109
|
+
return ss2.userSelect("\u9009\u62E9\u8981\u4FEE\u526A\u7684\u5BF9\u8C61", filter, function (_getPoint) {
|
|
43019
43110
|
getPoint2 = _getPoint;
|
|
43020
|
-
getPoint2.setKeyWords("[\u680F\u9009(F)/\u7A97\u4EA4(C)
|
|
43111
|
+
getPoint2.setKeyWords("[\u680F\u9009(F)/\u7A97\u4EA4(C)]");
|
|
43021
43112
|
});
|
|
43022
43113
|
case 5:
|
|
43023
43114
|
if (_context24.sent) {
|
|
@@ -43026,194 +43117,43 @@ function _Mx_Trim() {
|
|
|
43026
43117
|
}
|
|
43027
43118
|
return _context24.abrupt("return", 0);
|
|
43028
43119
|
case 7:
|
|
43029
|
-
if (!getPoint2.isKeyWordPicked("F")) {
|
|
43030
|
-
_context24.next = 18;
|
|
43031
|
-
break;
|
|
43032
|
-
}
|
|
43033
|
-
_context24.next = 10;
|
|
43034
|
-
return getHurdleSelectionPoints();
|
|
43035
|
-
case 10:
|
|
43036
|
-
points = _context24.sent;
|
|
43037
|
-
if (points) {
|
|
43038
|
-
_context24.next = 13;
|
|
43039
|
-
break;
|
|
43040
|
-
}
|
|
43041
|
-
return _context24.abrupt("return", 0);
|
|
43042
|
-
case 13:
|
|
43043
|
-
pl = new McDbPolyline();
|
|
43044
|
-
points.forEach(function (point) {
|
|
43045
|
-
pl.addVertexAt(point);
|
|
43046
|
-
});
|
|
43047
|
-
cachings.push([aryId, aryId.map(function (id) {
|
|
43048
|
-
return id.clone();
|
|
43049
|
-
})]);
|
|
43050
|
-
aryId.forEach(function (objId) {
|
|
43051
|
-
var ent = objId.getMcDbEntity();
|
|
43052
|
-
if (!(ent instanceof McDbCurve)) return;
|
|
43053
|
-
var intersectPoints = ent.IntersectWith(pl, McDb.Intersect.kOnBothOperands);
|
|
43054
|
-
if (intersectPoints.isEmpty()) return;
|
|
43055
|
-
intersectPoints.forEach(function (point) {
|
|
43056
|
-
aryIdLong.copyFormAryId([objId]);
|
|
43057
|
-
isShiftKey2 ? mxcadExtendAssert.DoExtend(aryIdLong.imp, point.x, point.y, point.x, point.y) : mxcadTrimAssert.DoTrim(aryIdLong.imp, point.x, point.y, point.x, point.y);
|
|
43058
|
-
});
|
|
43059
|
-
});
|
|
43060
|
-
return _context24.abrupt("return", 1);
|
|
43061
|
-
case 18:
|
|
43062
|
-
if (!getPoint2.isKeyWordPicked("C")) {
|
|
43063
|
-
_context24.next = 21;
|
|
43064
|
-
break;
|
|
43065
|
-
}
|
|
43066
|
-
isByWindow = true;
|
|
43067
|
-
return _context24.abrupt("return", 1);
|
|
43068
|
-
case 21:
|
|
43069
|
-
if (!getPoint2.isKeyWordPicked("E")) {
|
|
43070
|
-
_context24.next = 39;
|
|
43071
|
-
break;
|
|
43072
|
-
}
|
|
43073
|
-
getKey = new MxCADUiPrKeyWord();
|
|
43074
|
-
getKey.setMessage("\u6307\u5B9A\u9690\u542B\u8FB9\u5EF6\u4F38\u6A21\u5F0F<".concat(isExtend ? "\u5EF6\u4F38" : "\u4E0D\u5EF6\u4F38", ">"));
|
|
43075
|
-
getKey.setKeyWords("[\u5EF6\u4F38(E)/\u4E0D\u5EF6\u4F38(N)]");
|
|
43076
|
-
_context24.next = 27;
|
|
43077
|
-
return getKey.go();
|
|
43078
|
-
case 27:
|
|
43079
|
-
key = getKey.keyWordPicked();
|
|
43080
|
-
if (!(getKey.getStatus() === MrxDbgUiPrBaseReturn.kCancel)) {
|
|
43081
|
-
_context24.next = 30;
|
|
43082
|
-
break;
|
|
43083
|
-
}
|
|
43084
|
-
return _context24.abrupt("return", {
|
|
43085
|
-
v: void 0
|
|
43086
|
-
});
|
|
43087
|
-
case 30:
|
|
43088
|
-
if (!(getKey.getStatus() === MrxDbgUiPrBaseReturn.kNone)) {
|
|
43089
|
-
_context24.next = 32;
|
|
43090
|
-
break;
|
|
43091
|
-
}
|
|
43092
|
-
return _context24.abrupt("return", 1);
|
|
43093
|
-
case 32:
|
|
43094
|
-
if (!(getKey.getStatus() === MrxDbgUiPrBaseReturn.kKeyWord)) {
|
|
43095
|
-
_context24.next = 39;
|
|
43096
|
-
break;
|
|
43097
|
-
}
|
|
43098
|
-
if (!(key === "E")) {
|
|
43099
|
-
_context24.next = 36;
|
|
43100
|
-
break;
|
|
43101
|
-
}
|
|
43102
|
-
isExtend = true;
|
|
43103
|
-
return _context24.abrupt("return", 1);
|
|
43104
|
-
case 36:
|
|
43105
|
-
if (!(key === "N")) {
|
|
43106
|
-
_context24.next = 39;
|
|
43107
|
-
break;
|
|
43108
|
-
}
|
|
43109
|
-
isExtend = false;
|
|
43110
|
-
return _context24.abrupt("return", 1);
|
|
43111
|
-
case 39:
|
|
43112
|
-
if (!getPoint2.isKeyWordPicked("R")) {
|
|
43113
|
-
_context24.next = 46;
|
|
43114
|
-
break;
|
|
43115
|
-
}
|
|
43116
|
-
_context24.next = 42;
|
|
43117
|
-
return MxCADUtility.userSelect("\u9009\u62E9\u8981\u5220\u9664\u7684\u5BF9\u8C61", filter);
|
|
43118
|
-
case 42:
|
|
43119
|
-
ids2 = _context24.sent;
|
|
43120
|
-
cachings.push([ids2, ids2.map(function (id) {
|
|
43121
|
-
return id.clone();
|
|
43122
|
-
})]);
|
|
43123
|
-
ids2.forEach(function (id) {
|
|
43124
|
-
id.erase();
|
|
43125
|
-
});
|
|
43126
|
-
return _context24.abrupt("return", 1);
|
|
43127
|
-
case 46:
|
|
43128
|
-
if (!getPoint2.isKeyWordPicked("U")) {
|
|
43129
|
-
_context24.next = 52;
|
|
43130
|
-
break;
|
|
43131
|
-
}
|
|
43132
|
-
_ref13 = cachings.pop() || [], _ref14 = _slicedToArray$1(_ref13, 2), _ids = _ref14[0], ents = _ref14[1];
|
|
43133
|
-
_ids === null || _ids === void 0 ? void 0 : _ids.forEach(function (id) {
|
|
43134
|
-
id.erase();
|
|
43135
|
-
});
|
|
43136
|
-
mxcad = MxCpp.getCurrentMxCAD();
|
|
43137
|
-
ents === null || ents === void 0 ? void 0 : ents.forEach(function (ent) {
|
|
43138
|
-
if (ent instanceof McDbEntity) mxcad.drawEntity(ent);
|
|
43139
|
-
});
|
|
43140
|
-
return _context24.abrupt("return", 1);
|
|
43141
|
-
case 52:
|
|
43142
43120
|
ids = ss2.getIds();
|
|
43143
43121
|
if (!(ids.length == 0)) {
|
|
43144
|
-
_context24.next =
|
|
43122
|
+
_context24.next = 10;
|
|
43145
43123
|
break;
|
|
43146
43124
|
}
|
|
43147
43125
|
return _context24.abrupt("return", 1);
|
|
43148
|
-
case
|
|
43126
|
+
case 10:
|
|
43149
43127
|
selPoint = ss2.getSelectPoint();
|
|
43150
|
-
if (!isByWindow) {
|
|
43151
|
-
_context24.next = 67;
|
|
43152
|
-
break;
|
|
43153
|
-
}
|
|
43154
|
-
_pt2 = selPoint.pt1, pt2 = selPoint.pt2;
|
|
43155
|
-
_pl = new McDbPolyline();
|
|
43156
|
-
_pl.addVertexAt(_pt2);
|
|
43157
|
-
_pl.addVertexAt(new McGePoint3d(_pt2.x, pt2.y));
|
|
43158
|
-
_pl.addVertexAt(pt2);
|
|
43159
|
-
_pl.addVertexAt(new McGePoint3d(pt2.x, _pt2.y));
|
|
43160
|
-
_pl.isClosed = true;
|
|
43161
|
-
cachings.push([aryId, aryId.map(function (id) {
|
|
43162
|
-
return id.clone();
|
|
43163
|
-
})]);
|
|
43164
|
-
aryId.forEach(function (objId) {
|
|
43165
|
-
var ent = objId.getMcDbEntity();
|
|
43166
|
-
if (!(ent instanceof McDbCurve)) return;
|
|
43167
|
-
var intersectPoints = ent.IntersectWith(_pl, McDb.Intersect.kOnBothOperands);
|
|
43168
|
-
if (intersectPoints.isEmpty()) return;
|
|
43169
|
-
intersectPoints.forEach(function (point) {
|
|
43170
|
-
aryIdLong.copyFormAryId([objId]);
|
|
43171
|
-
isShiftKey2 ? mxcadExtendAssert.DoExtend(aryIdLong.imp, point.x, point.y, point.x, point.y) : mxcadTrimAssert.DoTrim(aryIdLong.imp, point.x, point.y, point.x, point.y);
|
|
43172
|
-
});
|
|
43173
|
-
});
|
|
43174
|
-
return _context24.abrupt("return", 1);
|
|
43175
|
-
case 67:
|
|
43176
|
-
cachings.push([ids, aryId.map(function (id) {
|
|
43177
|
-
return id.clone();
|
|
43178
|
-
})]);
|
|
43179
43128
|
aryIdLong.copyFormAryId(ids);
|
|
43180
|
-
|
|
43181
|
-
case
|
|
43129
|
+
mxcadTrimAssert.DoTrim(aryIdLong.imp, selPoint.pt1.x, selPoint.pt1.y, selPoint.pt2.x, selPoint.pt2.y);
|
|
43130
|
+
case 13:
|
|
43182
43131
|
case "end":
|
|
43183
43132
|
return _context24.stop();
|
|
43184
43133
|
}
|
|
43185
43134
|
}, _loop7);
|
|
43186
43135
|
});
|
|
43187
|
-
case
|
|
43188
|
-
return _context25.delegateYield(_loop7(), "t0",
|
|
43189
|
-
case
|
|
43136
|
+
case 18:
|
|
43137
|
+
return _context25.delegateYield(_loop7(), "t0", 20);
|
|
43138
|
+
case 20:
|
|
43190
43139
|
_ret7 = _context25.t0;
|
|
43191
43140
|
if (!(_ret7 === 0)) {
|
|
43192
|
-
_context25.next =
|
|
43141
|
+
_context25.next = 23;
|
|
43193
43142
|
break;
|
|
43194
43143
|
}
|
|
43195
|
-
return _context25.abrupt("break",
|
|
43196
|
-
case
|
|
43144
|
+
return _context25.abrupt("break", 27);
|
|
43145
|
+
case 23:
|
|
43197
43146
|
if (!(_ret7 === 1)) {
|
|
43198
|
-
_context25.next =
|
|
43147
|
+
_context25.next = 25;
|
|
43199
43148
|
break;
|
|
43200
43149
|
}
|
|
43201
|
-
return _context25.abrupt("continue",
|
|
43202
|
-
case
|
|
43203
|
-
|
|
43204
|
-
_context25.next = 39;
|
|
43205
|
-
break;
|
|
43206
|
-
}
|
|
43207
|
-
return _context25.abrupt("return", _ret7.v);
|
|
43208
|
-
case 39:
|
|
43209
|
-
_context25.next = 30;
|
|
43150
|
+
return _context25.abrupt("continue", 18);
|
|
43151
|
+
case 25:
|
|
43152
|
+
_context25.next = 18;
|
|
43210
43153
|
break;
|
|
43211
|
-
case
|
|
43212
|
-
window.removeEventListener("keydown", onKeydown2);
|
|
43213
|
-
window.removeEventListener("keyup", onkeyup);
|
|
43154
|
+
case 27:
|
|
43214
43155
|
mxcadTrimAssert.UnInit();
|
|
43215
|
-
|
|
43216
|
-
case 45:
|
|
43156
|
+
case 28:
|
|
43217
43157
|
case "end":
|
|
43218
43158
|
return _context25.stop();
|
|
43219
43159
|
}
|
|
@@ -43293,7 +43233,7 @@ function _Mx_Extend() {
|
|
|
43293
43233
|
};
|
|
43294
43234
|
window.addEventListener("keyup", onkeyup);
|
|
43295
43235
|
_loop8 = /*#__PURE__*/regenerator.mark(function _loop8() {
|
|
43296
|
-
var ss2, getPoint2, points, pl, getKey, key,
|
|
43236
|
+
var ss2, getPoint2, points, pl, getKey, key, _ref13, _ref14, ids2, ents, mxcad, ids, selPoint, _pt2, pt2, _pl;
|
|
43297
43237
|
return regenerator.wrap(function _loop8$(_context26) {
|
|
43298
43238
|
while (1) switch (_context26.prev = _context26.next) {
|
|
43299
43239
|
case 0:
|
|
@@ -43399,7 +43339,7 @@ function _Mx_Extend() {
|
|
|
43399
43339
|
_context26.next = 46;
|
|
43400
43340
|
break;
|
|
43401
43341
|
}
|
|
43402
|
-
|
|
43342
|
+
_ref13 = cachings.pop() || [], _ref14 = _slicedToArray$1(_ref13, 2), ids2 = _ref14[0], ents = _ref14[1];
|
|
43403
43343
|
console.log(ids2);
|
|
43404
43344
|
ids2 === null || ids2 === void 0 ? void 0 : ids2.forEach(function (id) {
|
|
43405
43345
|
id.erase();
|
|
@@ -43422,20 +43362,20 @@ function _Mx_Extend() {
|
|
|
43422
43362
|
_context26.next = 61;
|
|
43423
43363
|
break;
|
|
43424
43364
|
}
|
|
43425
|
-
|
|
43426
|
-
|
|
43427
|
-
|
|
43428
|
-
|
|
43429
|
-
|
|
43430
|
-
|
|
43431
|
-
|
|
43365
|
+
_pt2 = selPoint.pt1, pt2 = selPoint.pt2;
|
|
43366
|
+
_pl = new McDbPolyline();
|
|
43367
|
+
_pl.addVertexAt(_pt2);
|
|
43368
|
+
_pl.addVertexAt(new McGePoint3d(_pt2.x, pt2.y));
|
|
43369
|
+
_pl.addVertexAt(pt2);
|
|
43370
|
+
_pl.addVertexAt(new McGePoint3d(pt2.x, _pt2.y));
|
|
43371
|
+
_pl.isClosed = true;
|
|
43432
43372
|
cachings.push([aryId, aryId.map(function (id) {
|
|
43433
43373
|
return id.clone();
|
|
43434
43374
|
})]);
|
|
43435
43375
|
aryId.forEach(function (objId) {
|
|
43436
43376
|
var ent = objId.getMcDbEntity();
|
|
43437
43377
|
if (!(ent instanceof McDbCurve)) return;
|
|
43438
|
-
var intersectPoints = ent.IntersectWith(
|
|
43378
|
+
var intersectPoints = ent.IntersectWith(_pl, McDb.Intersect.kOnBothOperands);
|
|
43439
43379
|
if (intersectPoints.isEmpty()) return;
|
|
43440
43380
|
intersectPoints.forEach(function (point) {
|
|
43441
43381
|
aryIdLong.copyFormAryId([objId]);
|
|
@@ -44099,7 +44039,7 @@ function _Mx_PasteClipboard() {
|
|
|
44099
44039
|
case 0:
|
|
44100
44040
|
getClipboardDataToFile = function _getClipboardDataToFi(storeName2, sWriteFile) {
|
|
44101
44041
|
return new Promise( /*#__PURE__*/function () {
|
|
44102
|
-
var
|
|
44042
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee28(res) {
|
|
44103
44043
|
var db, transaction, objectStore, request;
|
|
44104
44044
|
return regenerator.wrap(function _callee28$(_context37) {
|
|
44105
44045
|
while (1) switch (_context37.prev = _context37.next) {
|
|
@@ -44127,7 +44067,7 @@ function _Mx_PasteClipboard() {
|
|
|
44127
44067
|
}, _callee28);
|
|
44128
44068
|
}));
|
|
44129
44069
|
return function (_x2) {
|
|
44130
|
-
return
|
|
44070
|
+
return _ref15.apply(this, arguments);
|
|
44131
44071
|
};
|
|
44132
44072
|
}());
|
|
44133
44073
|
};
|