mxdraw 0.1.89 → 0.1.92

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.
@@ -0,0 +1,29 @@
1
+ /** @module McGeTool */
2
+ import * as THREE from 'three';
3
+ import MxDrawObject from '../MxDrawObject';
4
+ /**
5
+ * MrxDbgUtils
6
+ * 当常用的工具类.
7
+ * @example ```typescript
8
+ * ```
9
+ */
10
+ export default class MrxDbgUtils {
11
+ private imp;
12
+ private initImp;
13
+ /**
14
+ * 查找某个位置的对象.
15
+ * @param pt 查找位置
16
+ * @return 返回找到的对象id数组.
17
+ * @example
18
+ * ```
19
+ */
20
+ findEntAtPoint(pt: THREE.Vector3, filter?: any, mxObj?: MxDrawObject): Promise<number[]>;
21
+ /**
22
+ * 交互选择对象.
23
+ * @param strPrompt 提示字符串
24
+ * @return 返回找到的对象id数组.
25
+ * @example
26
+ * ```
27
+ */
28
+ selectEnt(strPrompt?: string, filter?: any): Promise<number[]>;
29
+ }
@@ -0,0 +1,4 @@
1
+ /** @module MrxDbgUiPrPointClass */
2
+ import MrxDbgUtilsModule from './MrxDbgUtils';
3
+ declare const _default: MrxDbgUtilsModule;
4
+ export default _default;
@@ -32,6 +32,7 @@ export default class MxCADObject {
32
32
  openFile(file: string, retfun?: (ret: Object) => void): void;
33
33
  /**
34
34
  * 保存CAD文件
35
+ * 文件保存路径,在bin/release/ini.json, 中server.savepath设置。默认保存到,bin/release/public/save目录下。
35
36
  * @example
36
37
  * ```typescript
37
38
  *
@@ -81,12 +81,4 @@ export default class MxDbDatabase {
81
81
  * ```
82
82
  */
83
83
  deleteGroup(sName: string): MxDbGroup;
84
- /**
85
- *通过id得到对象.
86
- * @example
87
- * ```typescript
88
- *
89
- * ```
90
- */
91
- getEntity(id: number): MxDbEntity;
92
84
  }
@@ -228,43 +228,64 @@ export default abstract class MxDbEntity {
228
228
  */
229
229
  getRenderOrder(): number;
230
230
  /**
231
- * 设置虚线数据
231
+ * 设置线宽是否随像素
232
232
  * @returns number
233
233
  */
234
- setDash(dDashArray: number, dDashRatio: number): void;
234
+ setLineWidthByPixels(isPixels: boolean): void;
235
235
  /**
236
- * 得到虚线数据
236
+ * 线宽是否随像素
237
237
  * @returns number
238
238
  */
239
- getDash(): any;
239
+ getLineWidthByPixels(): boolean;
240
240
  /**
241
- * 设置虚线显示。并初始化一个默认值。
241
+ * 设置线宽
242
242
  * @returns number
243
243
  */
244
- setDashLineDisplay(isDashLine: boolean): void;
244
+ setLineWidth(dLineWidth: number): void;
245
245
  /**
246
- * 是否虚线显示
246
+ * 得到线宽
247
247
  * @returns number
248
248
  */
249
- isDashLineDisplay(): boolean;
249
+ getLineWidth(): number;
250
250
  /**
251
- * 设置线宽是否随像素
251
+ * 返回曲线长度
252
252
  * @returns number
253
253
  */
254
- setLineWidthByPixels(isPixels: boolean): void;
254
+ getGetLength(): number;
255
255
  /**
256
- * 线宽是否随像素
256
+ * 设置虚线 +实线的长度.
257
+ * dDashRatio确定虚线,与实线的比率.
257
258
  * @returns number
258
259
  */
259
- getLineWidthByPixels(): boolean;
260
+ setDashLen(dashLen: number): void;
260
261
  /**
261
- * 设置线宽
262
+ * 设置虚线,与实线的比率
262
263
  * @returns number
263
264
  */
264
- setLineWidth(dLineWidth: number): void;
265
+ setDashRatio(dDashRatio: number): void;
265
266
  /**
266
- * 得到线宽
267
+ * 设置实线虚线总段数 = 1 / dashArray
267
268
  * @returns number
268
269
  */
269
- getLineWidth(): number;
270
+ setDashArray(dDashArray: number): void;
271
+ /**
272
+ * 设置虚线数据
273
+ * @returns number
274
+ */
275
+ setDash(dDashArray: number, dDashRatio: number): void;
276
+ /**
277
+ * 得到虚线数据
278
+ * @returns number
279
+ */
280
+ getDash(): any;
281
+ /**
282
+ * 设置虚线显示。并初始化一个默认值。
283
+ * @returns number
284
+ */
285
+ setDashLineDisplay(isDashLine: boolean): void;
286
+ /**
287
+ * 是否虚线显示
288
+ * @returns number
289
+ */
290
+ isDashLineDisplay(): boolean;
270
291
  }
@@ -24,4 +24,9 @@ export default class MxDbLine extends MxDbEntity {
24
24
  dwgOut(obj: any): object;
25
25
  create(): MxDbEntity;
26
26
  getGeomExtents(): THREE.Box3 | null;
27
+ /**
28
+ * 返回曲线长度.
29
+ * @returns number
30
+ */
31
+ getGetLength(): number;
27
32
  }
