mxcad 1.0.225 → 1.0.226

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 CHANGED
@@ -2249,7 +2249,7 @@ export declare class MxCADResbuf extends McRxObject {
2249
2249
  // dxf: 10
2250
2250
  * ```
2251
2251
  */
2252
- forEach(call: (val: any, type: number, dxf: number) => void): void;
2252
+ forEach(call: (val: any, type: number, dxf: number, index: number) => void): void;
2253
2253
  /**
2254
2254
  * 获取 resbuf 数据项个数。
2255
2255
  * @returns resbuf 数据项个数。
@@ -12576,6 +12576,23 @@ export declare class MxPropertiesWindowCustom {
12576
12576
  /** 属性UI程序调用,设置给定实体的自定义属性 */
12577
12577
  setEntityProperties(id: McObjectId, prop: MxPropertiesWindowCustomValue): void;
12578
12578
  }
12579
+ /**
12580
+ * MxCompare 两个图纸比较
12581
+ */
12582
+ export declare class MxCompare {
12583
+ private imp;
12584
+ private result;
12585
+ constructor();
12586
+ private getTypeString;
12587
+ /**
12588
+ * 把当前控件显示的内容和database的图纸进行比较
12589
+ */
12590
+ do(database: McDbDatabase): boolean;
12591
+ /**
12592
+ * 得到图纸比较结果
12593
+ */
12594
+ getResult(): any[];
12595
+ }
12579
12596
  /**
12580
12597
  * 指定执行克隆操作时的行为类型
12581
12598
  */
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.225";
14148
+ const version$1 = "1.0.226";
14149
14149
 
14150
14150
  var isSharedArrayBuffer = ("SharedArrayBuffer" in window);
14151
14151
  var isCdn = document.currentScript && /unpkg\.com\/mxcad/.test(document.currentScript.src);
@@ -14778,19 +14778,19 @@ var MxCADResbuf = /*#__PURE__*/function (_McRxObject) {
14778
14778
  var iType = this.ItemDataType(i);
14779
14779
  var iDxf = this.ItemDataDxf(i);
14780
14780
  if (iType == 5005) {
14781
- call(this.AtString(i, true).val, iType, iDxf);
14781
+ call(this.AtString(i, true).val, iType, iDxf, i);
14782
14782
  } else if (iType == 5009) {
14783
- call(this.AtPoint(i).val, iType, iDxf);
14783
+ call(this.AtPoint(i).val, iType, iDxf, i);
14784
14784
  } else if (iType == 5001) {
14785
- call(this.AtDouble(i).val, iType, iDxf);
14785
+ call(this.AtDouble(i).val, iType, iDxf, i);
14786
14786
  } else if (iType == 5003 || iType == 5010) {
14787
- call(this.AtLong(i).val, 5010, iDxf);
14787
+ call(this.AtLong(i).val, 5010, iDxf, i);
14788
14788
  } else if (iDxf == -8500) {
14789
- call(this.AtObject(i).val, -8500, -8500);
14789
+ call(this.AtObject(i).val, -8500, -8500, i);
14790
14790
  } else if (iType == -8e3 || iType == -8001 || iType == -8002 || iType == -8003 || iType == -8004) {
14791
- call(this.AtObjectId(i).val, -8e3, -8e3);
14791
+ call(this.AtObjectId(i).val, -8e3, -8e3, i);
14792
14792
  } else {
14793
- call(void 0, iType, iDxf);
14793
+ call(void 0, iType, iDxf, i);
14794
14794
  }
14795
14795
  }
14796
14796
  }
@@ -20550,10 +20550,10 @@ var McObject = /*#__PURE__*/function () {
20550
20550
  param = JSON.parse(param);
20551
20551
  if (param.callid != callID) return;
20552
20552
  mxObject.removeEventFuction("load_dwg_gackground_result", funOpenCall);
20553
+ call(param.l_param == 1);
20553
20554
  if (param.l_param == 1 && isShow) {
20554
20555
  _this5.regen(100);
20555
20556
  }
20556
- call(param.l_param == 1);
20557
20557
  };
20558
20558
  mxObject.addEvent("load_dwg_gackground_result", funOpenCall);
20559
20559
  this.imp.loadDwgBackground(sFileUrl, color, callID, isShow);
@@ -21373,6 +21373,71 @@ var MxPropertiesWindowCustom = /*#__PURE__*/function () {
21373
21373
  }]);
21374
21374
  return MxPropertiesWindowCustom;
21375
21375
  }();
21376
+ var MxCompare = /*#__PURE__*/function () {
21377
+ function MxCompare() {
21378
+ _classCallCheck$1(this, MxCompare);
21379
+ _defineProperty(this, "imp", void 0);
21380
+ _defineProperty(this, "result", []);
21381
+ this.imp = new MxCpp.mxcadassemblyimp.MxCompare();
21382
+ }
21383
+ _createClass$1(MxCompare, [{
21384
+ key: "getTypeString",
21385
+ value: function getTypeString(type) {
21386
+ var ret = "";
21387
+ switch (type) {
21388
+ case 0:
21389
+ ret = "no modify";
21390
+ break;
21391
+ case 1:
21392
+ ret = "unknown";
21393
+ break;
21394
+ case 2:
21395
+ ret = "object modify";
21396
+ break;
21397
+ case 3:
21398
+ ret = "object erase";
21399
+ break;
21400
+ case 4:
21401
+ ret = "object add";
21402
+ break;
21403
+ default:
21404
+ ret = "unknown";
21405
+ }
21406
+ return ret;
21407
+ }
21408
+ }, {
21409
+ key: "do",
21410
+ value: function _do(database) {
21411
+ this.result = [];
21412
+ if (this.imp.Do(database.imp)) {
21413
+ var ret = new MxCADResbuf(this.imp.getResult());
21414
+ var count = ret.GetCount();
21415
+ for (var i = 0; i + 2 < count; i += 3) {
21416
+ var id = ret.AtLong(i);
21417
+ if (!id.ret) break;
21418
+ var pos = ret.AtPoint(i + 1);
21419
+ if (!pos.ret) break;
21420
+ var type = ret.AtLong(i + 2);
21421
+ if (!type.ret) break;
21422
+ this.result.push({
21423
+ id: new McObjectId(id.val),
21424
+ pos: pos.val,
21425
+ type: type.val,
21426
+ str: this.getTypeString(type.val)
21427
+ });
21428
+ }
21429
+ return true;
21430
+ }
21431
+ return false;
21432
+ }
21433
+ }, {
21434
+ key: "getResult",
21435
+ value: function getResult() {
21436
+ return this.result;
21437
+ }
21438
+ }]);
21439
+ return MxCompare;
21440
+ }();
21376
21441
 
21377
21442
  var MxCpp;
21378
21443
  function loadMxCADassembly(_x) {
@@ -59612,6 +59677,7 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
59612
59677
  MxPropertiesWindowCustomValueType,
59613
59678
  MxPropertiesWindowCustomValue,
59614
59679
  MxPropertiesWindowCustom,
59680
+ MxCompare,
59615
59681
  MxCADCloneType,
59616
59682
  IMcDbDwgFiler,
59617
59683
  MxCADWorldDraw,
@@ -59843,4 +59909,4 @@ const mxcad = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
59843
59909
  mx_gcj02_To_gps84
59844
59910
  }, Symbol.toStringTag, { value: 'Module' }));
59845
59911
 
59846
- export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbXrecord, McGeBound, McGeDoubleArray, 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, 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, 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, Mx3dAlgoChamfer, Mx3dAlgoFillet, Mx3dAlgoObject, Mx3dApplication, Mx3dAspectArrow, Mx3dAspectDim, Mx3dAspectLine, Mx3dAspectObject, Mx3dAspectText, Mx3dBaseObject, Mx3dBrepCastGeom, Mx3dDbDocument, Mx3dDbLabel, Mx3dDbObject, Mx3dDimAngle, Mx3dDimDiameter, Mx3dDimLength, Mx3dDimObject, Mx3dDimRadius, Mx3dGeAxis, Mx3dGeBndBox, Mx3dGeCSYS, Mx3dGeCSYSR, Mx3dGeCircle, Mx3dGeColor, Mx3dGeConic, Mx3dGeCurve, Mx3dGeCylinder, Mx3dGeDir, Mx3dGeEllipse, Mx3dGeHyperbola, Mx3dGeLine, Mx3dGeLocation, Mx3dGeMaterial, Mx3dGeObject, Mx3dGePlane, Mx3dGePoint, Mx3dGeTrsf, Mx3dGeVec, Mx3dGeomBSplineCurve, Mx3dGeomBSplineSurface, Mx3dGeomBezierCurve, Mx3dGeomBezierSurface, Mx3dGeomBoundedCurve, Mx3dGeomBoundedSurface, Mx3dGeomCircle, Mx3dGeomConic, Mx3dGeomConicalSurface, Mx3dGeomCurve, Mx3dGeomCylindricalSurface, Mx3dGeomElementarySurface, Mx3dGeomEllipse, Mx3dGeomHyperbola, Mx3dGeomLine, Mx3dGeomObject, Mx3dGeomParabola, Mx3dGeomPlane, Mx3dGeomSphericalSurface, Mx3dGeomSurface, Mx3dGeomToroidalSurface, Mx3dInterpolateBSplineCurve, Mx3dMkBox, Mx3dMkCone, Mx3dMkCylinder, Mx3dMkFace, Mx3dMkLoft, Mx3dMkObject, Mx3dMkPipe, Mx3dMkPolygon, Mx3dMkPrism, Mx3dMkRevol, Mx3dMkSphere, Mx3dMkThickSolid, Mx3dMkTorus, Mx3dMkWedge, Mx3dShapeCompSolid, Mx3dShapeCompound, Mx3dShapeDownCast, Mx3dShapeEdge, Mx3dShapeFace, Mx3dShapeObject, Mx3dShapeShell, Mx3dShapeSolid, Mx3dShapeVertex, Mx3dShapeWire, Mx3dSymbolObject, Mx3dSymbolText, Mx3dUtils, Mx3dView, Mx3dWireTool, MxApp3D, MxApp3DType, MxCAD3DObject, MxCADCloneType, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxDraw3d, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxOldMx3dApplication, MxOldMx3dBaseObject, MxOldMx3dDbDocument, MxOldMx3dDbLabel, MxOldMx3dDbObject, MxOldMx3dGeBndBox, MxOldMx3dGeColor, MxOldMx3dGeLocation, MxOldMx3dGeObject, MxOldMx3dGePoint, MxOldMx3dLabelSequence, MxOldMx3dLabelSequenceIterator, MxOldMx3dShapeObject, 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 };
59912
+ export { ColorIndexType, ColorMethod, DxfCode, FetchAttributes, IMcDbDwgFiler, IsZero, McAppType, McCmColor, McDb, McDb2LineAngularDimension, McDbAlignedDimension, McDbArc, McDbAttribute, McDbAttributeDefinition, McDbBackgroundEntity, McDbBlockReference, McDbBlockTable, McDbBlockTableRecord, McDbCircle, McDbCurve, McDbCustomEntity, McDbDatabase, McDbDictionary, McDbDimension, McDbEllipse, McDbEntity, McDbGroup, McDbHatch, McDbLayerTable, McDbLayerTableRecord, McDbLine, McDbLinetypeTable, McDbLinetypeTableRecord, McDbMText, McDbObject, McDbObjectArray, McDbPoint, McDbPolyline, McDbProxyEntity, McDbRasterImage, McDbRasterImageDef, McDbRotatedDimension, McDbText, McDbTextStyleTable, McDbTextStyleTableRecord, McDbXrecord, McGeBound, McGeDoubleArray, 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, 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, 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, Mx3dAlgoChamfer, Mx3dAlgoFillet, Mx3dAlgoObject, Mx3dApplication, Mx3dAspectArrow, Mx3dAspectDim, Mx3dAspectLine, Mx3dAspectObject, Mx3dAspectText, Mx3dBaseObject, Mx3dBrepCastGeom, Mx3dDbDocument, Mx3dDbLabel, Mx3dDbObject, Mx3dDimAngle, Mx3dDimDiameter, Mx3dDimLength, Mx3dDimObject, Mx3dDimRadius, Mx3dGeAxis, Mx3dGeBndBox, Mx3dGeCSYS, Mx3dGeCSYSR, Mx3dGeCircle, Mx3dGeColor, Mx3dGeConic, Mx3dGeCurve, Mx3dGeCylinder, Mx3dGeDir, Mx3dGeEllipse, Mx3dGeHyperbola, Mx3dGeLine, Mx3dGeLocation, Mx3dGeMaterial, Mx3dGeObject, Mx3dGePlane, Mx3dGePoint, Mx3dGeTrsf, Mx3dGeVec, Mx3dGeomBSplineCurve, Mx3dGeomBSplineSurface, Mx3dGeomBezierCurve, Mx3dGeomBezierSurface, Mx3dGeomBoundedCurve, Mx3dGeomBoundedSurface, Mx3dGeomCircle, Mx3dGeomConic, Mx3dGeomConicalSurface, Mx3dGeomCurve, Mx3dGeomCylindricalSurface, Mx3dGeomElementarySurface, Mx3dGeomEllipse, Mx3dGeomHyperbola, Mx3dGeomLine, Mx3dGeomObject, Mx3dGeomParabola, Mx3dGeomPlane, Mx3dGeomSphericalSurface, Mx3dGeomSurface, Mx3dGeomToroidalSurface, Mx3dInterpolateBSplineCurve, Mx3dMkBox, Mx3dMkCone, Mx3dMkCylinder, Mx3dMkFace, Mx3dMkLoft, Mx3dMkObject, Mx3dMkPipe, Mx3dMkPolygon, Mx3dMkPrism, Mx3dMkRevol, Mx3dMkSphere, Mx3dMkThickSolid, Mx3dMkTorus, Mx3dMkWedge, Mx3dShapeCompSolid, Mx3dShapeCompound, Mx3dShapeDownCast, Mx3dShapeEdge, Mx3dShapeFace, Mx3dShapeObject, Mx3dShapeShell, Mx3dShapeSolid, Mx3dShapeVertex, Mx3dShapeWire, Mx3dSymbolObject, Mx3dSymbolText, Mx3dUtils, Mx3dView, Mx3dWireTool, MxApp3D, MxApp3DType, MxCAD3DObject, MxCADCloneType, MxCADPluginBase, MxCADPluginMapDefaultData, MxCADPluginSampleCode, MxCADResbuf, MxCADSelectionSet, MxCADSelectionSetStatus, MxCADUiPrAngle, MxCADUiPrBase, MxCADUiPrDist, MxCADUiPrEntity, MxCADUiPrInt, MxCADUiPrKeyWord, MxCADUiPrPoint, MxCADUiPrString, MxCADUtility, MxCADUtilityClass, MxCADWorldDraw, MxCheckTheBrowser, MxCompare, MxCoordConvert, MxCoordConvertType, MxCpp, MxCppType, MxDraw3d, MxMap, MxMapAddGoogleCnLayer, MxMapAddRasterTileLayer, MxOldMx3dApplication, MxOldMx3dBaseObject, MxOldMx3dDbDocument, MxOldMx3dDbLabel, MxOldMx3dDbObject, MxOldMx3dGeBndBox, MxOldMx3dGeColor, MxOldMx3dGeLocation, MxOldMx3dGeObject, MxOldMx3dGePoint, MxOldMx3dLabelSequence, MxOldMx3dLabelSequenceIterator, MxOldMx3dShapeObject, 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 };