mxcad 1.0.192 → 1.0.193

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.
Binary file
package/dist/mxcad.d.ts CHANGED
@@ -3176,6 +3176,7 @@ export declare class McObject {
3176
3176
  on(name: "init_before_mxdraw", fun: (mxdraw: MxDrawObject) => void): void;
3177
3177
  on(name: "init_mxcad", fun: (mxcad: McObject) => void): void;
3178
3178
  on(name: "databaseModify", fun: () => void): void;
3179
+ off(name: string, fun?: Function): void;
3179
3180
  callEvent(sEventName: string, param?: any): boolean;
3180
3181
  /**
3181
3182
  * 初始化对象模型
@@ -4725,6 +4726,8 @@ export interface MxDraw3d extends WasmConfig {
4725
4726
  MdGeBndBox: typeof MdGeBndBox;
4726
4727
  /** aistextured形状 */
4727
4728
  MdGeAisTexturedShape: typeof MdGeAisTexturedShape;
4729
+ /** MdGeSpliter */
4730
+ MdGeSpliter: typeof MdGeSpliter;
4728
4731
  }
4729
4732
  /**
4730
4733
  * 所有类的父类, 除去MdGeTopo以及MdGeBrep
@@ -4790,7 +4793,7 @@ export declare class MdGeShape extends MdGeObject {
4790
4793
  * 表示一个点形状
4791
4794
  */
4792
4795
  export declare class MdGeVertex extends MdGeShape {
4793
- constructor(p1?: object | number, p2?: number, p3?: number);
4796
+ constructor(p1?: MdGePoint | number | object, p2?: number, p3?: number);
4794
4797
  }
4795
4798
  /**
4796
4799
  * 表示一个Edge形状
@@ -7986,6 +7989,15 @@ export declare class MdGeAisTexturedShape extends MdGeAisObject {
7986
7989
  SetShowTriangles(theToShowTriangles: boolean): void;
7987
7990
  TextureModulate(): boolean;
7988
7991
  }
7992
+ export declare class MdGeSpliter extends MdGeObject {
7993
+ constructor(p?: object);
7994
+ SetTools(theLS: MdGeShape[]): void;
7995
+ SetArguments(theLS: MdGeShape[]): void;
7996
+ Build(): void;
7997
+ IsDone(): boolean;
7998
+ HasWarnings(): boolean;
7999
+ Shapes(): MdGeShape[];
8000
+ }
7989
8001
  export declare function loadMxCADassembly3d(config: MxDraw3dConfig, call?: (mxDraw3d: MxDraw3d) => void): Promise<MxDraw3d>;
7990
8002
  export type Map = any;
7991
8003
  export declare class MxMap {
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.192";
14148
+ const version$1 = "1.0.193";
14149
14149
 
14150
14150
  var isSharedArrayBuffer = ("SharedArrayBuffer" in window);
14151
14151
  var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
@@ -19224,6 +19224,24 @@ var McObject = /*#__PURE__*/function () {
19224
19224
  this.event[name] = fun;
19225
19225
  }
19226
19226
  }
19227
+ }, {
19228
+ key: "off",
19229
+ value: function off(name, fun) {
19230
+ if (!this.event[name]) return;
19231
+ if (!fun) {
19232
+ this.event[name] = [];
19233
+ } else {
19234
+ if (this.event[name] instanceof Array) {
19235
+ var index = this.event[name].indexOf(fun);
19236
+ if (index < 0) return;
19237
+ this.event[name].splice(index, 1);
19238
+ } else {
19239
+ if (this.event[name] === fun) {
19240
+ this.event[name] = [];
19241
+ }
19242
+ }
19243
+ }
19244
+ }
19227
19245
  }, {
19228
19246
  key: "callEvent",
19229
19247
  value: function callEvent(sEventName, param) {
@@ -31904,7 +31922,7 @@ var drawRectang = /*#__PURE__*/function () {
31904
31922
  break;
31905
31923
  case 97:
31906
31924
  if (pt2CAD) {
31907
- getPoint.drawReserve();
31925
+ MxCpp.getCurrentMxCAD().drawEntity(pl);
31908
31926
  }
31909
31927
  case 98:
31910
31928
  pl.setxDataDouble("BG", elevation);
@@ -32295,7 +32313,8 @@ var MxDraw3d = /*#__PURE__*/function (_PubSub) {
32295
32313
  MdGeAisObject: MdGeAisObject,
32296
32314
  MdGeAisShape: MdGeAisShape,
32297
32315
  MdGeBndBox: MdGeBndBox,
32298
- MdGeAisTexturedShape: MdGeAisTexturedShape
32316
+ MdGeAisTexturedShape: MdGeAisTexturedShape,
32317
+ MdGeSpliter: MdGeSpliter
32299
32318
  });
32300
32319
  MxDraw3d.onloadWasmMxDraw3dModel && MxDraw3d.onloadWasmMxDraw3dModel(_assertThisInitialized$1(_this));
32301
32320
  });
