mxcad 1.0.176 → 1.0.178
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 +21 -1
- package/dist/mxcad.es.js +46 -6
- package/dist/mxcad.umd.js +2 -2
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/dist/wasm/3d/mxdraw3d_min.js +101 -516
- package/dist/wasm/3d/mxdraw3d_min.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -4008,7 +4008,24 @@ export interface MxCADUI {
|
|
|
4008
4008
|
mxfilepath: string;
|
|
4009
4009
|
saveUrl: string;
|
|
4010
4010
|
};
|
|
4011
|
-
|
|
4011
|
+
init: (plugin: MxCADPluginBase) => void;
|
|
4012
|
+
mxcad: McObject;
|
|
4013
|
+
mxmap: MxMap;
|
|
4014
|
+
}
|
|
4015
|
+
export declare class MxCADPluginMapDefaultData {
|
|
4016
|
+
mapOrigin: number[];
|
|
4017
|
+
cadOrigin: number[];
|
|
4018
|
+
meterInCADUnits: number;
|
|
4019
|
+
mapbox_accessToken: string;
|
|
4020
|
+
openFile?: string;
|
|
4021
|
+
rasterTileLayerList: any[];
|
|
4022
|
+
rasterTileKey?: string;
|
|
4023
|
+
}
|
|
4024
|
+
export declare class MxCADPluginBase {
|
|
4025
|
+
sRegistData: string;
|
|
4026
|
+
mxcadui?: MxCADUI;
|
|
4027
|
+
openFile?: string;
|
|
4028
|
+
map_default_data?: MxCADPluginMapDefaultData;
|
|
4012
4029
|
}
|
|
4013
4030
|
/** 自定义属性窗口的值的类型 */
|
|
4014
4031
|
export declare enum MxPropertiesWindowCustomValueType {
|
|
@@ -4710,6 +4727,7 @@ export declare class MdGeShape extends MdGeObject {
|
|
|
4710
4727
|
IsNull(): boolean;
|
|
4711
4728
|
SetShapeName(theShapeName: string): void;
|
|
4712
4729
|
GetShapeName(): string;
|
|
4730
|
+
GetBndBox(): MdGeBndBox;
|
|
4713
4731
|
Draw(): string;
|
|
4714
4732
|
}
|
|
4715
4733
|
/**
|
|
@@ -7144,6 +7162,7 @@ export declare class MdGeText extends MdGeObject {
|
|
|
7144
7162
|
*/
|
|
7145
7163
|
export declare class MdGeTextLabel extends MdGeObject {
|
|
7146
7164
|
constructor(p1?: string | object, p2?: number, p3?: MdGePoint);
|
|
7165
|
+
SetColor(theColor: MdGeColor): void;
|
|
7147
7166
|
SetColor(theR: number, theG: number, theB: number): void;
|
|
7148
7167
|
SetText(text: string): void;
|
|
7149
7168
|
SetPositon(position: MdGePoint): void;
|
|
@@ -7904,6 +7923,7 @@ export declare class MxMap {
|
|
|
7904
7923
|
mxcad: McObject;
|
|
7905
7924
|
constructor();
|
|
7906
7925
|
setLoadOldEditionMethod(): void;
|
|
7926
|
+
getMxDrawObject(): MxDrawObject;
|
|
7907
7927
|
getMapbox(): Map;
|
|
7908
7928
|
mercatorCoord2CAD(x: number, y: number): THREE.Vector3;
|
|
7909
7929
|
cadToMercatorCoord(pt: THREE.Vector3): THREE.Vector3;
|
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.178";
|
|
14149
14149
|
|
|
14150
14150
|
var isSharedArrayBuffer = ("SharedArrayBuffer" in window);
|
|
14151
14151
|
var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
|
|
@@ -19232,7 +19232,8 @@ var McObject = /*#__PURE__*/function () {
|
|
|
19232
19232
|
openFileComplete: true,
|
|
19233
19233
|
init: true,
|
|
19234
19234
|
init_mxdraw: true,
|
|
19235
|
-
init_mxcad: true
|
|
19235
|
+
init_mxcad: true,
|
|
19236
|
+
init_before_mxdraw: true
|
|
19236
19237
|
};
|
|
19237
19238
|
var tmp_event = {};
|
|
19238
19239
|
for (var name in this.event) {
|
|
@@ -20319,6 +20320,23 @@ var MxCppType = /*#__PURE__*/function () {
|
|
|
20319
20320
|
}]);
|
|
20320
20321
|
return MxCppType;
|
|
20321
20322
|
}();
|
|
20323
|
+
var MxCADPluginMapDefaultData = /*#__PURE__*/_createClass(function MxCADPluginMapDefaultData() {
|
|
20324
|
+
_classCallCheck(this, MxCADPluginMapDefaultData);
|
|
20325
|
+
_defineProperty(this, "mapOrigin", []);
|
|
20326
|
+
_defineProperty(this, "cadOrigin", []);
|
|
20327
|
+
_defineProperty(this, "meterInCADUnits", 1);
|
|
20328
|
+
_defineProperty(this, "mapbox_accessToken", "");
|
|
20329
|
+
_defineProperty(this, "openFile", void 0);
|
|
20330
|
+
_defineProperty(this, "rasterTileLayerList", []);
|
|
20331
|
+
_defineProperty(this, "rasterTileKey", void 0);
|
|
20332
|
+
});
|
|
20333
|
+
var MxCADPluginBase = /*#__PURE__*/_createClass(function MxCADPluginBase() {
|
|
20334
|
+
_classCallCheck(this, MxCADPluginBase);
|
|
20335
|
+
_defineProperty(this, "sRegistData", "");
|
|
20336
|
+
_defineProperty(this, "mxcadui", void 0);
|
|
20337
|
+
_defineProperty(this, "openFile", void 0);
|
|
20338
|
+
_defineProperty(this, "map_default_data", void 0);
|
|
20339
|
+
});
|
|
20322
20340
|
var MxPropertiesWindowCustomValueType = /* @__PURE__ */function (MxPropertiesWindowCustomValueType2) {
|
|
20323
20341
|
MxPropertiesWindowCustomValueType2[MxPropertiesWindowCustomValueType2["kInt"] = 1] = "kInt";
|
|
20324
20342
|
MxPropertiesWindowCustomValueType2[MxPropertiesWindowCustomValueType2["kDouble"] = 2] = "kDouble";
|
|
@@ -32497,6 +32515,11 @@ var MdGeShape = /*#__PURE__*/function (_MdGeObject) {
|
|
|
32497
32515
|
value: function GetShapeName() {
|
|
32498
32516
|
return this.imp.GetShapeName();
|
|
32499
32517
|
}
|
|
32518
|
+
}, {
|
|
32519
|
+
key: "GetBndBox",
|
|
32520
|
+
value: function GetBndBox() {
|
|
32521
|
+
return new MdGeBndBox(this.imp.GetBndBox());
|
|
32522
|
+
}
|
|
32500
32523
|
}, {
|
|
32501
32524
|
key: "Draw",
|
|
32502
32525
|
value: function Draw() {
|
|
@@ -40485,7 +40508,11 @@ var MdGeTextLabel = /*#__PURE__*/function (_MdGeObject49) {
|
|
|
40485
40508
|
_createClass(MdGeTextLabel, [{
|
|
40486
40509
|
key: "SetColor",
|
|
40487
40510
|
value: function SetColor(theR, theG, theB) {
|
|
40488
|
-
|
|
40511
|
+
if (theR instanceof MdGeColor) {
|
|
40512
|
+
this.imp.SetColor(theR.getImp());
|
|
40513
|
+
} else {
|
|
40514
|
+
this.imp.SetColor(theR, theG, theB);
|
|
40515
|
+
}
|
|
40489
40516
|
}
|
|
40490
40517
|
}, {
|
|
40491
40518
|
key: "SetText",
|
|
@@ -41328,14 +41355,20 @@ var MdGeBRep = /*#__PURE__*/function () {
|
|
|
41328
41355
|
value: function selFace() {
|
|
41329
41356
|
var cv = document.querySelector("canvas");
|
|
41330
41357
|
return new Promise(function (res) {
|
|
41331
|
-
cv === null || cv === void 0 ? void 0 : cv.addEventListener("click", function (
|
|
41358
|
+
cv === null || cv === void 0 ? void 0 : cv.addEventListener("click", function () {
|
|
41332
41359
|
var shapes = mxDraw3d.mdGeBRep.GetSelectedShapes();
|
|
41333
41360
|
var iter = shapes.begin();
|
|
41334
41361
|
for (; iter.More(); iter.Next()) {
|
|
41335
41362
|
var shape = iter.Value();
|
|
41336
41363
|
if (shape.ShapeType() === 4 /* Enum_FACE */) {
|
|
41337
41364
|
var face = mxDraw3d.mdGeTopo.Face(shape);
|
|
41338
|
-
var
|
|
41365
|
+
var bBox = face.GetBndBox();
|
|
41366
|
+
var cornerMin = bBox.CornerMin();
|
|
41367
|
+
var cornerMax = bBox.CornerMax();
|
|
41368
|
+
var x = (cornerMin.X() + cornerMax.X()) / 2;
|
|
41369
|
+
var y = (cornerMin.Y() + cornerMax.Y()) / 2;
|
|
41370
|
+
var z = (cornerMin.Z() + cornerMax.Z()) / 2;
|
|
41371
|
+
var point = new MdGePoint(x, y, z);
|
|
41339
41372
|
res([face, point]);
|
|
41340
41373
|
}
|
|
41341
41374
|
}
|
|
@@ -44066,6 +44099,11 @@ var MxMap = /*#__PURE__*/function () {
|
|
|
44066
44099
|
value: function setLoadOldEditionMethod() {
|
|
44067
44100
|
this.loadOldEditionMethod = true;
|
|
44068
44101
|
}
|
|
44102
|
+
}, {
|
|
44103
|
+
key: "getMxDrawObject",
|
|
44104
|
+
value: function getMxDrawObject() {
|
|
44105
|
+
return this.mxcad.getMxDrawObject();
|
|
44106
|
+
}
|
|
44069
44107
|
}, {
|
|
44070
44108
|
key: "getMapbox",
|
|
44071
44109
|
value: function getMapbox() {
|
|
@@ -44275,6 +44313,8 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
44275
44313
|
McObject,
|
|
44276
44314
|
McAppType,
|
|
44277
44315
|
MxCppType,
|
|
44316
|
+
MxCADPluginMapDefaultData,
|
|
44317
|
+
MxCADPluginBase,
|
|
44278
44318
|
MxPropertiesWindowCustomValueType,
|
|
44279
44319
|
MxPropertiesWindowCustomValue,
|
|
44280
44320
|
MxPropertiesWindowCustom,
|
|
@@ -44399,4 +44439,4 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
44399
44439
|
MxMap
|
|
44400
44440
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
44401
44441
|
|
|
44402
|
-
export { ColorIndexType, ColorMethod, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimension, McDbEllipse, McDbEntity, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbXrecord, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McRxObject, MdGe, MdGeAisContext, MdGeAisObject, MdGeAisShape, MdGeAisTexturedShape, MdGeAngleDim, MdGeApplication, MdGeArray1OfInteger, MdGeArray1OfPnt, MdGeArray1OfReal, MdGeArray2OfPnt, MdGeArray2OfReal, MdGeArrowAspect, MdGeAxis, MdGeBRep, MdGeBSplineCurve, MdGeBSplineSurface, MdGeBezierCurve, MdGeBezierSurface, MdGeBndBox, MdGeBox, MdGeCSYS, MdGeCSYSR, MdGeChamfer, MdGeCircle, MdGeColor, MdGeCompSolid, MdGeCompound, MdGeCone, MdGeCylinder, MdGeDiameterDim, MdGeDimAspect, MdGeDir, MdGeDocColorTool, MdGeDocReader, MdGeDocShapeTool, MdGeDocWriter, MdGeDocument, MdGeDoubleArray, MdGeEdge, MdGeEllipse, MdGeExplorer, MdGeFace, MdGeFillet, MdGeHGeomPlane, MdGeHGeomSurface, MdGeHypr, MdGeInterpolateBSpl, MdGeLabel, MdGeLabelSequence, MdGeLabelTree, MdGeLengthDim, MdGeLight, MdGeLine, MdGeLineAspect, MdGeListIteratorOfListOfShape, MdGeListOfShape, MdGeLocation, MdGeLoft, MdGeMakeArcOfCircle, MdGeMakeFace, MdGeMakeThickSolid, MdGeMakeWires, MdGeMat, MdGeMaterialAspect, MdGeObject, MdGeParab, MdGePipe, MdGePlane, MdGePoint, MdGePointsToBSpl, MdGePointsToBSplSurface, MdGePrism, MdGeRadiusDim, MdGeRect, MdGeRevol, MdGeSequenceIteratorOfSequenceOfShape, MdGeSequenceOfShape, MdGeShape, MdGeShell, MdGeSolid, MdGeSphere, MdGeText, MdGeTextAspect, MdGeTextLabel, MdGeTopo, MdGeTorus, MdGeTransform, MdGeTrsf, MdGeVec, MdGeVertex, MdGeWedge, MdGeWire, MdGeXYZ, MxCADCloneType, MxCADResbuf, MxCADResbufDataType, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCpp, MxCppType, MxDraw3d, MxMap, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTools, Mx_Erase, _ML_String, b64Decode, b64Encode, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, loadMxCADassembly3d, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|
|
44442
|
+
export { ColorIndexType, ColorMethod, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimension, McDbEllipse, McDbEntity, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbXrecord, McGeLongArray, McGeMatrix3d, McGePoint3d, McGePoint3dArray, McGeStringArray, McGeVector3d, McObject, McObjectId, McObjectIdType, McRxObject, MdGe, MdGeAisContext, MdGeAisObject, MdGeAisShape, MdGeAisTexturedShape, MdGeAngleDim, MdGeApplication, MdGeArray1OfInteger, MdGeArray1OfPnt, MdGeArray1OfReal, MdGeArray2OfPnt, MdGeArray2OfReal, MdGeArrowAspect, MdGeAxis, MdGeBRep, MdGeBSplineCurve, MdGeBSplineSurface, MdGeBezierCurve, MdGeBezierSurface, MdGeBndBox, MdGeBox, MdGeCSYS, MdGeCSYSR, MdGeChamfer, MdGeCircle, MdGeColor, MdGeCompSolid, MdGeCompound, MdGeCone, MdGeCylinder, MdGeDiameterDim, MdGeDimAspect, MdGeDir, MdGeDocColorTool, MdGeDocReader, MdGeDocShapeTool, MdGeDocWriter, MdGeDocument, MdGeDoubleArray, MdGeEdge, MdGeEllipse, MdGeExplorer, MdGeFace, MdGeFillet, MdGeHGeomPlane, MdGeHGeomSurface, MdGeHypr, MdGeInterpolateBSpl, MdGeLabel, MdGeLabelSequence, MdGeLabelTree, MdGeLengthDim, MdGeLight, MdGeLine, MdGeLineAspect, MdGeListIteratorOfListOfShape, MdGeListOfShape, MdGeLocation, MdGeLoft, MdGeMakeArcOfCircle, MdGeMakeFace, MdGeMakeThickSolid, MdGeMakeWires, MdGeMat, MdGeMaterialAspect, MdGeObject, MdGeParab, MdGePipe, MdGePlane, MdGePoint, MdGePointsToBSpl, MdGePointsToBSplSurface, MdGePrism, MdGeRadiusDim, MdGeRect, MdGeRevol, MdGeSequenceIteratorOfSequenceOfShape, MdGeSequenceOfShape, MdGeShape, MdGeShell, MdGeSolid, MdGeSphere, MdGeText, MdGeTextAspect, MdGeTextLabel, MdGeTopo, MdGeTorus, MdGeTransform, MdGeTrsf, MdGeVec, MdGeVertex, MdGeWedge, MdGeWire, MdGeXYZ, MxCADCloneType, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADResbuf, MxCADResbufDataType, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCpp, MxCppType, MxDraw3d, MxMap, MxPropertiesWindowCustom, MxPropertiesWindowCustomValue, MxPropertiesWindowCustomValueType, MxTools, Mx_Erase, _ML_String, b64Decode, b64Encode, createMcCmColor, createMxCad, mxcad as default, downloadFile, downloadFileFromUrl, drawArc, drawCircle, drawEllipticalArc, drawLine, drawMText, drawPolyLine, drawPolygon, drawRectang, drawText, getColorUtils, getFileFromUrl, getFilterImp, getJsonFromUrl, loadMxCADassembly, loadMxCADassembly3d, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
|