mxcad 1.0.361 → 1.0.363
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 +170 -2
- package/dist/mxcad.es.js +229 -8
- package/dist/mxcad.umd.js +3 -3
- package/dist/wasm/2d/mxdrawassembly_min.js +2199 -2086
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +2194 -2080
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +3 -2
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
|
|
@@ -8699,6 +8713,146 @@ export declare class McDbSpline extends McDbCurve {
|
|
|
8699
8713
|
fitPoints: McGePoint3dArray;
|
|
8700
8714
|
}): boolean;
|
|
8701
8715
|
}
|
|
8716
|
+
/**
|
|
8717
|
+
* 表示一个射线对象。
|
|
8718
|
+
* @example
|
|
8719
|
+
* ```ts
|
|
8720
|
+
* ```
|
|
8721
|
+
*/
|
|
8722
|
+
export declare class McDbXline extends McDbEntity {
|
|
8723
|
+
/**
|
|
8724
|
+
* 构造函数。
|
|
8725
|
+
* @param imp 内部对象。
|
|
8726
|
+
* @example
|
|
8727
|
+
* ```ts
|
|
8728
|
+
* ```
|
|
8729
|
+
*/
|
|
8730
|
+
constructor(imp?: any);
|
|
8731
|
+
/**
|
|
8732
|
+
* 设置点坐标。
|
|
8733
|
+
* @param x X坐标
|
|
8734
|
+
* @param y Y坐标
|
|
8735
|
+
* @param z Z坐标
|
|
8736
|
+
* @example
|
|
8737
|
+
* ```ts
|
|
8738
|
+
* ```
|
|
8739
|
+
*/
|
|
8740
|
+
setBasePoint(x: number, y: number, z?: number): void;
|
|
8741
|
+
/**
|
|
8742
|
+
* 设置点坐标。
|
|
8743
|
+
* @param x X坐标
|
|
8744
|
+
* @param y Y坐标
|
|
8745
|
+
* @param z Z坐标
|
|
8746
|
+
* @example
|
|
8747
|
+
* ```ts
|
|
8748
|
+
* ```
|
|
8749
|
+
*/
|
|
8750
|
+
set basePoint(pt: McGePoint3d);
|
|
8751
|
+
/**
|
|
8752
|
+
* 获取点坐标。
|
|
8753
|
+
* @example
|
|
8754
|
+
* ```ts
|
|
8755
|
+
* ```
|
|
8756
|
+
*/
|
|
8757
|
+
get basePoint(): McGePoint3d;
|
|
8758
|
+
/**
|
|
8759
|
+
* 设置射线的方向向量
|
|
8760
|
+
* @param x X坐标
|
|
8761
|
+
* @param y Y坐标
|
|
8762
|
+
* @param z Z坐标
|
|
8763
|
+
* @example
|
|
8764
|
+
* ```ts
|
|
8765
|
+
* ```
|
|
8766
|
+
*/
|
|
8767
|
+
setUnitDir(x: number, y: number, z?: number): void;
|
|
8768
|
+
/**
|
|
8769
|
+
* 设置射线的方向向量
|
|
8770
|
+
* @param x X坐标
|
|
8771
|
+
* @param y Y坐标
|
|
8772
|
+
* @param z Z坐标
|
|
8773
|
+
* @example
|
|
8774
|
+
* ```ts
|
|
8775
|
+
* ```
|
|
8776
|
+
*/
|
|
8777
|
+
set unitDir(vec: McGeVector3d);
|
|
8778
|
+
/**
|
|
8779
|
+
* 获取射线的方向向量。
|
|
8780
|
+
* @example
|
|
8781
|
+
* ```ts
|
|
8782
|
+
* ```
|
|
8783
|
+
*/
|
|
8784
|
+
get unitDir(): McGeVector3d;
|
|
8785
|
+
}
|
|
8786
|
+
/**
|
|
8787
|
+
* 表示一个放射线对象。
|
|
8788
|
+
* @example
|
|
8789
|
+
* ```ts
|
|
8790
|
+
* ```
|
|
8791
|
+
*/
|
|
8792
|
+
export declare class McDbRay extends McDbEntity {
|
|
8793
|
+
/**
|
|
8794
|
+
* 构造函数。
|
|
8795
|
+
* @param imp 内部对象。
|
|
8796
|
+
* @example
|
|
8797
|
+
* ```ts
|
|
8798
|
+
* ```
|
|
8799
|
+
*/
|
|
8800
|
+
constructor(imp?: any);
|
|
8801
|
+
/**
|
|
8802
|
+
* 设置点坐标。
|
|
8803
|
+
* @param x X坐标
|
|
8804
|
+
* @param y Y坐标
|
|
8805
|
+
* @param z Z坐标
|
|
8806
|
+
* @example
|
|
8807
|
+
* ```ts
|
|
8808
|
+
* ```
|
|
8809
|
+
*/
|
|
8810
|
+
setBasePoint(x: number, y: number, z?: number): void;
|
|
8811
|
+
/**
|
|
8812
|
+
* 设置点坐标。
|
|
8813
|
+
* @param x X坐标
|
|
8814
|
+
* @param y Y坐标
|
|
8815
|
+
* @param z Z坐标
|
|
8816
|
+
* @example
|
|
8817
|
+
* ```ts
|
|
8818
|
+
* ```
|
|
8819
|
+
*/
|
|
8820
|
+
set basePoint(pt: McGePoint3d);
|
|
8821
|
+
/**
|
|
8822
|
+
* 获取点坐标。
|
|
8823
|
+
* @example
|
|
8824
|
+
* ```ts
|
|
8825
|
+
* ```
|
|
8826
|
+
*/
|
|
8827
|
+
get basePoint(): McGePoint3d;
|
|
8828
|
+
/**
|
|
8829
|
+
* 设置射线的方向向量
|
|
8830
|
+
* @param x X坐标
|
|
8831
|
+
* @param y Y坐标
|
|
8832
|
+
* @param z Z坐标
|
|
8833
|
+
* @example
|
|
8834
|
+
* ```ts
|
|
8835
|
+
* ```
|
|
8836
|
+
*/
|
|
8837
|
+
setUnitDir(x: number, y: number, z?: number): void;
|
|
8838
|
+
/**
|
|
8839
|
+
* 设置射线的方向向量
|
|
8840
|
+
* @param x X坐标
|
|
8841
|
+
* @param y Y坐标
|
|
8842
|
+
* @param z Z坐标
|
|
8843
|
+
* @example
|
|
8844
|
+
* ```ts
|
|
8845
|
+
* ```
|
|
8846
|
+
*/
|
|
8847
|
+
set unitDir(vec: McGeVector3d);
|
|
8848
|
+
/**
|
|
8849
|
+
* 获取射线的方向向量。
|
|
8850
|
+
* @example
|
|
8851
|
+
* ```ts
|
|
8852
|
+
* ```
|
|
8853
|
+
*/
|
|
8854
|
+
get unitDir(): McGeVector3d;
|
|
8855
|
+
}
|
|
8702
8856
|
/**
|
|
8703
8857
|
* Dxf组码
|
|
8704
8858
|
* @public
|
|
@@ -11570,6 +11724,13 @@ export declare class McObjectTempDraw {
|
|
|
11570
11724
|
* ```
|
|
11571
11725
|
*/
|
|
11572
11726
|
readyMcDbEntitysWorldDraw(): void;
|
|
11727
|
+
/**
|
|
11728
|
+
* 结束对McDbEntitys的临时绘制的上下文,释放资源。
|
|
11729
|
+
* @example
|
|
11730
|
+
* ```ts
|
|
11731
|
+
* ```
|
|
11732
|
+
*/
|
|
11733
|
+
endMcDbEntitysWorldDraw(): void;
|
|
11573
11734
|
/**
|
|
11574
11735
|
* 清除McDbEntitys临时绘制的数据
|
|
11575
11736
|
* @example
|
|
@@ -11591,6 +11752,13 @@ export declare class McObjectTempDraw {
|
|
|
11591
11752
|
* ```
|
|
11592
11753
|
*/
|
|
11593
11754
|
disableDepthTestMcDbEntitysDisplay(isDisable?: boolean): void;
|
|
11755
|
+
/**
|
|
11756
|
+
* 启用线重的显示。
|
|
11757
|
+
* @example
|
|
11758
|
+
* ```ts
|
|
11759
|
+
* ```
|
|
11760
|
+
*/
|
|
11761
|
+
setLineWeightDisplay(val?: boolean, iGlobalLineweight?: number): void;
|
|
11594
11762
|
/**
|
|
11595
11763
|
* 添加临时绘制线条数据
|
|
11596
11764
|
* @example
|
|
@@ -11625,7 +11793,7 @@ export declare class McObjectTempDraw {
|
|
|
11625
11793
|
* ```ts
|
|
11626
11794
|
* ```
|
|
11627
11795
|
*/
|
|
11628
|
-
setDrawColor(color: number): void;
|
|
11796
|
+
setDrawColor(color: number, iMcDbEntityDrawColor?: number): void;
|
|
11629
11797
|
}
|
|
11630
11798
|
declare class McRxObjectImp {
|
|
11631
11799
|
}
|
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.362";
|
|
15084
15084
|
|
|
15085
15085
|
var isSharedArrayBuffer = "SharedArrayBuffer" in window;
|
|
15086
15086
|
var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
|
|
@@ -19276,7 +19276,7 @@ var McDbHatch$1 = /*#__PURE__*/function (_McDbEntity7) {
|
|
|
19276
19276
|
dashes.forEach(function (val) {
|
|
19277
19277
|
aryDashes.append(val);
|
|
19278
19278
|
});
|
|
19279
|
-
return this.imp.addPatternDefinition(angle, baseX, baseY, offsetX, offsetY, aryDashes.imp);
|
|
19279
|
+
return this.imp.addPatternDefinition(angle * Math.PI / 180, baseX, baseY, offsetX, offsetY, aryDashes.imp);
|
|
19280
19280
|
}
|
|
19281
19281
|
}, {
|
|
19282
19282
|
key: "clearPatternDefinition",
|
|
@@ -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",
|
|
@@ -19621,6 +19632,88 @@ var McDbSpline = /*#__PURE__*/function (_McDbCurve6) {
|
|
|
19621
19632
|
}]);
|
|
19622
19633
|
return McDbSpline;
|
|
19623
19634
|
}(McDbCurve);
|
|
19635
|
+
var McDbXline = /*#__PURE__*/function (_McDbEntity10) {
|
|
19636
|
+
_inherits$1(McDbXline, _McDbEntity10);
|
|
19637
|
+
var _super25 = _createSuper$9(McDbXline);
|
|
19638
|
+
function McDbXline(imp) {
|
|
19639
|
+
var _this21;
|
|
19640
|
+
_classCallCheck$1(this, McDbXline);
|
|
19641
|
+
_this21 = _super25.call(this, imp);
|
|
19642
|
+
if (!imp) {
|
|
19643
|
+
_this21.initTempObject(new MxCpp.mxcadassemblyimp.MdDbXline());
|
|
19644
|
+
}
|
|
19645
|
+
return _this21;
|
|
19646
|
+
}
|
|
19647
|
+
_createClass$1(McDbXline, [{
|
|
19648
|
+
key: "setBasePoint",
|
|
19649
|
+
value: function setBasePoint(x, y, z) {
|
|
19650
|
+
this.imp.setBasePoint(new McGePoint3d(x, y, z).imp);
|
|
19651
|
+
}
|
|
19652
|
+
}, {
|
|
19653
|
+
key: "basePoint",
|
|
19654
|
+
get: function get() {
|
|
19655
|
+
return new McGePoint3d(this.imp.basePoint());
|
|
19656
|
+
},
|
|
19657
|
+
set: function set(pt) {
|
|
19658
|
+
this.imp.setBasePoint(pt.imp);
|
|
19659
|
+
}
|
|
19660
|
+
}, {
|
|
19661
|
+
key: "setUnitDir",
|
|
19662
|
+
value: function setUnitDir(x, y, z) {
|
|
19663
|
+
this.imp.setUnitDir(new McGeVector3d(x, y, z).imp);
|
|
19664
|
+
}
|
|
19665
|
+
}, {
|
|
19666
|
+
key: "unitDir",
|
|
19667
|
+
get: function get() {
|
|
19668
|
+
return new McGeVector3d(this.imp.unitDir());
|
|
19669
|
+
},
|
|
19670
|
+
set: function set(vec) {
|
|
19671
|
+
this.imp.setUnitDir(vec.imp);
|
|
19672
|
+
}
|
|
19673
|
+
}]);
|
|
19674
|
+
return McDbXline;
|
|
19675
|
+
}(McDbEntity);
|
|
19676
|
+
var McDbRay = /*#__PURE__*/function (_McDbEntity11) {
|
|
19677
|
+
_inherits$1(McDbRay, _McDbEntity11);
|
|
19678
|
+
var _super26 = _createSuper$9(McDbRay);
|
|
19679
|
+
function McDbRay(imp) {
|
|
19680
|
+
var _this22;
|
|
19681
|
+
_classCallCheck$1(this, McDbRay);
|
|
19682
|
+
_this22 = _super26.call(this, imp);
|
|
19683
|
+
if (!imp) {
|
|
19684
|
+
_this22.initTempObject(new MxCpp.mxcadassemblyimp.MdDbRay());
|
|
19685
|
+
}
|
|
19686
|
+
return _this22;
|
|
19687
|
+
}
|
|
19688
|
+
_createClass$1(McDbRay, [{
|
|
19689
|
+
key: "setBasePoint",
|
|
19690
|
+
value: function setBasePoint(x, y, z) {
|
|
19691
|
+
this.imp.setBasePoint(new McGePoint3d(x, y, z).imp);
|
|
19692
|
+
}
|
|
19693
|
+
}, {
|
|
19694
|
+
key: "basePoint",
|
|
19695
|
+
get: function get() {
|
|
19696
|
+
return new McGePoint3d(this.imp.basePoint());
|
|
19697
|
+
},
|
|
19698
|
+
set: function set(pt) {
|
|
19699
|
+
this.imp.setBasePoint(pt.imp);
|
|
19700
|
+
}
|
|
19701
|
+
}, {
|
|
19702
|
+
key: "setUnitDir",
|
|
19703
|
+
value: function setUnitDir(x, y, z) {
|
|
19704
|
+
this.imp.setUnitDir(new McGeVector3d(x, y, z).imp);
|
|
19705
|
+
}
|
|
19706
|
+
}, {
|
|
19707
|
+
key: "unitDir",
|
|
19708
|
+
get: function get() {
|
|
19709
|
+
return new McGeVector3d(this.imp.unitDir());
|
|
19710
|
+
},
|
|
19711
|
+
set: function set(vec) {
|
|
19712
|
+
this.imp.setUnitDir(vec.imp);
|
|
19713
|
+
}
|
|
19714
|
+
}]);
|
|
19715
|
+
return McDbRay;
|
|
19716
|
+
}(McDbEntity);
|
|
19624
19717
|
|
|
19625
19718
|
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); }; }
|
|
19626
19719
|
function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -22240,6 +22333,11 @@ var McObjectTempDraw = /*#__PURE__*/function () {
|
|
|
22240
22333
|
value: function readyMcDbEntitysWorldDraw() {
|
|
22241
22334
|
this.imp.readyMcDbEntitysWorldDraw();
|
|
22242
22335
|
}
|
|
22336
|
+
}, {
|
|
22337
|
+
key: "endMcDbEntitysWorldDraw",
|
|
22338
|
+
value: function endMcDbEntitysWorldDraw() {
|
|
22339
|
+
this.imp.endMcDbEntitysWorldDraw();
|
|
22340
|
+
}
|
|
22243
22341
|
}, {
|
|
22244
22342
|
key: "clearMcDbEntitysDisplay",
|
|
22245
22343
|
value: function clearMcDbEntitysDisplay() {
|
|
@@ -22259,6 +22357,13 @@ var McObjectTempDraw = /*#__PURE__*/function () {
|
|
|
22259
22357
|
var isDisable = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
22260
22358
|
this.imp.disableDepthTestMcDbEntitysDisplay(isDisable);
|
|
22261
22359
|
}
|
|
22360
|
+
}, {
|
|
22361
|
+
key: "setLineWeightDisplay",
|
|
22362
|
+
value: function setLineWeightDisplay() {
|
|
22363
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
22364
|
+
var iGlobalLineweight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
22365
|
+
this.imp.setLineWeightDisplay(val, iGlobalLineweight);
|
|
22366
|
+
}
|
|
22262
22367
|
}, {
|
|
22263
22368
|
key: "addLines",
|
|
22264
22369
|
value: function addLines(vecLinePoints) {
|
|
@@ -22282,7 +22387,8 @@ var McObjectTempDraw = /*#__PURE__*/function () {
|
|
|
22282
22387
|
}, {
|
|
22283
22388
|
key: "setDrawColor",
|
|
22284
22389
|
value: function setDrawColor(color) {
|
|
22285
|
-
|
|
22390
|
+
var iMcDbEntityDrawColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -2;
|
|
22391
|
+
this.imp.setDrawColor(color, iMcDbEntityDrawColor);
|
|
22286
22392
|
}
|
|
22287
22393
|
}]);
|
|
22288
22394
|
return McObjectTempDraw;
|
|
@@ -23652,6 +23758,18 @@ var McAppType = /*#__PURE__*/function () {
|
|
|
23652
23758
|
this.classNameToCreateCalls["McDbSpline"] = function () {
|
|
23653
23759
|
return new McDbSpline();
|
|
23654
23760
|
};
|
|
23761
|
+
this.objectIdToObjectCalls["McDbXline"] = function (lIdIndex) {
|
|
23762
|
+
return new McDbXline(_this8.imp.ObjectIdToMdDbXline(lIdIndex));
|
|
23763
|
+
};
|
|
23764
|
+
this.classNameToCreateCalls["McDbXline"] = function () {
|
|
23765
|
+
return new McDbXline();
|
|
23766
|
+
};
|
|
23767
|
+
this.objectIdToObjectCalls["McDbRay"] = function (lIdIndex) {
|
|
23768
|
+
return new McDbRay(_this8.imp.ObjectIdToMdDbRay(lIdIndex));
|
|
23769
|
+
};
|
|
23770
|
+
this.classNameToCreateCalls["McDbRay"] = function () {
|
|
23771
|
+
return new McDbRay();
|
|
23772
|
+
};
|
|
23655
23773
|
this.objectIdToObjectCalls["McDbDictionary"] = function (lIdIndex) {
|
|
23656
23774
|
return new McDbDictionary(_this8.imp.ObjectIdToMdDbDictionary(lIdIndex));
|
|
23657
23775
|
};
|
|
@@ -37796,11 +37914,113 @@ function _MxDb_Spline() {
|
|
|
37796
37914
|
}));
|
|
37797
37915
|
return _MxDb_Spline.apply(this, arguments);
|
|
37798
37916
|
}
|
|
37917
|
+
function Mx_Xline() {
|
|
37918
|
+
return _Mx_Xline.apply(this, arguments);
|
|
37919
|
+
}
|
|
37920
|
+
function _Mx_Xline() {
|
|
37921
|
+
_Mx_Xline = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee4() {
|
|
37922
|
+
var mxcad, getPoint, pt1, xline, pt2;
|
|
37923
|
+
return regenerator.wrap(function _callee4$(_context4) {
|
|
37924
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
37925
|
+
case 0:
|
|
37926
|
+
mxcad = MxCpp.getCurrentMxCAD();
|
|
37927
|
+
getPoint = new MxCADUiPrPoint();
|
|
37928
|
+
getPoint.setMessage("\n\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9:");
|
|
37929
|
+
_context4.next = 5;
|
|
37930
|
+
return getPoint.go();
|
|
37931
|
+
case 5:
|
|
37932
|
+
pt1 = _context4.sent;
|
|
37933
|
+
if (pt1) {
|
|
37934
|
+
_context4.next = 8;
|
|
37935
|
+
break;
|
|
37936
|
+
}
|
|
37937
|
+
return _context4.abrupt("return");
|
|
37938
|
+
case 8:
|
|
37939
|
+
xline = new McDbXline();
|
|
37940
|
+
xline.basePoint = pt1;
|
|
37941
|
+
getPoint.setMessage("\n\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9:");
|
|
37942
|
+
getPoint.setUserDraw(function (pt, pw) {
|
|
37943
|
+
xline.unitDir = pt.sub(pt1);
|
|
37944
|
+
pw.drawMcDbEntity(xline);
|
|
37945
|
+
});
|
|
37946
|
+
_context4.next = 14;
|
|
37947
|
+
return getPoint.go();
|
|
37948
|
+
case 14:
|
|
37949
|
+
pt2 = _context4.sent;
|
|
37950
|
+
if (pt2) {
|
|
37951
|
+
_context4.next = 17;
|
|
37952
|
+
break;
|
|
37953
|
+
}
|
|
37954
|
+
return _context4.abrupt("return");
|
|
37955
|
+
case 17:
|
|
37956
|
+
xline.unitDir = pt2.sub(pt1);
|
|
37957
|
+
mxcad.drawEntity(xline);
|
|
37958
|
+
return _context4.abrupt("return");
|
|
37959
|
+
case 20:
|
|
37960
|
+
case "end":
|
|
37961
|
+
return _context4.stop();
|
|
37962
|
+
}
|
|
37963
|
+
}, _callee4);
|
|
37964
|
+
}));
|
|
37965
|
+
return _Mx_Xline.apply(this, arguments);
|
|
37966
|
+
}
|
|
37967
|
+
function Mx_Ray() {
|
|
37968
|
+
return _Mx_Ray.apply(this, arguments);
|
|
37969
|
+
}
|
|
37970
|
+
function _Mx_Ray() {
|
|
37971
|
+
_Mx_Ray = _asyncToGenerator(/*#__PURE__*/regenerator.mark(function _callee5() {
|
|
37972
|
+
var mxcad, getPoint, pt1, ray, pt2;
|
|
37973
|
+
return regenerator.wrap(function _callee5$(_context5) {
|
|
37974
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
37975
|
+
case 0:
|
|
37976
|
+
mxcad = MxCpp.getCurrentMxCAD();
|
|
37977
|
+
getPoint = new MxCADUiPrPoint();
|
|
37978
|
+
getPoint.setMessage("\n\u6307\u5B9A\u7B2C\u4E00\u4E2A\u70B9:");
|
|
37979
|
+
_context5.next = 5;
|
|
37980
|
+
return getPoint.go();
|
|
37981
|
+
case 5:
|
|
37982
|
+
pt1 = _context5.sent;
|
|
37983
|
+
if (pt1) {
|
|
37984
|
+
_context5.next = 8;
|
|
37985
|
+
break;
|
|
37986
|
+
}
|
|
37987
|
+
return _context5.abrupt("return");
|
|
37988
|
+
case 8:
|
|
37989
|
+
ray = new McDbRay();
|
|
37990
|
+
ray.basePoint = pt1;
|
|
37991
|
+
getPoint.setMessage("\n\u6307\u5B9A\u7B2C\u4E8C\u4E2A\u70B9:");
|
|
37992
|
+
getPoint.setUserDraw(function (pt, pw) {
|
|
37993
|
+
ray.unitDir = pt.sub(pt1);
|
|
37994
|
+
pw.drawMcDbEntity(ray);
|
|
37995
|
+
});
|
|
37996
|
+
_context5.next = 14;
|
|
37997
|
+
return getPoint.go();
|
|
37998
|
+
case 14:
|
|
37999
|
+
pt2 = _context5.sent;
|
|
38000
|
+
if (pt2) {
|
|
38001
|
+
_context5.next = 17;
|
|
38002
|
+
break;
|
|
38003
|
+
}
|
|
38004
|
+
return _context5.abrupt("return");
|
|
38005
|
+
case 17:
|
|
38006
|
+
ray.unitDir = pt2.sub(pt1);
|
|
38007
|
+
mxcad.drawEntity(ray);
|
|
38008
|
+
return _context5.abrupt("return");
|
|
38009
|
+
case 20:
|
|
38010
|
+
case "end":
|
|
38011
|
+
return _context5.stop();
|
|
38012
|
+
}
|
|
38013
|
+
}, _callee5);
|
|
38014
|
+
}));
|
|
38015
|
+
return _Mx_Ray.apply(this, arguments);
|
|
38016
|
+
}
|
|
37799
38017
|
MxFun.on("init", function () {
|
|
37800
38018
|
MxFun.addCommand("Mx_Line", drawLine);
|
|
37801
38019
|
MxFun.addCommand("Mx_Point", Mx_Point);
|
|
37802
38020
|
MxFun.addCommand("Mx_About", Mx_About);
|
|
37803
38021
|
MxFun.addCommand("Mx_Spline", MxDb_Spline);
|
|
38022
|
+
MxFun.addCommand("Mx_Xline", Mx_Xline);
|
|
38023
|
+
MxFun.addCommand("Mx_Ray", Mx_Ray);
|
|
37804
38024
|
});
|
|
37805
38025
|
|
|
37806
38026
|
function drawMText() {
|
|
@@ -49062,7 +49282,6 @@ var ClampToEdgeWrapping = 1001;
|
|
|
49062
49282
|
var MirroredRepeatWrapping = 1002;
|
|
49063
49283
|
var NearestFilter = 1003;
|
|
49064
49284
|
var NearestMipmapNearestFilter = 1004;
|
|
49065
|
-
var NearestMipMapNearestFilter = 1004;
|
|
49066
49285
|
var NearestMipmapLinearFilter = 1005;
|
|
49067
49286
|
var LinearFilter = 1006;
|
|
49068
49287
|
var LinearMipmapNearestFilter = 1007;
|
|
@@ -103030,10 +103249,10 @@ var TIFFLoader = /*#__PURE__*/function (_DataTextureLoader) {
|
|
|
103030
103249
|
var ret_param = {};
|
|
103031
103250
|
var rgba = UTIF.toRGBA8(ifds[0], null, this.isInverse, ret_param);
|
|
103032
103251
|
var magFilter = LinearFilter;
|
|
103033
|
-
var minFilter =
|
|
103252
|
+
var minFilter = LinearFilter;
|
|
103034
103253
|
if (ret_param["bps"] === 1) {
|
|
103035
103254
|
magFilter = NearestFilter;
|
|
103036
|
-
minFilter =
|
|
103255
|
+
minFilter = NearestFilter;
|
|
103037
103256
|
}
|
|
103038
103257
|
return {
|
|
103039
103258
|
width: ifds[0].width,
|
|
@@ -103158,6 +103377,8 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
103158
103377
|
McDbWipeout,
|
|
103159
103378
|
McDbBackgroundEntity,
|
|
103160
103379
|
McDbSpline,
|
|
103380
|
+
McDbXline,
|
|
103381
|
+
McDbRay,
|
|
103161
103382
|
FetchAttributes,
|
|
103162
103383
|
McObjectTempDraw,
|
|
103163
103384
|
McObject,
|
|
@@ -103216,4 +103437,4 @@ globalThis.Buffer = buffer$1.Buffer;
|
|
|
103216
103437
|
globalThis.Buffer.alloc = buffer$1.Buffer.alloc;
|
|
103217
103438
|
globalThis.Buffer.from = buffer$1.Buffer.from;
|
|
103218
103439
|
|
|
103219
|
-
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, McDbRotatedDimension, McDbSpatialFilter, McDbSpline, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbWipeout, 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 };
|
|
103440
|
+
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 };
|