mxdraw 0.1.28 → 0.1.31

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.
Files changed (37) hide show
  1. package/dist/lib/MxModule/MxDbArea/MxDbArea.js +1 -1
  2. package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +1 -1
  3. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
  4. package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -1
  5. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
  6. package/dist/lib/doc.js +1 -1
  7. package/dist/mxdraw.es5.js +1 -1
  8. package/dist/mxdraw.umd.js +1 -1
  9. package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +1 -2
  10. package/dist/types/MxModule/McGeTool/McGeTool.d.ts +3 -2
  11. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +1 -2
  12. package/dist/types/MxModule/Mx3PointArc/Mx3PointArc.d.ts +1 -0
  13. package/dist/types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts +2 -1
  14. package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +9 -1
  15. package/dist/types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts +4 -1
  16. package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +18 -0
  17. package/dist/types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts +22 -2
  18. package/dist/types/MxModule/MxDbCoord/MxDbCoord.d.ts +3 -1
  19. package/dist/types/MxModule/MxDbEllipse/MxDbEllipse.d.ts +3 -1
  20. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +60 -103
  21. package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +15 -0
  22. package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +7 -0
  23. package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +4 -0
  24. package/dist/types/MxModule/MxDbPolyline/MxDbPolyline.d.ts +8 -1
  25. package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +6 -0
  26. package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +9 -0
  27. package/dist/types/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +4 -1
  28. package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +39 -3
  29. package/dist/types/MxModule/MxDbSVGText/MxDbSVGText.d.ts +10 -2
  30. package/dist/types/MxModule/MxDbText/MxDbText.d.ts +5 -1
  31. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +1 -1
  32. package/dist/types/MxModule/MxFun/MxFun.d.ts +1 -2
  33. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +7 -9
  34. package/dist/types/MxModule/MxType/MxType.d.ts +0 -1
  35. package/dist/types/doc.d.ts +36 -22
  36. package/dist/types/tools/three/index.d.ts +2 -3
  37. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
1
  /** @module McEdGetPointWorldDrawObject*/