@@ -32562,9 +32581,12 @@ var MdGeVertex = /*#__PURE__*/function (_MdGeShape) {
32562
32581
  if (arguments.length == 0) {
32563
32582
  _this3 = _super3.call(this);
32564
32583
  _this3.initTempObject(new mxDraw3d.MdGeVertex());
32565
- } else if (typeof p1 == "number" && arguments.length == 3) {
32584
+ } else if (typeof p1 == "number" && p2 && p3) {
32566
32585
  _this3 = _super3.call(this);
32567
32586
  _this3.initTempObject(new mxDraw3d.MdGeVertex(p1, p2, p3));
32587
+ } else if (p1 instanceof MdGePoint && arguments.length == 1) {
32588
+ _this3 = _super3.call(this);
32589
+ _this3.initTempObject(new mxDraw3d.MdGeVertex(p1.getImp()));
32568
32590
  } else if (p1 instanceof Object && arguments.length == 1) {
32569
32591
  _this3 = _super3.call(this, p1);
32570
32592
  }
@@ -32581,9 +32603,9 @@ var MdGeEdge = /*#__PURE__*/function (_MdGeShape2) {
32581
32603
  if (arguments.length == 0) {
32582
32604
  _this4 = _super4.call(this);
32583
32605
  _this4.initTempObject(new mxDraw3d.MdGeEdge());
32584
- } else if (p1 instanceof MdGePoint && arguments.length == 2) {
32606
+ } else if (p1 instanceof MdGePoint && p2 instanceof MdGePoint) {
32585
32607
  _this4 = _super4.call(this);
32586
- _this4.initTempObject(new mxDraw3d.MdGeEdge(p1.getImp(), p2 && p2.getImp()));
32608
+ _this4.initTempObject(new mxDraw3d.MdGeEdge(p1.getImp(), p2.getImp()));
32587
32609
  } else if (p1 instanceof Object && arguments.length == 1) {
32588
32610
  _this4 = _super4.call(this, p1);
32589
32611
  }
@@ -35315,12 +35337,12 @@ var MdGeChamfer = /*#__PURE__*/function (_MdGeObject18) {
35315
35337
  }, {
35316
35338
  key: "FirstVertex",
35317
35339
  value: function FirstVertex(IC) {
35318
- return new MdGeVertex(IC);
35340
+ return new MdGeVertex(this.imp.FirstVertex(IC));
35319
35341
  }
35320
35342
  }, {
35321
35343
  key: "LastVertex",
35322
35344
  value: function LastVertex(IC) {
35323
- return new MdGeVertex(IC);
35345
+ return new MdGeVertex(this.imp.LastVertex(IC));
35324
35346
  }
35325
35347
  }, {
35326
35348
  key: "Abscissa",
@@ -44143,6 +44165,67 @@ var MdGeAisTexturedShape = /*#__PURE__*/function (_MdGeAisObject2) {
44143
44165
  }]);
44144
44166
  return MdGeAisTexturedShape;
44145
44167
  }(MdGeAisObject);
44168
+ var MdGeSpliter = /*#__PURE__*/function (_MdGeObject80) {
44169
+ _inherits$1(MdGeSpliter, _MdGeObject80);
44170
+ var _super91 = _createSuper(MdGeSpliter);
44171
+ function MdGeSpliter(p) {
44172
+ var _this90;
44173
+ _classCallCheck$1(this, MdGeSpliter);
44174
+ if (p) {
44175
+ _this90 = _super91.call(this, p);
44176
+ } else {
44177
+ _this90 = _super91.call(this);
44178
+ _this90.initTempObject(new mxDraw3d.MdGeSpliter());
44179
+ }
44180
+ return _possibleConstructorReturn$1(_this90);
44181
+ }
44182
+ _createClass$1(MdGeSpliter, [{
44183
+ key: "SetTools",
44184
+ value: function SetTools(theLS) {
44185
+ var list = new MdGeListOfShape();
44186
+ theLS.forEach(function (ele) {
44187
+ list.AppendShape(ele);
44188
+ });
44189
+ this.imp.SetTools(list.getImp());
44190
+ }
44191
+ }, {
44192
+ key: "SetArguments",
44193
+ value: function SetArguments(theLS) {
44194
+ var list = new MdGeListOfShape();
44195
+ theLS.forEach(function (ele) {
44196
+ list.AppendShape(ele);
44197
+ });
44198
+ this.imp.SetArguments(list.getImp());
44199
+ }
44200
+ }, {
44201
+ key: "Build",
44202
+ value: function Build() {
44203
+ this.imp.Build();
44204
+ }
44205
+ }, {
44206
+ key: "IsDone",
44207
+ value: function IsDone() {
44208
+ return this.imp.IsDone();
44209
+ }
44210
+ }, {
44211
+ key: "HasWarnings",
44212
+ value: function HasWarnings() {
44213
+ return this.imp.HasWarnings();
44214
+ }
44215
+ }, {
44216
+ key: "Shapes",
44217
+ value: function Shapes() {
44218
+ var list = new MdGeListOfShape(this.imp.Shapes());
44219
+ var ret = new Array();
44220
+ var it = list.begin();
44221
+ for (; it.More(); it.Next()) {
44222
+ ret.push(it.Value());
44223
+ }
44224
+ return ret;
44225
+ }
44226
+ }]);
44227
+ return MdGeSpliter;
44228
+ }(MdGeObject);
44146
44229
  var _mxFinalizationRegistry = new FinalizationRegistry(function (key) {
44147
44230
  mxDraw3d.mdGeTopo.DestroyObject(key);
44148
44231
  });
@@ -47141,6 +47224,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
47141
47224
  MdGeAisShape,
47142
47225
  MdGeBndBox,
47143
47226
  MdGeAisTexturedShape,
47227
+ MdGeSpliter,
47144
47228
  loadMxCADassembly3d,
47145
47229
  MxMap,
47146
47230
  MxMapAddRasterTileLayer,
@@ -47149,4 +47233,4 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
47149
47233
  mx_gcj02_To_gps84
47150
47234
  }, Symbol.toStringTag, { value: 'Module' }));
47151
47235
 
47152
- 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, MxCoordConvert, MxCpp, MxCppType, MxDraw3d, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, 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, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };
47236
+ 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, MdGeSpliter, 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, MxCoordConvert, MxCpp, MxCppType, MxDraw3d, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, 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, mx_gcj02_To_gps84, mx_gps84_To_gcj02, postEmscriptenIndexedDBFile, postMemoryFile, saveAsFileDialog, setMcCmColor };