mxcad 1.0.362 → 1.0.364
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 +122 -2
- package/dist/mxcad.es.js +313 -15
- package/dist/mxcad.umd.js +3 -3
- package/dist/wasm/2d/mxdrawassembly_min.js +2232 -2181
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +2230 -2178
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -8556,7 +8556,21 @@ export declare class McDbRasterImage extends McDbEntity {
|
|
|
8556
8556
|
* }
|
|
8557
8557
|
* ```
|
|
8558
8558
|
*/
|
|
8559
|
-
setClipBoundary(type: McDb.ClipBoundaryType, aryPoint: McGePoint3dArray): boolean;
|
|
8559
|
+
setClipBoundary(type: McDb.ClipBoundaryType, aryPoint: McGePoint3dArray, isWroldCoords?: boolean): boolean;
|
|
8560
|
+
/**
|
|
8561
|
+
* 图片是否使用剪切边界
|
|
8562
|
+
* @example
|
|
8563
|
+
* ```ts
|
|
8564
|
+
* ```
|
|
8565
|
+
*/
|
|
8566
|
+
isClip(): boolean;
|
|
8567
|
+
/**
|
|
8568
|
+
* 设置图片使用剪切边界
|
|
8569
|
+
* @example
|
|
8570
|
+
* ```ts
|
|
8571
|
+
* ```
|
|
8572
|
+
*/
|
|
8573
|
+
setClip(isClip: boolean): void;
|
|
8560
8574
|
/**
|
|
8561
8575
|
* 获取图像对象的裁剪边界
|
|
8562
8576
|
* @example
|
|
@@ -8839,6 +8853,92 @@ export declare class McDbRay extends McDbEntity {
|
|
|
8839
8853
|
*/
|
|
8840
8854
|
get unitDir(): McGeVector3d;
|
|
8841
8855
|
}
|
|
8856
|
+
/**
|
|
8857
|
+
* 表示面域对象。
|
|
8858
|
+
* @example
|
|
8859
|
+
* ```ts
|
|
8860
|
+
* ```
|
|
8861
|
+
*/
|
|
8862
|
+
export declare class McDbMxRegion extends McDbEntity {
|
|
8863
|
+
/**
|
|
8864
|
+
* 构造函数。
|
|
8865
|
+
* @param imp 内部对象。
|
|
8866
|
+
* @example
|
|
8867
|
+
* ```ts
|
|
8868
|
+
* ```
|
|
8869
|
+
*/
|
|
8870
|
+
constructor(imp?: any);
|
|
8871
|
+
/**
|
|
8872
|
+
* 得到面域的边界数目
|
|
8873
|
+
* @example
|
|
8874
|
+
* ```ts
|
|
8875
|
+
* ```
|
|
8876
|
+
*/
|
|
8877
|
+
getContourCount(): number;
|
|
8878
|
+
/**
|
|
8879
|
+
* 得到面域的边界坐标
|
|
8880
|
+
* @example
|
|
8881
|
+
* ```ts
|
|
8882
|
+
* ```
|
|
8883
|
+
*/
|
|
8884
|
+
getContour(index: number): McGePoint3dArray;
|
|
8885
|
+
/**
|
|
8886
|
+
* 给面域添加边界坐标
|
|
8887
|
+
* @example
|
|
8888
|
+
* ```ts
|
|
8889
|
+
* ```
|
|
8890
|
+
*/
|
|
8891
|
+
addContour(points: McGePoint3dArray): boolean;
|
|
8892
|
+
/**
|
|
8893
|
+
* 从一个曲线对象数据给面域添加边界坐标
|
|
8894
|
+
* @example
|
|
8895
|
+
* ```ts
|
|
8896
|
+
* ```
|
|
8897
|
+
*/
|
|
8898
|
+
addEntityContour(entity: McDbEntity, approxEps?: number): boolean;
|
|
8899
|
+
/**
|
|
8900
|
+
* 面域与面域之前进行bool运行
|
|
8901
|
+
* @example
|
|
8902
|
+
* ```ts
|
|
8903
|
+
* ```
|
|
8904
|
+
*/
|
|
8905
|
+
booleanOption(type: McDb.BooleanOptionType, other: McDbMxRegion): McDbMxRegion[];
|
|
8906
|
+
/**
|
|
8907
|
+
* 偏移面域边界
|
|
8908
|
+
* @example
|
|
8909
|
+
* ```ts
|
|
8910
|
+
* ```
|
|
8911
|
+
*/
|
|
8912
|
+
inflatePaths(delta: number, joinType?: number, endType?: number): McDbMxRegion;
|
|
8913
|
+
/**
|
|
8914
|
+
* 三角化面域
|
|
8915
|
+
* @example
|
|
8916
|
+
* ```ts
|
|
8917
|
+
* ```
|
|
8918
|
+
*/
|
|
8919
|
+
triangulate(useDelaunay?: boolean): McDbMxRegion;
|
|
8920
|
+
/**
|
|
8921
|
+
* 面域数据是否为空
|
|
8922
|
+
* @example
|
|
8923
|
+
* ```ts
|
|
8924
|
+
* ```
|
|
8925
|
+
*/
|
|
8926
|
+
isEmpty(): boolean;
|
|
8927
|
+
/**
|
|
8928
|
+
* 清除面域数据
|
|
8929
|
+
* @example
|
|
8930
|
+
* ```ts
|
|
8931
|
+
* ```
|
|
8932
|
+
*/
|
|
8933
|
+
clearData(): boolean;
|
|
8934
|
+
/**
|
|
8935
|
+
* 从另一个面域数据拷贝数据
|
|
8936
|
+
* @example
|
|
8937
|
+
* ```ts
|
|
8938
|
+
* ```
|
|
8939
|
+
*/
|
|
8940
|
+
copyData(fromRegion: McDbMxRegion): boolean;
|
|
8941
|
+
}
|
|
8842
8942
|
/**
|
|
8843
8943
|
* Dxf组码
|
|
8844
8944
|
* @public
|
|
@@ -8884,6 +8984,16 @@ export declare namespace McDb {
|
|
|
8884
8984
|
/** 3D Polyline */
|
|
8885
8985
|
k3dPolyline = 2
|
|
8886
8986
|
}
|
|
8987
|
+
/**
|
|
8988
|
+
* 面域bool运行类型
|
|
8989
|
+
* @public
|
|
8990
|
+
*/
|
|
8991
|
+
enum BooleanOptionType {
|
|
8992
|
+
Intersection = 0,
|
|
8993
|
+
Union = 1,
|
|
8994
|
+
Difference = 2,
|
|
8995
|
+
Xor = 3
|
|
8996
|
+
}
|
|
8887
8997
|
/**
|
|
8888
8998
|
* 文本水平对齐方式枚举。
|
|
8889
8999
|
* @public
|
|
@@ -12058,7 +12168,7 @@ export declare class McObject {
|
|
|
12058
12168
|
* mxcad.addCurrentSelect(id);
|
|
12059
12169
|
* ```
|
|
12060
12170
|
*/
|
|
12061
|
-
addCurrentSelect(id: McObjectId | McObjectId[], isDisplayGrid?: boolean): void;
|
|
12171
|
+
addCurrentSelect(id: McObjectId | McObjectId[], isDisplayGrid?: boolean, fireSelectEvent?: boolean): void;
|
|
12062
12172
|
/**
|
|
12063
12173
|
* 清除当前所有选择
|
|
12064
12174
|
* @example
|
|
@@ -12070,6 +12180,16 @@ export declare class McObject {
|
|
|
12070
12180
|
* ```
|
|
12071
12181
|
*/
|
|
12072
12182
|
clearMxCurrentSelect(): void;
|
|
12183
|
+
/**
|
|
12184
|
+
* 清除显示的夹点
|
|
12185
|
+
* @returns void
|
|
12186
|
+
* @example
|
|
12187
|
+
* ```typescript
|
|
12188
|
+
*
|
|
12189
|
+
*
|
|
12190
|
+
* ```
|
|
12191
|
+
*/
|
|
12192
|
+
clearGripDisplay(): void;
|
|
12073
12193
|
/**
|
|
12074
12194
|
* 把当前显示范围移到指定的显示范围
|
|
12075
12195
|
* @param minPt 坐标1 McGePoint3d
|
package/dist/mxcad.es.js
CHANGED
|
@@ -15080,7 +15080,7 @@ win.McDrawObjectEvent_asciiToUTF8 = function (hexstr) {
|
|
|
15080
15080
|
return MxG2312Obj.decodeFromGb2312Imp(hexstr);
|
|
15081
15081
|
};
|
|
15082
15082
|
|
|
15083
|
-
const version$1 = "1.0.
|
|
15083
|
+
const version$1 = "1.0.363";
|
|
15084
15084
|
|
|
15085
15085
|
var isSharedArrayBuffer = "SharedArrayBuffer" in window;
|
|
15086
15086
|
var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
|
|
@@ -19446,7 +19446,18 @@ var McDbRasterImage = /*#__PURE__*/function (_McDbEntity9) {
|
|
|
19446
19446
|
}, {
|
|
19447
19447
|
key: "setClipBoundary",
|
|
19448
19448
|
value: function setClipBoundary(type, aryPoint) {
|
|
19449
|
-
|
|
19449
|
+
var isWroldCoords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
19450
|
+
return this.imp.setClipBoundary(type, aryPoint.imp, isWroldCoords);
|
|
19451
|
+
}
|
|
19452
|
+
}, {
|
|
19453
|
+
key: "isClip",
|
|
19454
|
+
value: function isClip() {
|
|
19455
|
+
return this.imp.isClip();
|
|
19456
|
+
}
|
|
19457
|
+
}, {
|
|
19458
|
+
key: "setClip",
|
|
19459
|
+
value: function setClip(isClip) {
|
|
19460
|
+
this.imp.setClip(isClip);
|
|
19450
19461
|
}
|
|
19451
19462
|
}, {
|
|
19452
19463
|
key: "clipBoundary",
|
|
@@ -19703,6 +19714,85 @@ var McDbRay = /*#__PURE__*/function (_McDbEntity11) {
|
|
|
19703
19714
|
}]);
|
|
19704
19715
|
return McDbRay;
|
|
19705
19716
|
}(McDbEntity);
|
|
19717
|
+
var McDbMxRegion = /*#__PURE__*/function (_McDbEntity12) {
|
|
19718
|
+
_inherits$1(McDbMxRegion, _McDbEntity12);
|
|
19719
|
+
var _super27 = _createSuper$9(McDbMxRegion);
|
|
19720
|
+
function McDbMxRegion(imp) {
|
|
19721
|
+
var _this23;
|
|
19722
|
+
_classCallCheck$1(this, McDbMxRegion);
|
|
19723
|
+
_this23 = _super27.call(this, imp);
|
|
19724
|
+
if (!imp) {
|
|
19725
|
+
_this23.initTempObject(new MxCpp.mxcadassemblyimp.MdDbMxRegion());
|
|
19726
|
+
}
|
|
19727
|
+
return _this23;
|
|
19728
|
+
}
|
|
19729
|
+
_createClass$1(McDbMxRegion, [{
|
|
19730
|
+
key: "getContourCount",
|
|
19731
|
+
value: function getContourCount() {
|
|
19732
|
+
return this.imp.getContourCount();
|
|
19733
|
+
}
|
|
19734
|
+
}, {
|
|
19735
|
+
key: "getContour",
|
|
19736
|
+
value: function getContour(index) {
|
|
19737
|
+
return new McGePoint3dArray(this.imp.getContour(index), true);
|
|
19738
|
+
}
|
|
19739
|
+
}, {
|
|
19740
|
+
key: "addContour",
|
|
19741
|
+
value: function addContour(points) {
|
|
19742
|
+
return this.imp.addContour(points.imp);
|
|
19743
|
+
}
|
|
19744
|
+
}, {
|
|
19745
|
+
key: "addEntityContour",
|
|
19746
|
+
value: function addEntityContour(entity) {
|
|
19747
|
+
var approxEps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e-5;
|
|
19748
|
+
return this.imp.addEntityContour(entity.imp, approxEps);
|
|
19749
|
+
}
|
|
19750
|
+
}, {
|
|
19751
|
+
key: "booleanOption",
|
|
19752
|
+
value: function booleanOption(type, other) {
|
|
19753
|
+
var ret = new MxCADResbuf(this.imp.booleanOption(type, other.imp));
|
|
19754
|
+
var retAry = [];
|
|
19755
|
+
if (ret.GetCount() == 0) ;
|
|
19756
|
+
var iConut = ret.GetCount();
|
|
19757
|
+
for (var j = 0; j < iConut; j++) {
|
|
19758
|
+
var atobj = ret.AtObject(j);
|
|
19759
|
+
if (atobj.ret && atobj.val instanceof McDbMxRegion) {
|
|
19760
|
+
retAry.push(atobj.val);
|
|
19761
|
+
}
|
|
19762
|
+
}
|
|
19763
|
+
return retAry;
|
|
19764
|
+
}
|
|
19765
|
+
}, {
|
|
19766
|
+
key: "inflatePaths",
|
|
19767
|
+
value: function inflatePaths(delta) {
|
|
19768
|
+
var joinType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
19769
|
+
var endType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
19770
|
+
return new McDbMxRegion(this.imp.inflatePaths(delta, joinType, endType));
|
|
19771
|
+
}
|
|
19772
|
+
}, {
|
|
19773
|
+
key: "triangulate",
|
|
19774
|
+
value: function triangulate() {
|
|
19775
|
+
var useDelaunay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
19776
|
+
return new McDbMxRegion(this.imp.triangulate(useDelaunay));
|
|
19777
|
+
}
|
|
19778
|
+
}, {
|
|
19779
|
+
key: "isEmpty",
|
|
19780
|
+
value: function isEmpty() {
|
|
19781
|
+
return this.imp.isEmpty();
|
|
19782
|
+
}
|
|
19783
|
+
}, {
|
|
19784
|
+
key: "clearData",
|
|
19785
|
+
value: function clearData() {
|
|
19786
|
+
return this.imp.clearData();
|
|
19787
|
+
}
|
|
19788
|
+
}, {
|
|
19789
|
+
key: "copyData",
|
|
19790
|
+
value: function copyData(fromRegion) {
|
|
19791
|
+
return this.imp.copyData(fromRegion.imp);
|
|
19792
|
+
}
|
|
19793
|
+
}]);
|
|
19794
|
+
return McDbMxRegion;
|
|
19795
|
+
}(McDbEntity);
|
|
19706
19796
|
|
|
19707
19797
|
function _createSuper$8(t) { var r = _isNativeReflectConstruct$9(); return function () { var e, o = _getPrototypeOf$1(t); if (r) { var s = _getPrototypeOf$1(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn$1(this, e); }; }
|
|
19708
19798
|
function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -20392,6 +20482,12 @@ var McDb;
|
|
|
20392
20482
|
PolylineType2[PolylineType2["kLwPolyline"] = 0] = "kLwPolyline";
|
|
20393
20483
|
PolylineType2[PolylineType2["k3dPolyline"] = 2] = "k3dPolyline";
|
|
20394
20484
|
})(McDb2.PolylineType || (McDb2.PolylineType = {}));
|
|
20485
|
+
(function (BooleanOptionType2) {
|
|
20486
|
+
BooleanOptionType2[BooleanOptionType2["Intersection"] = 0] = "Intersection";
|
|
20487
|
+
BooleanOptionType2[BooleanOptionType2["Union"] = 1] = "Union";
|
|
20488
|
+
BooleanOptionType2[BooleanOptionType2["Difference"] = 2] = "Difference";
|
|
20489
|
+
BooleanOptionType2[BooleanOptionType2["Xor"] = 3] = "Xor";
|
|
20490
|
+
})(McDb2.BooleanOptionType || (McDb2.BooleanOptionType = {}));
|
|
20395
20491
|
(function (TextHorzMode2) {
|
|
20396
20492
|
TextHorzMode2[TextHorzMode2["kTextLeft"] = 0] = "kTextLeft";
|
|
20397
20493
|
TextHorzMode2[TextHorzMode2["kTextCenter"] = 1] = "kTextCenter";
|
|
@@ -22615,6 +22711,7 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22615
22711
|
value: function addCurrentSelect(id) {
|
|
22616
22712
|
var _this3 = this;
|
|
22617
22713
|
var isDisplayGrid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
22714
|
+
var fireSelectEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
22618
22715
|
if (id instanceof Array) {
|
|
22619
22716
|
var isFireSelectEvent = false;
|
|
22620
22717
|
var isFireMxCADSelectEvent = false;
|
|
@@ -22629,17 +22726,19 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22629
22726
|
}
|
|
22630
22727
|
}
|
|
22631
22728
|
});
|
|
22632
|
-
if (
|
|
22633
|
-
|
|
22634
|
-
|
|
22635
|
-
|
|
22636
|
-
|
|
22729
|
+
if (fireSelectEvent) {
|
|
22730
|
+
if (isFireSelectEvent) {
|
|
22731
|
+
this.getMxDrawObject().fireSelectChange(false);
|
|
22732
|
+
}
|
|
22733
|
+
if (isFireMxCADSelectEvent) {
|
|
22734
|
+
this.getMxDrawObject().fireSelectChange(true);
|
|
22735
|
+
}
|
|
22637
22736
|
}
|
|
22638
22737
|
} else {
|
|
22639
22738
|
if (id.type == McObjectIdType.kMxDraw) {
|
|
22640
|
-
this.getMxDrawObject().addMxCurrentSelect(id.id,
|
|
22739
|
+
this.getMxDrawObject().addMxCurrentSelect(id.id, fireSelectEvent, isDisplayGrid);
|
|
22641
22740
|
} else if (id.type == McObjectIdType.kMxCAD) {
|
|
22642
|
-
this.getMxDrawObject().addMxCADCurrentSelect(id.id,
|
|
22741
|
+
this.getMxDrawObject().addMxCADCurrentSelect(id.id, fireSelectEvent, isDisplayGrid);
|
|
22643
22742
|
}
|
|
22644
22743
|
}
|
|
22645
22744
|
}
|
|
@@ -22648,6 +22747,11 @@ var McObject = /*#__PURE__*/function () {
|
|
|
22648
22747
|
value: function clearMxCurrentSelect() {
|
|
22649
22748
|
this.getMxDrawObject().clearMxCurrentSelect();
|
|
22650
22749
|
}
|
|
22750
|
+
}, {
|
|
22751
|
+
key: "clearGripDisplay",
|
|
22752
|
+
value: function clearGripDisplay() {
|
|
22753
|
+
this.getMxDrawObject().clearGripDisplay();
|
|
22754
|
+
}
|
|
22651
22755
|
}, {
|
|
22652
22756
|
key: "zoomW",
|
|
22653
22757
|
value: function zoomW(minPt, maxPt) {
|
|
@@ -23759,6 +23863,12 @@ var McAppType = /*#__PURE__*/function () {
|
|
|
23759
23863
|
this.classNameToCreateCalls["McDbRay"] = function () {
|
|
23760
23864
|
return new McDbRay();
|
|
23761
23865
|
};
|
|
23866
|
+
this.objectIdToObjectCalls["McDbMxRegion"] = function (lIdIndex) {
|
|
23867
|
+
return new McDbMxRegion(_this8.imp.ObjectIdToMdDbMxRegion(lIdIndex));
|
|
23868
|
+
};
|
|
23869
|
+
this.classNameToCreateCalls["McDbMxRegion"] = function () {
|
|
23870
|
+
return new McDbMxRegion();
|
|
23871
|
+
};
|
|
23762
23872
|
this.objectIdToObjectCalls["McDbDictionary"] = function (lIdIndex) {
|
|
23763
23873
|
return new McDbDictionary(_this8.imp.ObjectIdToMdDbDictionary(lIdIndex));
|
|
23764
23874
|
};
|
|
@@ -36807,14 +36917,14 @@ var createMxCad = /*#__PURE__*/function () {
|
|
|
36807
36917
|
_context.next = 36;
|
|
36808
36918
|
break;
|
|
36809
36919
|
}
|
|
36920
|
+
if (authorized_service) {
|
|
36921
|
+
mxCadObj.iniAuthorizedService(authorized_service);
|
|
36922
|
+
}
|
|
36810
36923
|
if (!(registdata && registdata.length > 0)) {
|
|
36811
36924
|
_context.next = 30;
|
|
36812
36925
|
break;
|
|
36813
36926
|
}
|
|
36814
36927
|
mxCadObj.initRegist(registdata);
|
|
36815
|
-
if (authorized_service) {
|
|
36816
|
-
mxCadObj.iniAuthorizedService(authorized_service);
|
|
36817
|
-
}
|
|
36818
36928
|
_context.next = 36;
|
|
36819
36929
|
break;
|
|
36820
36930
|
case 30:
|
|
@@ -36897,8 +37007,8 @@ var createMxCad = /*#__PURE__*/function () {
|
|
|
36897
37007
|
}
|
|
36898
37008
|
if (fileUrl) {
|
|
36899
37009
|
fetchAttributes = 0;
|
|
36900
|
-
if (openParameter && openParameter) {
|
|
36901
|
-
fetchAttributes = openParameter;
|
|
37010
|
+
if (openParameter && openParameter["fetchAttributes"]) {
|
|
37011
|
+
fetchAttributes = openParameter["fetchAttributes"];
|
|
36902
37012
|
}
|
|
36903
37013
|
mxCadObj.openWebFile(fileUrl, void 0, true, openParameter, fetchAttributes);
|
|
36904
37014
|
}
|
|
@@ -38003,6 +38113,188 @@ function _Mx_Ray() {
|
|
|
38003
38113
|
}));
|
|
38004
38114
|
return _Mx_Ray.apply(this, arguments);
|
|
38005
38115
|
}
|
|
38116
|
+
function Mx_Region() {
|
|
38117
|
+
return _Mx_Region.apply(this, arguments);
|
|
38118
|
+
}
|
|
38119
|
+
function _Mx_Region() {
|
|
38120
|
+
_Mx_Region = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee6() {
|
|
38121
|
+
var retIds, ent, region;
|
|
38122
|
+
return regenerator.wrap(function _callee6$(_context6) {
|
|
38123
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
38124
|
+
case 0:
|
|
38125
|
+
_context6.next = 2;
|
|
38126
|
+
return MxCADUtility.selectEnt("\u9009\u62E9\u5BF9\u8C61", new MxCADResbuf([DxfCode.kEntityType, "LWPOLYLINE,ARC,CIRCLE"]));
|
|
38127
|
+
case 2:
|
|
38128
|
+
retIds = _context6.sent;
|
|
38129
|
+
if (!(retIds.length == 0)) {
|
|
38130
|
+
_context6.next = 5;
|
|
38131
|
+
break;
|
|
38132
|
+
}
|
|
38133
|
+
return _context6.abrupt("return");
|
|
38134
|
+
case 5:
|
|
38135
|
+
ent = retIds[0].getMcDbEntity();
|
|
38136
|
+
if (!(ent == null)) {
|
|
38137
|
+
_context6.next = 8;
|
|
38138
|
+
break;
|
|
38139
|
+
}
|
|
38140
|
+
return _context6.abrupt("return");
|
|
38141
|
+
case 8:
|
|
38142
|
+
region = new McDbMxRegion();
|
|
38143
|
+
if (region.addEntityContour(ent)) {
|
|
38144
|
+
_context6.next = 12;
|
|
38145
|
+
break;
|
|
38146
|
+
}
|
|
38147
|
+
MxFun.acutPrintf("\n \u521B\u5EFA\u9762\u57DF\u5931\u8D25");
|
|
38148
|
+
return _context6.abrupt("return");
|
|
38149
|
+
case 12:
|
|
38150
|
+
ent.erase();
|
|
38151
|
+
MxCpp.mxcad.drawEntity(region);
|
|
38152
|
+
MxFun.acutPrintf("\n \u521B\u5EFA1\u4E2A\u9762\u57DF\u5BF9\u8C61");
|
|
38153
|
+
case 15:
|
|
38154
|
+
case "end":
|
|
38155
|
+
return _context6.stop();
|
|
38156
|
+
}
|
|
38157
|
+
}, _callee6);
|
|
38158
|
+
}));
|
|
38159
|
+
return _Mx_Region.apply(this, arguments);
|
|
38160
|
+
}
|
|
38161
|
+
function Mx_BooleanOptionImp(_x) {
|
|
38162
|
+
return _Mx_BooleanOptionImp.apply(this, arguments);
|
|
38163
|
+
}
|
|
38164
|
+
function _Mx_BooleanOptionImp() {
|
|
38165
|
+
_Mx_BooleanOptionImp = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee7(type) {
|
|
38166
|
+
var ss, ids, ent1, region1, ent2, region2, newRegions;
|
|
38167
|
+
return regenerator.wrap(function _callee7$(_context7) {
|
|
38168
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
38169
|
+
case 0:
|
|
38170
|
+
ss = new MxCADSelectionSet();
|
|
38171
|
+
_context7.next = 3;
|
|
38172
|
+
return ss.userSelect("\u9009\u62E9\u9762\u57DF", new MxCADResbuf([DxfCode.kEntityType, "MXREGION"]));
|
|
38173
|
+
case 3:
|
|
38174
|
+
if (_context7.sent) {
|
|
38175
|
+
_context7.next = 5;
|
|
38176
|
+
break;
|
|
38177
|
+
}
|
|
38178
|
+
return _context7.abrupt("return");
|
|
38179
|
+
case 5:
|
|
38180
|
+
ids = ss.getIds();
|
|
38181
|
+
if (!(ids.length < 2)) {
|
|
38182
|
+
_context7.next = 9;
|
|
38183
|
+
break;
|
|
38184
|
+
}
|
|
38185
|
+
MxFun.acutPrintf("\n \u5FC5\u987B\u9009\u62E9 2 \u4E2A\u9762\u57DF");
|
|
38186
|
+
return _context7.abrupt("return");
|
|
38187
|
+
case 9:
|
|
38188
|
+
ent1 = ids[0].getMcDbEntity();
|
|
38189
|
+
if (!(ent1 == null || !(ent1 instanceof McDbMxRegion))) {
|
|
38190
|
+
_context7.next = 13;
|
|
38191
|
+
break;
|
|
38192
|
+
}
|
|
38193
|
+
MxFun.acutPrintf("\n \u5F97\u5230\u9762\u57DF\u5BF9\u8C61\u5931\u8D25");
|
|
38194
|
+
return _context7.abrupt("return");
|
|
38195
|
+
case 13:
|
|
38196
|
+
region1 = ent1;
|
|
38197
|
+
ent2 = ids[1].getMcDbEntity();
|
|
38198
|
+
if (!(ent2 == null || !(ent2 instanceof McDbMxRegion))) {
|
|
38199
|
+
_context7.next = 18;
|
|
38200
|
+
break;
|
|
38201
|
+
}
|
|
38202
|
+
MxFun.acutPrintf("\n \u5F97\u5230\u9762\u57DF\u5BF9\u8C61\u5931\u8D25");
|
|
38203
|
+
return _context7.abrupt("return");
|
|
38204
|
+
case 18:
|
|
38205
|
+
region2 = ent2;
|
|
38206
|
+
newRegions = region1.booleanOption(type, region2);
|
|
38207
|
+
if (!(newRegions.length == 0)) {
|
|
38208
|
+
_context7.next = 23;
|
|
38209
|
+
break;
|
|
38210
|
+
}
|
|
38211
|
+
MxFun.acutPrintf("\n \u9762\u57DFbool\u8FD0\u7B97\u5BF9\u8C61\u5931\u8D25");
|
|
38212
|
+
return _context7.abrupt("return");
|
|
38213
|
+
case 23:
|
|
38214
|
+
MxCpp.mxcad.drawEntity(newRegions[0]);
|
|
38215
|
+
ent1.erase();
|
|
38216
|
+
ent2.erase();
|
|
38217
|
+
MxFun.acutPrintf("\n \u9762\u57DFbool\u8FD0\u7B97\u5BF9\u8C61\u6210\u529F");
|
|
38218
|
+
case 27:
|
|
38219
|
+
case "end":
|
|
38220
|
+
return _context7.stop();
|
|
38221
|
+
}
|
|
38222
|
+
}, _callee7);
|
|
38223
|
+
}));
|
|
38224
|
+
return _Mx_BooleanOptionImp.apply(this, arguments);
|
|
38225
|
+
}
|
|
38226
|
+
function Mx_Union() {
|
|
38227
|
+
return _Mx_Union.apply(this, arguments);
|
|
38228
|
+
}
|
|
38229
|
+
function _Mx_Union() {
|
|
38230
|
+
_Mx_Union = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee8() {
|
|
38231
|
+
return regenerator.wrap(function _callee8$(_context8) {
|
|
38232
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
38233
|
+
case 0:
|
|
38234
|
+
_context8.next = 2;
|
|
38235
|
+
return Mx_BooleanOptionImp(McDb.BooleanOptionType.Union);
|
|
38236
|
+
case 2:
|
|
38237
|
+
case "end":
|
|
38238
|
+
return _context8.stop();
|
|
38239
|
+
}
|
|
38240
|
+
}, _callee8);
|
|
38241
|
+
}));
|
|
38242
|
+
return _Mx_Union.apply(this, arguments);
|
|
38243
|
+
}
|
|
38244
|
+
function Mx_Intersection() {
|
|
38245
|
+
return _Mx_Intersection.apply(this, arguments);
|
|
38246
|
+
}
|
|
38247
|
+
function _Mx_Intersection() {
|
|
38248
|
+
_Mx_Intersection = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee9() {
|
|
38249
|
+
return regenerator.wrap(function _callee9$(_context9) {
|
|
38250
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
38251
|
+
case 0:
|
|
38252
|
+
_context9.next = 2;
|
|
38253
|
+
return Mx_BooleanOptionImp(McDb.BooleanOptionType.Intersection);
|
|
38254
|
+
case 2:
|
|
38255
|
+
case "end":
|
|
38256
|
+
return _context9.stop();
|
|
38257
|
+
}
|
|
38258
|
+
}, _callee9);
|
|
38259
|
+
}));
|
|
38260
|
+
return _Mx_Intersection.apply(this, arguments);
|
|
38261
|
+
}
|
|
38262
|
+
function Mx_Difference() {
|
|
38263
|
+
return _Mx_Difference.apply(this, arguments);
|
|
38264
|
+
}
|
|
38265
|
+
function _Mx_Difference() {
|
|
38266
|
+
_Mx_Difference = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee0() {
|
|
38267
|
+
return regenerator.wrap(function _callee0$(_context0) {
|
|
38268
|
+
while (1) switch (_context0.prev = _context0.next) {
|
|
38269
|
+
case 0:
|
|
38270
|
+
_context0.next = 2;
|
|
38271
|
+
return Mx_BooleanOptionImp(McDb.BooleanOptionType.Difference);
|
|
38272
|
+
case 2:
|
|
38273
|
+
case "end":
|
|
38274
|
+
return _context0.stop();
|
|
38275
|
+
}
|
|
38276
|
+
}, _callee0);
|
|
38277
|
+
}));
|
|
38278
|
+
return _Mx_Difference.apply(this, arguments);
|
|
38279
|
+
}
|
|
38280
|
+
function Mx_Xor() {
|
|
38281
|
+
return _Mx_Xor.apply(this, arguments);
|
|
38282
|
+
}
|
|
38283
|
+
function _Mx_Xor() {
|
|
38284
|
+
_Mx_Xor = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee1() {
|
|
38285
|
+
return regenerator.wrap(function _callee1$(_context1) {
|
|
38286
|
+
while (1) switch (_context1.prev = _context1.next) {
|
|
38287
|
+
case 0:
|
|
38288
|
+
_context1.next = 2;
|
|
38289
|
+
return Mx_BooleanOptionImp(McDb.BooleanOptionType.Xor);
|
|
38290
|
+
case 2:
|
|
38291
|
+
case "end":
|
|
38292
|
+
return _context1.stop();
|
|
38293
|
+
}
|
|
38294
|
+
}, _callee1);
|
|
38295
|
+
}));
|
|
38296
|
+
return _Mx_Xor.apply(this, arguments);
|
|
38297
|
+
}
|
|
38006
38298
|
MxFun.on("init", function () {
|
|
38007
38299
|
MxFun.addCommand("Mx_Line", drawLine);
|
|
38008
38300
|
MxFun.addCommand("Mx_Point", Mx_Point);
|
|
@@ -38010,6 +38302,11 @@ MxFun.on("init", function () {
|
|
|
38010
38302
|
MxFun.addCommand("Mx_Spline", MxDb_Spline);
|
|
38011
38303
|
MxFun.addCommand("Mx_Xline", Mx_Xline);
|
|
38012
38304
|
MxFun.addCommand("Mx_Ray", Mx_Ray);
|
|
38305
|
+
MxFun.addCommand("Mx_Region", Mx_Region);
|
|
38306
|
+
MxFun.addCommand("Mx_Union", Mx_Union);
|
|
38307
|
+
MxFun.addCommand("Mx_Intersection", Mx_Intersection);
|
|
38308
|
+
MxFun.addCommand("Mx_Difference", Mx_Difference);
|
|
38309
|
+
MxFun.addCommand("Mx_Xor", Mx_Xor);
|
|
38013
38310
|
});
|
|
38014
38311
|
|
|
38015
38312
|
function drawMText() {
|
|
@@ -103368,6 +103665,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
103368
103665
|
McDbSpline,
|
|
103369
103666
|
McDbXline,
|
|
103370
103667
|
McDbRay,
|
|
103668
|
+
McDbMxRegion,
|
|
103371
103669
|
FetchAttributes,
|
|
103372
103670
|
McObjectTempDraw,
|
|
103373
103671
|
McObject,
|
|
@@ -103426,4 +103724,4 @@ globalThis.Buffer = buffer$1.Buffer;
|
|
|
103426
103724
|
globalThis.Buffer.alloc = buffer$1.Buffer.alloc;
|
|
103427
103725
|
globalThis.Buffer.from = buffer$1.Buffer.from;
|
|
103428
103726
|
|
|
103429
|
-
export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|
|
103727
|
+
export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, MLineJustificationType, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDiametricDimension, McDbDictionary, McDbDimStyleTable, McDbDimStyleTableRecord, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch$1 as McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMLine, McDbMText, McDbMxRegion, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRadialDimension, McDbRasterImage, McDbRasterImageDef, McDbRay, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, McDbXline, McDbXlsxTable, McDbXrecord, McGeBound, McGeDoubleArray, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McObjectTempDraw, McRxObject, MxCADBaseCustomElement, MxCADBaseCustomText, MxCADCloneType, MxCADMText, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADTempForbiddenIntelliSelect, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrPointTransform, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCADWorldDrawType, MxCanvas2Image, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxModifyColor, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTIFFLoader, MxTools, Mx_About, Mx_Erase, TableRenderDirection, _ML_String, b64Decode, b64Encode, crateHexString, createCursor, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|