mxcad 1.0.188 → 1.0.189
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 +44 -2
- package/dist/mxcad.es.js +85 -7
- package/dist/mxcad.umd.js +2 -2
- package/dist/wasm/2d/mxdrawassembly_min.js +1538 -1538
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +1537 -1536
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/dist/wasm/3d/mxdraw3d_min.data +0 -0
- package/dist/wasm/3d/mxdraw3d_min.js +168 -31
- package/dist/wasm/3d/mxdraw3d_min.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -4170,7 +4170,7 @@ export interface MxCadConfig {
|
|
|
4170
4170
|
fontspath?: string;
|
|
4171
4171
|
/** 服务器上可供加载的字体列表 */
|
|
4172
4172
|
networkFonts?: string[];
|
|
4173
|
-
/**
|
|
4173
|
+
/** 打开文件参数设置,如,打开文件不使用缓存:{fetchAttributes:FetchAttributes.EMSCRIPTEN_FETCH_LOAD_TO_MEMORY}*/
|
|
4174
4174
|
openParameter?: object;
|
|
4175
4175
|
/**鼠标中间键操作设置,默认为鼠标中间移动视区 */
|
|
4176
4176
|
middlePan?: number | boolean;
|
|
@@ -4343,6 +4343,8 @@ export declare class MxDraw3d extends PubSub<{
|
|
|
4343
4343
|
"eventRemoveFromTree": (ids: number[]) => void;
|
|
4344
4344
|
"eventFileSave": (fileName: string) => void;
|
|
4345
4345
|
"eventRebuildTree": (tree_str: string) => void;
|
|
4346
|
+
"eventUpdatePointer": (pointer: number[]) => void;
|
|
4347
|
+
"eventUpdateViewSize": (pointer: number[]) => void;
|
|
4346
4348
|
}> implements MxDraw3dConfig {
|
|
4347
4349
|
[x: string]: any;
|
|
4348
4350
|
/** 监听wasm 文件加载成功事件 */
|
|
@@ -4447,6 +4449,26 @@ export interface MxDraw3d extends WasmConfig {
|
|
|
4447
4449
|
deactivateAllSelectionMode(): void;
|
|
4448
4450
|
/** 开启关闭操作器 */
|
|
4449
4451
|
setManipulatorEnabled(isEnabled: boolean): void;
|
|
4452
|
+
/** 管理剖切平面 */
|
|
4453
|
+
enableXClipPlane(theToEnabled: boolean): void;
|
|
4454
|
+
setXClipPlaneXPosition(thePosition: number): void;
|
|
4455
|
+
setXClipPlaneReverse(): void;
|
|
4456
|
+
enableYClipPlane(theToEnabled: boolean): void;
|
|
4457
|
+
setYClipPlaneYPosition(thePosition: number): void;
|
|
4458
|
+
setYClipPlaneReverse(): void;
|
|
4459
|
+
enableZClipPlane(theToEnabled: boolean): void;
|
|
4460
|
+
setZClipPlaneZPosition(thePosition: number): void;
|
|
4461
|
+
setZClipPlaneReverse(): void;
|
|
4462
|
+
enableCustomClipPlane(theToEnabled: boolean): void;
|
|
4463
|
+
setCustomClipPlanePosition(thePosition: number): void;
|
|
4464
|
+
setCustomClipPlaneReverse(): void;
|
|
4465
|
+
setCustomClipPlaneDirection(x: number, y: number, z: number): void;
|
|
4466
|
+
/** 散开模型 */
|
|
4467
|
+
explodeModels(theExplodeFactor: number): void;
|
|
4468
|
+
/** 设置显示模式 */
|
|
4469
|
+
setDisplayMode(theMode: MdGe.MxGlobalDisplayMode): void;
|
|
4470
|
+
/** 显示隐藏中心坐标轴体 */
|
|
4471
|
+
showCenterTrihedron(theToShow: boolean): void;
|
|
4450
4472
|
/** 显示隐藏 */
|
|
4451
4473
|
setObjectShowStateByLabel(labelEntryStr: string, theToShow: boolean): void;
|
|
4452
4474
|
/** 更新画布大小 */
|
|
@@ -6496,6 +6518,13 @@ export declare namespace MdGe {
|
|
|
6496
6518
|
DS_Erased = 1,
|
|
6497
6519
|
DS_None = 2
|
|
6498
6520
|
}
|
|
6521
|
+
enum MxGlobalDisplayMode {
|
|
6522
|
+
DisplayMode_Wireframe = 0,
|
|
6523
|
+
DisplayMode_HiddenLineRemoval = 1,
|
|
6524
|
+
DisplayMode_Shaded = 2,
|
|
6525
|
+
DisplayMode_ShadedWithFaceBoundary = 3,
|
|
6526
|
+
DisplayMode_Transparency = 4
|
|
6527
|
+
}
|
|
6499
6528
|
}
|
|
6500
6529
|
/**
|
|
6501
6530
|
* 表示拓扑元素遍历
|
|
@@ -7360,12 +7389,24 @@ export declare class MdGeBRep {
|
|
|
7360
7389
|
SetProjectionType(theProjection: MdGe.MxCameraProjection): void;
|
|
7361
7390
|
SetProj(theOrientation: MdGe.MxV3dTypeOfOrientation, theIsYup: boolean): void;
|
|
7362
7391
|
ChangeSelectedColor(color: MdGeColor): void;
|
|
7392
|
+
SetColorByEntry(theEntry: string, theColor: MdGeColor): void;
|
|
7363
7393
|
AddModelTexture(theFileName: string): void;
|
|
7364
7394
|
RemoveModelTexture(): void;
|
|
7365
7395
|
ChangeSelectedMaterial(material: MdGeMaterialAspect): void;
|
|
7366
7396
|
AddClipPlane(pln: MdGePlane): void;
|
|
7367
7397
|
GetSelectedShapes(): MdGeListOfShape;
|
|
7368
7398
|
setObjectColor(theEntry: string, theColor: MdGeColor): void;
|
|
7399
|
+
moveObjectByTrsf(theEntry: string, theTrsf: MdGeTrsf): void;
|
|
7400
|
+
printSelObjInfo(): void;
|
|
7401
|
+
drawAisObjChildren(): void;
|
|
7402
|
+
getVertexPosition(theVertex: MdGeVertex): MdGePoint;
|
|
7403
|
+
getCircleCenter(theEdge: MdGeEdge): MdGePoint;
|
|
7404
|
+
getCircleDiameter(theEdge: MdGeEdge): number;
|
|
7405
|
+
getMinDistance(theShape1: MdGeShape, theShape2: MdGeShape): number;
|
|
7406
|
+
getAngle(theEdge1: MdGeEdge, theEdge2: MdGeEdge): number;
|
|
7407
|
+
getLength(theEdge: MdGeEdge): number;
|
|
7408
|
+
getArea(theFace: MdGeFace): number;
|
|
7409
|
+
someTests(): void;
|
|
7369
7410
|
selPoint(): Promise<MdGePoint>;
|
|
7370
7411
|
selFace(): Promise<[
|
|
7371
7412
|
face: MdGeFace,
|
|
@@ -7787,7 +7828,8 @@ export declare class MdGeLabelTree extends MdGeObject {
|
|
|
7787
7828
|
}
|
|
7788
7829
|
export declare class MdGeDocReader extends MdGeObject {
|
|
7789
7830
|
constructor(p: string | object);
|
|
7790
|
-
ReadFile(filename: string
|
|
7831
|
+
ReadFile(filename: string): boolean;
|
|
7832
|
+
ReadFile2(filename: string): boolean;
|
|
7791
7833
|
}
|
|
7792
7834
|
export declare class MdGeDocWriter extends MdGeObject {
|
|
7793
7835
|
constructor(p: string | object);
|
package/dist/mxcad.es.js
CHANGED
|
@@ -14145,7 +14145,7 @@ win.McDrawObjectEvent_asciiToUTF8 = function (hexstr) {
|
|
|
14145
14145
|
return MxG2312Obj.decodeFromGb2312(hexstr);
|
|
14146
14146
|
};
|
|
14147
14147
|
|
|
14148
|
-
const version$1 = "1.0.
|
|
14148
|
+
const version$1 = "1.0.189";
|
|
14149
14149
|
|
|
14150
14150
|
var isSharedArrayBuffer = ("SharedArrayBuffer" in window);
|
|
14151
14151
|
var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
|
|
@@ -24247,7 +24247,7 @@ function _getMxreleaseidId() {
|
|
|
24247
24247
|
}
|
|
24248
24248
|
var createMxCad = /*#__PURE__*/function () {
|
|
24249
24249
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(config, mxcadobj) {
|
|
24250
|
-
var _ref2, openParameter, networkFonts, fontspath, locateFile, wasmBinary, canvas, onOpenFileComplete, fileUrl, onInit, middlePan, registdata, registfile, viewBackgroundColor, map, multipleSelect, mxDraw, THREE, size, mxCadObj, registfileurl, regdataobj;
|
|
24250
|
+
var _ref2, openParameter, networkFonts, fontspath, locateFile, wasmBinary, canvas, onOpenFileComplete, fileUrl, onInit, middlePan, registdata, registfile, viewBackgroundColor, map, multipleSelect, mxDraw, THREE, size, mxCadObj, registfileurl, regdataobj, fetchAttributes;
|
|
24251
24251
|
return regenerator.wrap(function _callee$(_context) {
|
|
24252
24252
|
while (1) switch (_context.prev = _context.next) {
|
|
24253
24253
|
case 0:
|
|
@@ -24330,9 +24330,13 @@ var createMxCad = /*#__PURE__*/function () {
|
|
|
24330
24330
|
mxDraw.addEvent("openFileComplete", function () {
|
|
24331
24331
|
onOpenFileComplete && onOpenFileComplete(mxCadObj);
|
|
24332
24332
|
});
|
|
24333
|
-
|
|
24333
|
+
fetchAttributes = 0;
|
|
24334
|
+
if (openParameter && openParameter) {
|
|
24335
|
+
fetchAttributes = openParameter;
|
|
24336
|
+
}
|
|
24337
|
+
fileUrl && mxCadObj.openWebFile(fileUrl, void 0, true, openParameter, fetchAttributes);
|
|
24334
24338
|
return _context.abrupt("return", mxCadObj);
|
|
24335
|
-
case
|
|
24339
|
+
case 41:
|
|
24336
24340
|
case "end":
|
|
24337
24341
|
return _context.stop();
|
|
24338
24342
|
}
|
|
@@ -37498,6 +37502,13 @@ var MdGe;
|
|
|
37498
37502
|
MxDisplayStatus2[MxDisplayStatus2["DS_Erased"] = 1 /* DisplayStatus_Erased */] = "DS_Erased";
|
|
37499
37503
|
MxDisplayStatus2[MxDisplayStatus2["DS_None"] = 2 /* DisplayStatus_None */] = "DS_None";
|
|
37500
37504
|
})(MdGe2.MxDisplayStatus || (MdGe2.MxDisplayStatus = {}));
|
|
37505
|
+
(function (MxGlobalDisplayMode2) {
|
|
37506
|
+
MxGlobalDisplayMode2[MxGlobalDisplayMode2["DisplayMode_Wireframe"] = 0] = "DisplayMode_Wireframe";
|
|
37507
|
+
MxGlobalDisplayMode2[MxGlobalDisplayMode2["DisplayMode_HiddenLineRemoval"] = 1] = "DisplayMode_HiddenLineRemoval";
|
|
37508
|
+
MxGlobalDisplayMode2[MxGlobalDisplayMode2["DisplayMode_Shaded"] = 2] = "DisplayMode_Shaded";
|
|
37509
|
+
MxGlobalDisplayMode2[MxGlobalDisplayMode2["DisplayMode_ShadedWithFaceBoundary"] = 3] = "DisplayMode_ShadedWithFaceBoundary";
|
|
37510
|
+
MxGlobalDisplayMode2[MxGlobalDisplayMode2["DisplayMode_Transparency"] = 4] = "DisplayMode_Transparency";
|
|
37511
|
+
})(MdGe2.MxGlobalDisplayMode || (MdGe2.MxGlobalDisplayMode = {}));
|
|
37501
37512
|
})(MdGe || (MdGe = {}));
|
|
37502
37513
|
var MdGeExplorer = /*#__PURE__*/function (_MdGeObject26) {
|
|
37503
37514
|
_inherits$1(MdGeExplorer, _MdGeObject26);
|
|
@@ -41325,6 +41336,11 @@ var MdGeBRep = /*#__PURE__*/function () {
|
|
|
41325
41336
|
value: function ChangeSelectedColor(color) {
|
|
41326
41337
|
this.imp.ChangeSelectedColor(color.getImp());
|
|
41327
41338
|
}
|
|
41339
|
+
}, {
|
|
41340
|
+
key: "SetColorByEntry",
|
|
41341
|
+
value: function SetColorByEntry(theEntry, theColor) {
|
|
41342
|
+
this.imp.SetColorByEntry(theEntry, theColor.getImp());
|
|
41343
|
+
}
|
|
41328
41344
|
}, {
|
|
41329
41345
|
key: "AddModelTexture",
|
|
41330
41346
|
value: function AddModelTexture(theFileName) {
|
|
@@ -41355,11 +41371,66 @@ var MdGeBRep = /*#__PURE__*/function () {
|
|
|
41355
41371
|
value: function setObjectColor(theEntry, theColor) {
|
|
41356
41372
|
this.imp.setObjectColor(theEntry, theColor.getImp());
|
|
41357
41373
|
}
|
|
41374
|
+
}, {
|
|
41375
|
+
key: "moveObjectByTrsf",
|
|
41376
|
+
value: function moveObjectByTrsf(theEntry, theTrsf) {
|
|
41377
|
+
this.imp.moveObjectByTrsf(theEntry, theTrsf.getImp());
|
|
41378
|
+
}
|
|
41379
|
+
}, {
|
|
41380
|
+
key: "printSelObjInfo",
|
|
41381
|
+
value: function printSelObjInfo() {
|
|
41382
|
+
this.imp.printSelObjInfo();
|
|
41383
|
+
}
|
|
41384
|
+
}, {
|
|
41385
|
+
key: "drawAisObjChildren",
|
|
41386
|
+
value: function drawAisObjChildren() {
|
|
41387
|
+
this.imp.drawAisObjChildren();
|
|
41388
|
+
}
|
|
41389
|
+
}, {
|
|
41390
|
+
key: "getVertexPosition",
|
|
41391
|
+
value: function getVertexPosition(theVertex) {
|
|
41392
|
+
return new MdGePoint(this.imp.getVertexPosition(theVertex.getImp()));
|
|
41393
|
+
}
|
|
41394
|
+
}, {
|
|
41395
|
+
key: "getCircleCenter",
|
|
41396
|
+
value: function getCircleCenter(theEdge) {
|
|
41397
|
+
return new MdGePoint(this.imp.getCircleCenter(theEdge.getImp()));
|
|
41398
|
+
}
|
|
41399
|
+
}, {
|
|
41400
|
+
key: "getCircleDiameter",
|
|
41401
|
+
value: function getCircleDiameter(theEdge) {
|
|
41402
|
+
return this.imp.getCircleDiameter(theEdge.getImp());
|
|
41403
|
+
}
|
|
41404
|
+
}, {
|
|
41405
|
+
key: "getMinDistance",
|
|
41406
|
+
value: function getMinDistance(theShape1, theShape2) {
|
|
41407
|
+
return this.imp.getMinDistance(theShape1.getImp(), theShape2.getImp());
|
|
41408
|
+
}
|
|
41409
|
+
}, {
|
|
41410
|
+
key: "getAngle",
|
|
41411
|
+
value: function getAngle(theEdge1, theEdge2) {
|
|
41412
|
+
return this.imp.getAngle(theEdge1.getImp(), theEdge2.getImp());
|
|
41413
|
+
}
|
|
41414
|
+
}, {
|
|
41415
|
+
key: "getLength",
|
|
41416
|
+
value: function getLength(theEdge) {
|
|
41417
|
+
return this.imp.getLength(theEdge.getImp());
|
|
41418
|
+
}
|
|
41419
|
+
}, {
|
|
41420
|
+
key: "getArea",
|
|
41421
|
+
value: function getArea(theFace) {
|
|
41422
|
+
return this.imp.getArea(theFace.getImp());
|
|
41423
|
+
}
|
|
41424
|
+
}, {
|
|
41425
|
+
key: "someTests",
|
|
41426
|
+
value: function someTests() {
|
|
41427
|
+
this.imp.someTests();
|
|
41428
|
+
}
|
|
41358
41429
|
}, {
|
|
41359
41430
|
key: "selPoint",
|
|
41360
41431
|
value: function selPoint() {
|
|
41361
41432
|
var cv = document.querySelector("canvas");
|
|
41362
|
-
return new Promise(function (res) {
|
|
41433
|
+
return new Promise(function (res, rej) {
|
|
41363
41434
|
cv === null || cv === void 0 ? void 0 : cv.addEventListener("click", function () {
|
|
41364
41435
|
var shapes = mxDraw3d.mdGeBRep.GetSelectedShapes();
|
|
41365
41436
|
var iter = shapes.begin();
|
|
@@ -41369,6 +41440,8 @@ var MdGeBRep = /*#__PURE__*/function () {
|
|
|
41369
41440
|
var vertex = mxDraw3d.mdGeTopo.Vertex(shape);
|
|
41370
41441
|
var point = mxDraw3d.mdGeBRep.Pnt(vertex);
|
|
41371
41442
|
res(point);
|
|
41443
|
+
} else {
|
|
41444
|
+
rej();
|
|
41372
41445
|
}
|
|
41373
41446
|
}
|
|
41374
41447
|
});
|
|
@@ -43406,8 +43479,13 @@ var MdGeDocReader = /*#__PURE__*/function (_MdGeObject75) {
|
|
|
43406
43479
|
}
|
|
43407
43480
|
_createClass$1(MdGeDocReader, [{
|
|
43408
43481
|
key: "ReadFile",
|
|
43409
|
-
value: function ReadFile(filename
|
|
43410
|
-
return this.imp.ReadFile(filename
|
|
43482
|
+
value: function ReadFile(filename) {
|
|
43483
|
+
return this.imp.ReadFile(filename);
|
|
43484
|
+
}
|
|
43485
|
+
}, {
|
|
43486
|
+
key: "ReadFile2",
|
|
43487
|
+
value: function ReadFile2(filename) {
|
|
43488
|
+
return this.imp.ReadFile2(filename);
|
|
43411
43489
|
}
|
|
43412
43490
|
}]);
|
|
43413
43491
|
return MdGeDocReader;
|