mxdraw 0.1.31 → 0.1.32
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/lib/MxModule/MxDbArea/MxDbArea.js +1 -1
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
- package/dist/lib/MxModule/MxDbHatch/MxDbHatch.js +1 -0
- package/dist/lib/MxModule/MxDbHatch/index.js +1 -0
- package/dist/lib/MxModule/MxType/MxType.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/lib/doc.js +1 -1
- package/dist/lib/mxdraw.js +1 -1
- package/dist/lib/tools/dynamicImport/index.js +1 -1
- package/dist/lib/tools/three/index.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/McGeTool/McGeTool.d.ts +1 -0
- package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +41 -0
- package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +4 -0
- package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +44 -0
- package/dist/types/MxModule/MxDbHatch/MxDbHatch.d.ts +16 -0
- package/dist/types/MxModule/MxDbHatch/index.d.ts +3 -0
- package/dist/types/MxModule/MxType/MxType.d.ts +14 -6
- package/dist/types/doc.d.ts +3 -2
- package/dist/types/mxdraw.d.ts +5 -2
- package/dist/types/tools/three/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @module McGiWorldDraw*/
|
|
2
2
|
import McGiWorldDrawType from '../McGiWorldDrawType';
|
|
3
|
+
import MxDbEntity from '../MxDbEntity';
|
|
3
4
|
import MxDrawObject from '../MxDrawObject';
|
|
4
5
|
/**
|
|
5
6
|
* McGiWorldDraw 用于构建一个动态绘制回调对象的规范接口
|
|
@@ -220,4 +221,44 @@ export default interface McGiWorldDraw {
|
|
|
220
221
|
*
|
|
221
222
|
*/
|
|
222
223
|
drawSelectLine(pt1: THREE.Vector3 | number, pt2: THREE.Vector3 | number, x2?: number, y2?: number): void;
|
|
224
|
+
/**
|
|
225
|
+
*设置透明度
|
|
226
|
+
* @returns
|
|
227
|
+
* @example
|
|
228
|
+
* ``` typescript
|
|
229
|
+
*
|
|
230
|
+
* ```
|
|
231
|
+
*
|
|
232
|
+
*/
|
|
233
|
+
setOpacity(opacity: number): void;
|
|
234
|
+
/**
|
|
235
|
+
*返回透明度
|
|
236
|
+
* @returns
|
|
237
|
+
* @example
|
|
238
|
+
* ``` typescript
|
|
239
|
+
*
|
|
240
|
+
* ```
|
|
241
|
+
*
|
|
242
|
+
*/
|
|
243
|
+
getOpacity(): number;
|
|
244
|
+
/**
|
|
245
|
+
*绘制纯色填充
|
|
246
|
+
* @returns
|
|
247
|
+
* @example
|
|
248
|
+
* ``` typescript
|
|
249
|
+
*
|
|
250
|
+
* ```
|
|
251
|
+
*
|
|
252
|
+
*/
|
|
253
|
+
drawSolid(points: THREE.Vector3[]): void;
|
|
254
|
+
/**
|
|
255
|
+
*把一个对象的绘图属性设置到当前绘图上下文
|
|
256
|
+
* @returns
|
|
257
|
+
* @example
|
|
258
|
+
* ``` typescript
|
|
259
|
+
*
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
*/
|
|
263
|
+
setupForEntity(ent: MxDbEntity): void;
|
|
223
264
|
}
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
import * as THREE from 'three';
|
|
3
3
|
import McGiWorldDraw from '../McGiWorldDraw';
|
|
4
4
|
import MxDbEntity from '../MxDbEntity';
|
|
5
|
+
import { MxColorType } from '../MxType/MxType';
|
|
5
6
|
/**
|
|
6
7
|
* MxDbArea 任意不规则多边形
|
|
7
8
|
* */
|
|
8
9
|
export default class MxDbArea extends MxDbEntity {
|
|
9
10
|
/** 构成多边形的顶点集合 */
|
|
10
11
|
points: Array<THREE.Vector3>;
|
|
12
|
+
isFill: boolean;
|
|
13
|
+
fillColor: MxColorType;
|
|
14
|
+
fillOpacity: number;
|
|
11
15
|
getTypeName(): string;
|
|
12
16
|
create(): MxDbEntity;
|
|
13
17
|
/** 在worldDraw动态绘制时会计算当前顶点坐标集合的面积,并显示渲染计算后的计算结果
|
|
@@ -44,6 +44,10 @@ export default abstract class MxDbEntity {
|
|
|
44
44
|
userData: {
|
|
45
45
|
[key: string]: any;
|
|
46
46
|
};
|
|
47
|
+
private dLineWidth;
|
|
48
|
+
private lineWidthByPixels;
|
|
49
|
+
private dDashArray;
|
|
50
|
+
private dDashRatio;
|
|
47
51
|
/**
|
|
48
52
|
* 自定义对象的绘制函数。在方法中定义如何绘制图形
|
|
49
53
|
* @param pWorldDraw 绘制对象{@link McGiWorldDraw }
|
|
@@ -209,4 +213,44 @@ export default abstract class MxDbEntity {
|
|
|
209
213
|
* @returns number
|
|
210
214
|
*/
|
|
211
215
|
getRenderOrder(): number;
|
|
216
|
+
/**
|
|
217
|
+
* 设置虚线数据
|
|
218
|
+
* @returns number
|
|
219
|
+
*/
|
|
220
|
+
setDash(dDashArray: number, dDashRatio: number): void;
|
|
221
|
+
/**
|
|
222
|
+
* 得到虚线数据
|
|
223
|
+
* @returns number
|
|
224
|
+
*/
|
|
225
|
+
getDash(): any;
|
|
226
|
+
/**
|
|
227
|
+
* 设置虚线显示。并初始化一个默认值。
|
|
228
|
+
* @returns number
|
|
229
|
+
*/
|
|
230
|
+
setDashLineDisplay(isDashLine: boolean): void;
|
|
231
|
+
/**
|
|
232
|
+
* 是否虚线显示
|
|
233
|
+
* @returns number
|
|
234
|
+
*/
|
|
235
|
+
isDashLineDisplay(): boolean;
|
|
236
|
+
/**
|
|
237
|
+
* 设置线宽是否随像素
|
|
238
|
+
* @returns number
|
|
239
|
+
*/
|
|
240
|
+
setLineWidthByPixels(isPixels: boolean): void;
|
|
241
|
+
/**
|
|
242
|
+
* 线宽是否随像素
|
|
243
|
+
* @returns number
|
|
244
|
+
*/
|
|
245
|
+
getLineWidthByPixels(): boolean;
|
|
246
|
+
/**
|
|
247
|
+
* 设置线宽
|
|
248
|
+
* @returns number
|
|
249
|
+
*/
|
|
250
|
+
setLineWidth(dLineWidth: number): void;
|
|
251
|
+
/**
|
|
252
|
+
* 得到线宽
|
|
253
|
+
* @returns number
|
|
254
|
+
*/
|
|
255
|
+
getLineWidth(): number;
|
|
212
256
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import McGiWorldDraw from '../McGiWorldDraw';
|
|
3
|
+
import MxDbEntity from '../MxDbEntity';
|
|
4
|
+
/**
|
|
5
|
+
* MxDbHatch 填充对象
|
|
6
|
+
*/
|
|
7
|
+
export default class MxDbHatch extends MxDbEntity {
|
|
8
|
+
points: THREE.Vector3[];
|
|
9
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
10
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
11
|
+
/** 设置顶点坐标 */
|
|
12
|
+
setPoints(points: THREE.Vector3[]): void;
|
|
13
|
+
getGripPoints(): THREE.Vector3[];
|
|
14
|
+
dwgIn(obj: any): boolean;
|
|
15
|
+
dwgOut(obj: any): any;
|
|
16
|
+
}
|
|
@@ -11,14 +11,22 @@ declare enum MxCloneType {
|
|
|
11
11
|
/** 动态拖动Clone */
|
|
12
12
|
kDragClone = 2
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* 控件对象缺省的绘制顺序
|
|
16
|
+
* @example ```typescript
|
|
17
|
+
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare enum MxDefaultRenderOrder {
|
|
21
|
+
kCADMeshRenderOrder = 10,
|
|
22
|
+
kCADCurveRenderOrder = 20,
|
|
23
|
+
kMxEntityRenderOrder = 30,
|
|
24
|
+
kGripRenderOrder = 110,
|
|
25
|
+
kDynJigRenderOrder = 120
|
|
19
26
|
}
|
|
20
27
|
declare const _default: {
|
|
21
28
|
MxCloneType: typeof MxCloneType;
|
|
22
|
-
|
|
29
|
+
MxDefaultRenderOrder: typeof MxDefaultRenderOrder;
|
|
23
30
|
};
|
|
24
31
|
export default _default;
|
|
32
|
+
export declare type MxColorType = number | string | THREE.Color;
|
package/dist/types/doc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import loadCoreCode from './MxModule/loadCoreCode';
|
|
2
2
|
import store from './MxModule/store';
|
|
3
|
-
import MxFun from './MxModule/MxFun';
|
|
3
|
+
import MxFun from './MxModule/MxFun/MxFun';
|
|
4
4
|
import MxThreeJS from './MxModule/MxThreeJS';
|
|
5
5
|
import MrxDbgUiPrPoint from './MxModule/MrxDbgUiPrPoint';
|
|
6
6
|
import McEdGetPointWorldDrawObject from './MxModule/McEdGetPointWorldDrawObject';
|
|
@@ -33,4 +33,5 @@ import MxDbLeadComment from './MxModule/MxDbLeadComment';
|
|
|
33
33
|
import MxDbRectBoxLeadComment from './MxModule/MxDbRectBoxLeadComment';
|
|
34
34
|
import MxDbEllipse from './MxModule/MxDbEllipse';
|
|
35
35
|
import MxDbText from './MxModule/MxDbText';
|
|
36
|
-
|
|
36
|
+
import MxDrawObject from './MxModule/MxDrawObject';
|
|
37
|
+
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 };
|
package/dist/types/mxdraw.d.ts
CHANGED
|
@@ -33,12 +33,14 @@ import MxDbLeadComment from './MxModule/MxDbLeadComment';
|
|
|
33
33
|
import MxDbRectBoxLeadComment from './MxModule/MxDbRectBoxLeadComment';
|
|
34
34
|
import MxDbEllipse from './MxModule/MxDbEllipse';
|
|
35
35
|
import MxDbText from './MxModule/MxDbText';
|
|
36
|
-
|
|
36
|
+
import MxDrawObject from './MxModule/MxDrawObject';
|
|
37
|
+
import MxDbHatch from './MxModule/MxDbHatch';
|
|
38
|
+
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, MxDbAnyLine, MxDbCloudLine, MxDbLeadComment, MxDbRectBoxLeadComment, MxDbEllipse, MxDbText, MxDbRegularPolygon };
|
|
37
39
|
declare const _default: {
|
|
38
40
|
MxFun: import("./doc").MxFun;
|
|
39
41
|
Mxassembly: import("./MxModule/Mxassembly/Mxassembly").default;
|
|
40
42
|
McGeTool: import("./MxModule/McGeTool/McGeTool").default;
|
|
41
|
-
MxThreeJS: import("./
|
|
43
|
+
MxThreeJS: import("./MxModule/MxThreeJS/MxThreeJS").default;
|
|
42
44
|
McEdGetPointWorldDrawObject: typeof McEdGetPointWorldDrawObject;
|
|
43
45
|
MrxDbgUiPrPoint: typeof MrxDbgUiPrPoint;
|
|
44
46
|
MxDbEntity: typeof MxDbEntity;
|
|
@@ -50,6 +52,7 @@ declare const _default: {
|
|
|
50
52
|
MxDbPolyline: typeof MxDbPolyline;
|
|
51
53
|
Mx3PointArc: typeof Mx3PointArc;
|
|
52
54
|
MxDbCoord: typeof MxDbCoord;
|
|
55
|
+
MxDbHatch: typeof MxDbHatch;
|
|
53
56
|
MxDb2LineAngularDimension: typeof MxDb2LineAngularDimension;
|
|
54
57
|
MxDbRect: typeof MxDbRect;
|
|
55
58
|
MxDbAlignedDimension: typeof MxDbAlignedDimension;
|
|
@@ -66,3 +66,8 @@ export declare function computeRegularPolygonVertices(centerPt?: Vector3, pt?: V
|
|
|
66
66
|
* @param segments 边数
|
|
67
67
|
* */
|
|
68
68
|
export declare function createThreeRegularPolygon(centerPt: Vector3, pt: Vector3, segments: number, color: number | string | THREE.Color): LineLoop;
|
|
69
|
+
export declare function computeBounding(points: Vector3[]): {
|
|
70
|
+
centerPoint: Vector3;
|
|
71
|
+
minPoint: Vector3;
|
|
72
|
+
maxPoint: Vector3;
|
|
73
|
+
};
|