@@ -771,4 +771,26 @@ export default class MxDrawObject {
771
771
  * @example
772
772
  */
773
773
  closeWebSocket(): any;
774
+ /**
775
+ * CAD坐标到文档坐标.
776
+ * 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
777
+ * @returns number
778
+ * @example
779
+ * ```typescript
780
+ *
781
+ *
782
+ * ```
783
+ */
784
+ cadCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
785
+ /**
786
+ * 文档坐标坐标到CAD.
787
+ * 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
788
+ * @returns number
789
+ * @example
790
+ * ```typescript
791
+ *
792
+ *
793
+ * ```
794
+ */
795
+ docCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
774
796
  }
@@ -556,5 +556,27 @@ export default class MxFun {
556
556
  * 调用服务器后台CAD命令.
557
557
  * */
558
558
  callCommand(cmd: string, param: string, retCall?: (param: any) => void): any;
559
+ /**
560
+ * CAD坐标到文档坐标.
561
+ * 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
562
+ * @returns number
563
+ * @example
564
+ * ```typescript
565
+ *
566
+ *
567
+ * ```
568
+ */
569
+ cadCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
570
+ /**
571
+ * 文档坐标坐标到CAD.
572
+ * 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
573
+ * @returns number
574
+ * @example
575
+ * ```typescript
576
+ *
577
+ *
578
+ * ```
579
+ */
580
+ docCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
559
581
  }
560
582
  export {};
@@ -22,6 +22,7 @@ import McGiWorldDraw from './MxModule/McGiWorldDraw';
22
22
  import McGiWorldDrawType from './MxModule/McGiWorldDrawType';
23
23
  import MxType from './MxModule/MxType';
24
24
  import Mxassembly from './MxModule/Mxassembly';
25
+ import MrxDbgUtils from './MxModule/MrxDbgUtils';
25
26
  import MxDbArea from './MxModule/MxDbArea';
26
27
  import MxDbAnyLine from './MxModule/MxDbAnyLine';
27
28
  import MxDbCloudLine from './MxModule/MxDbCloudLine';
@@ -38,4 +39,4 @@ import MxDbDatabase from './MxModule/MxDbDatabase';
38
39
  import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
39
40
  import MxDbGroup from './MxModule/MxDbGroup';
40
41
  import MxCADObject from './MxModule/MxCADObject';
41
- export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, MxDrawObject, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
42
+ export { MxFun, Mxassembly, MrxDbgUtils, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, MxDrawObject, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxType, MxDbArea, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
@@ -22,6 +22,7 @@ import McGiWorldDraw from './MxModule/McGiWorldDraw';
22
22
  import McGiWorldDrawType from './MxModule/McGiWorldDrawType';
23
23
  import MxType from './MxModule/MxType';
24
24
  import Mxassembly from './MxModule/Mxassembly';
25
+ import MrxDbgUtils from './MxModule/MrxDbgUtils';
25
26
  import MxDbArea from './MxModule/MxDbArea';
26
27
  import MxDbLeadTag from './MxModule/MxDbLeadTag';
27
28
  import MxDbAnyLine from './MxModule/MxDbAnyLine';
@@ -40,10 +41,11 @@ import MxDbLayerTableRecord from './MxModule/MxDbLayerTableRecord';
40
41
  import MxDbDatabase from './MxModule/MxDbDatabase';
41
42
  import MxCADObject from './MxModule/MxCADObject';
42
43
  import MxDbGroup from './MxModule/MxDbGroup';
43
- export { MxFun, Mxassembly, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDbHatch, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxDrawObject, MxType, MxDbArea, MxDbLeadTag, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
44
+ export { MxFun, Mxassembly, MrxDbgUtils, MxThreeJS, McEdGetPointWorldDrawObject, MrxDbgUiPrPoint, McGePoint3d, McGePoint3dArray, McGeTool, MxDbEntity, MxFilters, MxDbImage, MxDbLine, MxDbSVG, MxDbSVGText, MxDbPolyline, Mx3PointArc, MxDbCoord, MxDbHatch, MxDb2LineAngularDimension, MxDbRect, MxDbAlignedDimension, useCanvasResizeListener, loadCoreCode, store, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MxDrawObject, MxType, MxDbArea, MxDbLeadTag, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon, MxDbDatabase, MxCADObject, MxDbLayerTableRecord, MxDbGroup };
44
45
  declare const _default: {
45
46
  MxFun: import("./doc").MxFun;
46
47
  Mxassembly: import("./MxModule/Mxassembly/Mxassembly").default;
48
+ MrxDbgUtils: import("./MxModule/MrxDbgUtils/MrxDbgUtils").default;
47
49
  McGeTool: import("./MxModule/McGeTool/McGeTool").default;
48
50
  MxThreeJS: import("./MxModule/MxThreeJS/MxThreeJS").default;
49
51
  McEdGetPointWorldDrawObject: typeof McEdGetPointWorldDrawObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mxdraw",
3
- "version": "0.1.89",
3
+ "version": "0.1.92",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/mxdraw.umd.js",