2
- import { ColorType } from '../MxType/MxType';
3
2
  export interface McEdGetPointWorldDrawObjectClass {
4
3
  [x: string]: any;
5
4
  drawCircle(cen: THREE.Vector3, dRadius: number): void;
@@ -89,7 +88,7 @@ export default class McEdGetPointWorldDrawObject {
89
88
  * pWorldDraw.setColor(0xFFFFFF)
90
89
  * ```
91
90
  */
92
- setColor(iColor: ColorType): void;
91
+ setColor(iColor: number | string | THREE.Color): void;
93
92
  /**
94
93
  * 得到绘制对象颜色.
95
94
  * @returns 颜色
@@ -11,7 +11,7 @@ export default class McGeTool {
11
11
  private initImp;
12
12
  /**
13
13
  * 计算闭合的区域面积
14
- * @param
14
+ * @param aryPoint 构成区域面积的顶点位置集合
15
15
  * @return number
16
16
  * @example
17
17
  * ```
@@ -19,7 +19,8 @@ export default class McGeTool {
19
19
  calcArea(aryPoint: McGePoint3dArray | THREE.Vector3[]): number;
20
20
  /**
21
21
  * 判断点是否在一个闭合的多边形区域。
22
- * @param p
22
+ * @param pt 点的坐标位置
23
+ * @param aryPoint 闭合多边形区域的顶点坐标集合
23
24
  * @return any
24
25
  * @example
25
26
  * ``` typescript
@@ -1,7 +1,6 @@
1
1
  /** @module McGiWorldDraw*/
2
2
  import McGiWorldDrawType from '../McGiWorldDrawType';
3
3
  import MxDrawObject from '../MxDrawObject';
4
- import { ColorType } from '../MxType/MxType';
5
4
  /**
6
5
  * McGiWorldDraw 用于构建一个动态绘制回调对象的规范接口
7
6
  * @abstract 是 {@link MxDbEntity.worldDraw }必须实现的抽象回调方法中的回调对象 通过回调对象完成一些动态绘制任务
@@ -51,7 +50,7 @@ export default interface McGiWorldDraw {
51
50
  * ```
52
51
  *
53
52
  */
54
- setColor(iColor: ColorType): void;
53
+ setColor(iColor: number | string | THREE.Color): void;
55
54
  /**
56
55
  * 返回绘制颜色
57
56
  * @returns
@@ -4,6 +4,7 @@ import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
6
  * Mx3PointArc 对象.
7
+ * 通过三个坐标点绘制一段圆弧
7
8
  */
8
9
  export default class Mx3PointArc extends MxDbEntity {
9
10
  point1: Vector3;
@@ -4,7 +4,8 @@ import { Vector3 } from 'three';
4
4
  import McGiWorldDraw from '../McGiWorldDraw';
5
5
  import MxDbEntity from '../MxDbEntity';
6
6
  /**
7
- * MxDb2LineAngularDimension 对象.
7
+ * MxDb2LineAngularDimension
8
+ * 显示角度测量的图形
8
9
  */
9
10
  export default class MxDb2LineAngularDimension extends MxDbEntity {
10
11
  point1: THREE.Vector3;
@@ -3,7 +3,7 @@ import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbAlignedDimension 尺寸对象.
6
+ * MxDbAlignedDimension 尺寸标注
7
7
  */
8
8
  export default class MxDbAlignedDimension extends MxDbEntity {
9
9
  point1: THREE.Vector3;
@@ -12,7 +12,15 @@ export default class MxDbAlignedDimension extends MxDbEntity {
12
12
  private getDirection;
13
13
  getDimText(): string;
14
14
  worldDraw(pWorldDraw: McGiWorldDraw): void;
15
+ /**
16
+ * 设置测量的开始点
17
+ * @parma pt1 three.js坐标点位
18
+ * */
15
19
  setPoint1(pt1: THREE.Vector3): void;
20
+ /**
21
+ * 设置测量的结束点
22
+ * @parma pt1 three.js坐标点位
23
+ * */
16
24
  setPoint2(pt2: THREE.Vector3): void;
17
25
  getGripPoints(): Array<THREE.Vector3>;
18
26
  moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
@@ -3,13 +3,16 @@ import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbAnyLine 对象.
6
+ * MxDbAnyLine
7
+ * 任意线段
7
8
  */
8
9
  export default class MxDbAnyLine extends MxDbEntity {
10
+ /** 构成线段的顶点坐标集合 */
9
11
  points: Vector3[];
10
12
  getTypeName(): string;
11
13
  create(): MxDbEntity;
12
14
  worldDraw(pWorldDraw: McGiWorldDraw): void;
15
+ /** 获取线段的包围盒的中心点坐标 */
13
16
  getCenter(): Vector3;
14
17
  getGripPoints(): Vector3[];
15
18
  moveGripPointsAt(index: number, offset: Vector3): boolean;
@@ -2,16 +2,34 @@
2
2
  import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
+ /**
6
+ * MxDbArea 任意不规则多边形
7
+ * */
5
8
  export default class MxDbArea extends MxDbEntity {
9
+ /** 构成多边形的顶点集合 */
6
10
  points: Array<THREE.Vector3>;
7
11
  getTypeName(): string;
8
12
  create(): MxDbEntity;
13
+ /** 在worldDraw动态绘制时会计算当前顶点坐标集合的面积,并显示渲染计算后的计算结果
14
+ * @returns 返回的计算后的面积结果
15
+ * */
16
+ getDimText(): string;
9
17
  worldDraw(pWorldDraw: McGiWorldDraw): void;
10
18
  getGripPoints(): Array<THREE.Vector3>;
11
19
  moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
12
20
  dwgIn(obj: any): boolean;
13
21
  dwgOut(obj: any): object;
22
+ /**
23
+ * 添加构成多边形的点
24
+ * @param pt 位置坐标
25
+ * */
14
26
  addPoint(pt: THREE.Vector3): void;
27
+ /**
28
+ * 获取构成多边形的顶点集合
29
+ * */
15
30
  getPoints(): Array<THREE.Vector3>;
31
+ /**
32
+ * 清空构成多边形的顶点集合
33
+ * */
16
34
  clearPoint(): void;
17
35
  }
@@ -3,7 +3,7 @@ import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbCloudLine 对象.
6
+ * MxDbCloudLine 对象. 绘制任意的云线
7
7
  */
8
8
  export default class MxDbCloudLine extends MxDbEntity {
9
9
  private points;
@@ -11,14 +11,34 @@ export default class MxDbCloudLine extends MxDbEntity {
11
11
  private drawGeometry;
12
12
  getTypeName(): string;
13
13
  create(): MxDbEntity;
14
+ /** 设置构成云线的每个圆弧半径长度
15
+ * @parma radius 圆弧半径
16
+ * */
14
17
  setRadius(radius: number): void;
18
+ /**
19
+ * 获取云线的圆弧半径
20
+ * */
15
21
  getRadius(): number;
16
22
  private clacNewArcDiameterPoint;
17
23
  private createCloudArcCurvePoints;
24
+ /**
25
+ * 添加云线的顶点坐标, 该顶点坐标会根据上一个构成云线的点计算出下一个云线的顶点位置
26
+ * @param pt 坐标位置
27
+ * @param isAddToDrawGeometry 如果为true 将立即添加顶点并绘制下一个圆弧
28
+ * */
18
29
  addPoint(pt: THREE.Vector3, isAddToDrawGeometry?: boolean): void;
19
- addLine(pt1: THREE.Vector3, pt2: THREE.Vector3): void;
30
+ /**
31
+ * 绘制两点之间的云线(与addPoint不同的是它不是只绘制一个半圆弧,而是绘制两点之间相连接的所有半圆弧)
32
+ * @param pt1 云线开始点
33
+ * @param pt2 云线结束点
34
+ * */
35
+ addLine(pt1: THREE.Vector3, pt2: THREE.Vector3): Vector3;
36
+ /** 重新计算云线的的所有顶点坐标, 如绘制完云线后 重新设置了圆弧半径, 在worldDraw动态绘制时会调用该方法 */
20
37
  reCalculateDrawGeometry(): void;
21
38
  worldDraw(pWorldDraw: McGiWorldDraw): void;
39
+ /**
40
+ * 获取云线包围盒的中心点
41
+ * */
22
42
  getCenter(): Vector3;
23
43
  getGripPoints(): Vector3[];
24
44
  moveGripPointsAt(index: number, offset: Vector3): boolean;
@@ -3,10 +3,12 @@ import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbCoord 对象.
6
+ * MxDbCoord 引线坐标测量
7
7
  */
8
8
  export default class MxDbCoord extends MxDbEntity {
9
+ /** 测量点位置 */
9
10
  point1: THREE.Vector3;
11
+ /** 测量结果显示位置 */
10
12
  point2: THREE.Vector3;
11
13
  worldDraw(pWorldDraw: McGiWorldDraw): void;
12
14
  getGripPoints(): Array<THREE.Vector3>;
@@ -3,10 +3,12 @@ import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbEllipse
6
+ * MxDbEllipse 通过矩形绘制的椭圆
7
7
  */
8
8
  export default class MxDbEllipse extends MxDbEntity {
9
+ /** 矩形的开始点 */
9
10
  point1: Vector3;
11
+ /** 矩形的结束点 */
10
12
  point2: Vector3;
11
13
  getTypeName(): string;
12
14
  worldDraw(pWorldDraw: McGiWorldDraw): void;
@@ -1,10 +1,9 @@
1
1
  /** @module MxDbEntity*/
2
2
  import McGiWorldDraw from '../McGiWorldDraw';
3
3
  import MxDrawObject from '../MxDrawObject';
4
- import { ColorType } from '../MxType/MxType';
5
4
  /**
6
5
  * MxDbEntity 用于构建一个自定义对象的抽象类(该类无法实例化 请通过继承的方式对其抽象方法进行实现)
7
- * @description MxDbEntity 属于 abstract class(抽象类) 主要用途是通过继承这个类实现一个用于动态绘制的回调对象
6
+ * @description MxDbEntity 属于 abstract class(抽象类) 主要用途是通过继承这个类实现一个用于动态绘制的图形对象
8
7
  * 继承实现这个类必须实现的抽象方法:(方法名称前有'Abstract'标签就是必须实现的方法)
9
8
  * @example ```typescript
10
9
  * import THREE from "three"
@@ -23,18 +22,24 @@ import { ColorType } from '../MxType/MxType';
23
22
  * ```
24
23
  */
25
24
  export default abstract class MxDbEntity {
26
- color: ColorType;
25
+ /**
26
+ * 颜色值
27
+ * */
28
+ color: number | string | THREE.Color;
29
+ /**
30
+ * 显示顺序
31
+ * */
27
32
  renderOrder: number;
28
33
  /**
29
- * opacity 设置透明度 0 ~ 1,1表示完全不透明,0表示全透明.
34
+ * 设置透明度 0 ~ 1,1表示完全不透明,0表示全透明.
30
35
  * */
31
36
  opacity: number;
32
37
  /**
33
- * visible 该矩形对象是否可见
38
+ * 该矩形对象是否可见
34
39
  * */
35
40
  visible: boolean;
36
41
  /**
37
- * visible 用户自定义数据.
42
+ * 用户自定义数据.
38
43
  * */
39
44
  userData: {
40
45
  [key: string]: any;
@@ -43,45 +48,61 @@ export default abstract class MxDbEntity {
43
48
  * 自定义对象的绘制函数。在方法中定义如何绘制图形
44
49
  * @param pWorldDraw 绘制对象{@link McGiWorldDraw }
45
50
  * @returns void
46
- * @example
47
- * ``` typescript
48
- *
49
- * ```
50
- *
51
51
  */
52
52
  abstract worldDraw(pWorldDraw: McGiWorldDraw): void;
53
53
  /**
54
54
  * 返回自定义对象的夹点.
55
55
  * @param
56
56
  * @returns Array<THREE.Vector3>
57
- * @example
58
- * ``` typescript
59
- *
60
- * ```
61
- *
62
57
  */
63
58
  abstract getGripPoints(): Array<THREE.Vector3>;
64
59
  /**
65
60
  * 移动自定义对象的夹点.
66
61
  * @param
67
62
  * @returns boolean
63
+ */
64
+ abstract moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
65
+ /**
66
+ * 自定义对象数据输入,辅助函数.
67
+ * @param
68
+ * @returns boolean
68
69
  * @example
69
70
  * ``` typescript
70
- *
71
+ * class MxLine extends MxDbEntity {
72
+ * dwgIn(obj) {
73
+ * // 必须调用 同步自定义数据对象输入
74
+ * this.dwgInHelp(obj,["xxx"])
75
+ * }
76
+ * }
71
77
  * ```
72
- *
73
78
  */
74
- abstract moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
79
+ protected dwgInHelp(obj: any, aryProp: string[]): boolean;
75
80
  /**
76
- * 新创建一个自定义对象
81
+ * 自定义对象数据输出 辅助函数.
77
82
  * @param
78
- * @returns MxDbEntity
83
+ * @returns object
79
84
  * @example
80
85
  * ``` typescript
81
- *
86
+ * class MxLine extends MxDbEntity {
87
+ * dwgOut(obj) {
88
+ * // 必须调用 同步自定义数据对象输出
89
+ * this.dwgOutHelp(obj,["xxx"])
90
+ * }
91
+ * }
82
92
  * ```
83
93
  */
84
- abstract create(): MxDbEntity;
94
+ protected dwgOutHelp(obj: any, aryProp: string[]): any;
95
+ /**
96
+ * 得到对象类型名
97
+ * @returns string
98
+ */
99
+ getTypeName(): string;
100
+ /**
101
+ * 新创建一个自定义对象 (默认调用该对象的构造函数来创建新的对象)
102
+ * @param
103
+ * @returns MxDbEntity
104
+ */
105
+ create(): MxDbEntity;
85
106
  /**
86
107
  * 自定义对象数据输入,必须要实现该函数
87
108
  * @param
@@ -113,143 +134,79 @@ export default abstract class MxDbEntity {
113
134
  */
114
135
  abstract dwgOut(obj: any): object;
115
136
  /**
116
- * 得到对象类型名
117
- * @param
118
- * @returns string
119
- * @example
120
- * ``` typescript
121
- *
122
- * ```
123
- */
124
- abstract getTypeName(): string;
125
- /**
126
- * 自定义实体的坐标变换.
127
- * @param
137
+ * 自定义实体的矩阵 坐标变换 (需要重写该方法实现如果通过矩阵对自定义实体进行操作 默认不会进行任何操作)
138
+ * @param mat THREE.Matrix4 变化矩阵
128
139
  * @returns void
129
- * @example
130
- * }
131
- * ```
132
140
  */
133
141
  transformBy(mat: THREE.Matrix4): void;
134
142
  private getImp;
135
143
  /**
136
144
  * 更新显示
137
- * @param
145
+ * @param 为true 重绘时立即更新显示
138
146
  * @returns boolean
139
- * @example
140
- * ``` typescript
141
- *
142
- * ```
147
+
143
148
  */
144
149
  setNeedUpdateDisplay(isImmediate?: boolean): boolean;
145
150
  /**
146
151
  * 返回对象所在的控件对象。
147
- * @param
148
- * @returns boolean
149
- * @example
150
- * ``` typescript
151
- *
152
- * ```
152
+ * @returns {@link MxDrawObject}
153
153
  */
154
154
  getMxObject(): MxDrawObject | null;
155
155
  /**
156
156
  * 视区显示比较发生成变化,继承类可以向应该事件,更新显示大小。
157
- * @param
158
157
  * @returns boolean
159
- * @example
160
- * ``` typescript
161
- *
162
- * ```
163
158
  */
164
159
  protected onViewChange(): boolean;
165
160
  /**
166
161
  * 得到对象的id.
167
- * @param
168
162
  * @returns number
169
- * @example
170
- * ``` typescript
171
- *
172
- * ```
173
163
  */
174
164
  objectId(): number;
175
165
  /**
176
166
  * 删除对象
177
- * @param
178
167
  * @returns boolean
179
- * @example
180
- * ``` typescript
181
- *
182
- * ```
183
168
  */
184
169
  erase(): boolean;
185
170
  /**
186
171
  * 设置颜色
187
- * @param
172
+ * @param color 颜色值
188
173
  * @returns boolean
189
- * @example
190
- * ``` typescript
191
- *
192
- * ```
193
174
  */
194
- setColor(color: ColorType): void;
175
+ setColor(color: number | string | THREE.Color): void;
195
176
  /**
196
177
  * 得到颜色
197
- * @param
198
178
  * @returns boolean
199
- * @example
200
- * ``` typescript
201
- *
202
- * ```
203
179
  */
204
- getColor(): ColorType;
180
+ getColor(): number | string | THREE.Color;
205
181
  /**
206
- * 复制对象。
207
- * @param
182
+ * 复制克隆对象。
183
+ * @param type {@link MxType.MxCloneType} 传入参数区分是正常拷贝还是动态拷贝
208
184
  * @returns MxDbEntity
209
- * @example
210
- * ``` typescript
211
- *
212
- * ```
213
185
  */
214
186
  clone(type?: number): MxDbEntity;
215
187
  /**
216
- * 自定义对象内部数据输入同步(实现dwgIn抽象方法 必须在实现中调用 this.onDwgIn())
188
+ * 自定义对象内部数据输入同步(重写实现dwgIn抽象方法时 必须在实现中调用 this.onDwgIn(obj))
217
189
  * @param obj dwgIn抽象方法的回调数据
218
190
  */
219
191
  protected onDwgIn(obj: any): void;
220
192
  /**
221
- * 自定义对象内部数据输出同步(实现dwgIn抽象方法 必须在实现中调用 this.onDwgIn()
193
+ * 自定义对象内部数据输出同步(重写实现dwgIn抽象方法 必须在实现中调用 this.onDwgIn(obj)
222
194
  * @param obj dwgOut抽象方法的回调数据
223
195
  */
224
196
  protected onDwgOut(obj: any): void;
225
197
  /**
226
- * 初始自定义对象的类型信息.
227
- * @param
198
+ * 初始自定义对象的类型信息.(如果需要实现该图形对象的保存数据和恢复数据的功能, 需要在项目中初始化一次该图形对象的类)
228
199
  * @returns
229
- * @example
230
- * ``` typescript
231
- *
232
- * ```
233
200
  */
234
201
  rxInit(): void;
235
202
  /**
236
- * 设置显示顺序
237
- * @param
238
- * @returns boolean
239
- * @example
240
- * ``` typescript
241
- *
242
- * ```
203
+ * 设置显示顺序 (通过显示顺序控制图层)
204
+ * @param renderOrder 显示顺序
243
205
  */
244
206
  setRenderOrder(renderOrder: number): void;
245
207
  /**
246
208
  * 得到显示顺序
247
- * @param
248
- * @returns boolean
249
- * @example
250
- * ``` typescript
251
- *
252
- * ```
209
+ * @returns number
253
210
  */
254
211
  getRenderOrder(): number;
255
212
  }
@@ -13,12 +13,27 @@ export default class MxDbImage extends MxDbEntity {
13
13
  private material;
14
14
  getTypeName(): string;
15
15
  worldDraw(pWorldDraw: McGiWorldDraw): void;
16
+ /** 设置图片路径
17
+ * @param sPath 路径
18
+ * */
16
19
  setImagePath(sPath: string): void;
20
+ /** 获取图片路径 */
17
21
  getImagePath(): string;
22
+ /** 设置图片材质
23
+ * @param material THREE.MeshLambertMaterial
24
+ * */
18
25
  setMaterial(material: THREE.MeshLambertMaterial): void;
26
+ /** 设置图片对角点1
27
+ * @param pt1 THREE.Vector3坐标点
28
+ * */
19
29
  setPoint1(pt1: THREE.Vector3): void;
30
+ /** 获得图片对角点1 */
20
31
  getPoint1(): THREE.Vector3;
32
+ /** 设置图片对角点2
33
+ * @param pt2 THREE.Vector3坐标点
34
+ * */
21
35
  setPoint2(pt2: THREE.Vector3): void;
36
+ /** 获得图片对角点2 */
22
37
  getPoint2(): THREE.Vector3;
23
38
  getGripPoints(): Array<THREE.Vector3>;
24
39
  moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
@@ -2,10 +2,17 @@
2
2
  import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
+ /**
6
+ * MxDbLeadComment 引线文字标注
7
+ * */
5
8
  export default class MxDbLeadComment extends MxDbEntity {
9
+ /** 标注点 */
6
10
  point1: THREE.Vector3;
11
+ /** 文字显示位置 */
7
12
  point2: THREE.Vector3;
13
+ /** 文字内容 */
8
14
  text: string;
15
+ /** 文字高度 */
9
16
  textHeight: number;
10
17
  getTypeName(): string;
11
18
  create(): MxDbEntity;
@@ -6,12 +6,16 @@ import MxDbEntity from '../MxDbEntity';
6
6
  * MxDbLine 直线对象.
7
7
  */
8
8
  export default class MxDbLine extends MxDbEntity {
9
+ /** 直线的开始点 */
9
10
  pt1: THREE.Vector3;
11
+ /** 直线的结束点 */
10
12
  pt2: THREE.Vector3;
11
13
  getTypeName(): string;
12
14
  worldDraw(pWorldDraw: McGiWorldDraw): void;
15
+ /** 设置的开始点 */
13
16
  setPoint1(pt1: THREE.Vector3): void;
14
17
  getPoint1(): THREE.Vector3;
18
+ /** 设置的结束点 */
15
19
  setPoint2(pt2: THREE.Vector3): void;
16
20
  getPoint2(): THREE.Vector3;
17
21
  getGripPoints(): Array<THREE.Vector3>;
@@ -3,9 +3,10 @@ import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
5
  /**
6
- * MxDbPolyline 多义线对象.
6
+ * MxDbPolyline 多义线对象(多个点构成的线段)
7
7
  */
8
8
  export default class MxDbPolyline extends MxDbEntity {
9
+ /** 顶点位置集合 */
9
10
  points: THREE.Vector3[];
10
11
  getTypeName(): string;
11
12
  worldDraw(pWorldDraw: McGiWorldDraw): void;
@@ -14,8 +15,14 @@ export default class MxDbPolyline extends MxDbEntity {
14
15
  create(): MxDbEntity;
15
16
  dwgIn(obj: any): boolean;
16
17
  dwgOut(obj: any): object;
18
+ /** 添加顶点位置 */
17
19
  addVertexAt(pt: THREE.Vector3): void;
20
+ /** 顶点数量 */
18
21
  numVerts(): number;
19
22
  getPointAt(index: number): THREE.Vector3 | null;
23
+ /** 设置顶点
24
+ * @param index 替换的顶点在当前points集合的下标位置
25
+ * @param pt 要替换设置的顶点
26
+ * */
20
27
  setPointAt(index: number, pt: THREE.Vector3): boolean;
21
28
  }
@@ -46,8 +46,14 @@ export default class MxDbRect extends MxDbEntity {
46
46
  * */
47
47
  setRadius(radius: number | number[], isScreenCoord?: boolean): void;
48
48
  getTypeName(): string;
49
+ /** 获取当前滤镜对象 {@link MxFilters} */
49
50
  getFilter(): MxFilters | undefined | null;
51
+ /** 设置当前滤镜对象
52
+ * @param filter {@link MxFilters}
53
+ * */
50
54
  setFilter(filter: MxFilters | undefined | null): void;
55
+ /** 设置填充的背景图片路径 */
51
56
  setFillImagePath(sPath: string | undefined): void;
57
+ /** 获取填充的背景图片路径 */
52
58
  getFillImagePath(): string | undefined;
53
59
  }
@@ -2,12 +2,21 @@
2
2
  import * as THREE from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  import MxDbEntity from '../MxDbEntity';
5
+ /**
6
+ * MxDbRectBoxLeadComment 引线审图标注
7
+ * */
5
8
  export default class MxDbRectBoxLeadComment extends MxDbEntity {
9
+ /** 云线矩形的对角点1 */
6
10
  point1: THREE.Vector3;
11
+ /** 云线矩形的对角点2 */
7
12
  point2: THREE.Vector3;
13
+ /** 要标注的内容位置 */
8
14
  point3: THREE.Vector3;
15
+ /** 要显示的文字内容*/
9
16
  text: string;
17
+ /**文字高度*/
10
18
  textHeight: number;
19
+ /** 云线的半圆弧半径 */
11
20
  radius: number;
12
21
  getTypeName(): string;
13
22
  create(): MxDbEntity;
@@ -2,11 +2,14 @@ import MxDbEntity from '../MxDbEntity';
2
2
  import { Vector3 } from 'three';
3
3
  import McGiWorldDraw from '../McGiWorldDraw';
4
4
  /**
5
- * MxDbRegularPolygon
5
+ * MxDbRegularPolygon 正多边形
6
6
  */
7
7
  export default class MxDbRegularPolygon extends MxDbEntity {
8
+ /** 正多边形的中心点位置 */
8
9
  centerPoint: Vector3;
10
+ /** 正多边形两条边之间的交点位置 */
9
11
  otherPoint: Vector3;
12
+ /** 正多边形边的数量 */
10
13
  sidesNumber: number;
11
14
  getTypeName(): string;
12
15
  worldDraw(pWorldDraw: McGiWorldDraw): void;