mxdraw 0.1.104 → 0.1.106
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/index.d.ts +3802 -0
- package/dist/{types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts → lib/MxModule/McEdGetPointWorldDrawObject/index.d.ts} +0 -0
- package/dist/lib/MxModule/McEdGetPointWorldDrawObject/index.js +1 -1
- package/dist/{types/MxModule/McGePoint3d/McGePoint3d.d.ts → lib/MxModule/McGePoint3d/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGePoint3d/index.js +1 -1
- package/dist/{types/MxModule/McGePoint3dArray/McGePoint3dArray.d.ts → lib/MxModule/McGePoint3dArray/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGePoint3dArray/index.js +1 -1
- package/dist/{types/MxModule/McGeTool/McGeTool.d.ts → lib/MxModule/McGeTool/index.d.ts} +3 -2
- package/dist/lib/MxModule/McGeTool/index.js +1 -1
- package/dist/{types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts → lib/MxModule/McGiWorldDraw/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGiWorldDraw/index.js +1 -1
- package/dist/{types/MxModule/McGiWorldDrawType/McGiWorldDrawType.d.ts → lib/MxModule/McGiWorldDrawType/index.d.ts} +0 -0
- package/dist/lib/MxModule/McGiWorldDrawType/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.d.ts → lib/MxModule/MrxDbgUiPrBaseReturn/index.d.ts} +0 -0
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts → lib/MxModule/MrxDbgUiPrPoint/index.d.ts} +2 -1
- package/dist/lib/MxModule/MrxDbgUiPrPoint/index.js +1 -1
- package/dist/{types/MxModule/MrxDbgUtils/MrxDbgUtils.d.ts → lib/MxModule/MrxDbgUtils/index.d.ts} +3 -2
- package/dist/lib/MxModule/MrxDbgUtils/index.js +1 -1
- package/dist/{types/MxModule/Mx3PointArc/Mx3PointArc.d.ts → lib/MxModule/Mx3PointArc/index.d.ts} +5 -6
- package/dist/lib/MxModule/Mx3PointArc/index.js +1 -1
- package/dist/{types/MxModule/MxCADObject/MxCADObject.d.ts → lib/MxModule/MxCADObject/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxCADObject/index.js +1 -1
- package/dist/{types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts → lib/MxModule/MxDb2LineAngularDimension/index.d.ts} +2 -4
- package/dist/lib/MxModule/MxDb2LineAngularDimension/index.js +1 -1
- package/dist/{types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts → lib/MxModule/MxDbAlignedDimension/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbAlignedDimension/index.js +1 -1
- package/dist/{types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts → lib/MxModule/MxDbAnyLine/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbAnyLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbArea/MxDbArea.d.ts → lib/MxModule/MxDbArea/index.d.ts} +1 -3
- package/dist/lib/MxModule/MxDbArea/index.js +1 -1
- package/dist/{types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts → lib/MxModule/MxDbCloudLine/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbCloudLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbCoord/MxDbCoord.d.ts → lib/MxModule/MxDbCoord/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbCoord/index.js +1 -1
- package/dist/{types/MxModule/MxDbDatabase/MxDbDatabase.d.ts → lib/MxModule/MxDbDatabase/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbDatabase/index.js +1 -1
- package/dist/{types/MxModule/MxDbEllipse/MxDbEllipse.d.ts → lib/MxModule/MxDbEllipse/index.d.ts} +4 -5
- package/dist/lib/MxModule/MxDbEllipse/index.js +1 -1
- package/dist/{types/MxModule/MxDbEntity/MxDbEntity.d.ts → lib/MxModule/MxDbEntity/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbEntity/index.js +1 -1
- package/dist/{types/MxModule/MxDbGroup/MxDbGroup.d.ts → lib/MxModule/MxDbGroup/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbGroup/index.js +1 -1
- package/dist/{types/MxModule/MxDbHatch/MxDbHatch.d.ts → lib/MxModule/MxDbHatch/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbHatch/index.js +1 -1
- package/dist/{types/MxModule/MxDbImage/MxDbImage.d.ts → lib/MxModule/MxDbImage/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbImage/index.js +1 -1
- package/dist/{types/MxModule/MxDbLayerTableRecord/MxDbLayerTableRecord.d.ts → lib/MxModule/MxDbLayerTableRecord/index.d.ts} +0 -0
- package/dist/lib/MxModule/MxDbLayerTableRecord/index.js +1 -1
- package/dist/lib/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +28 -0
- package/dist/lib/MxModule/MxDbLeadComment/MxDbLeadComment.js +1 -1
- package/dist/{types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts → lib/MxModule/MxDbLeadComment/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbLeadComment/index.js +1 -1
- package/dist/{types/MxModule/MxDbLeadTag/MxDbLeadTag.d.ts → lib/MxModule/MxDbLeadTag/index.d.ts} +1 -2
- package/dist/lib/MxModule/MxDbLeadTag/index.js +1 -1
- package/dist/{types/MxModule/MxDbLine/MxDbLine.d.ts → lib/MxModule/MxDbLine/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbLine/index.js +1 -1
- package/dist/{types/MxModule/MxDbPolyline/MxDbPolyline.d.ts → lib/MxModule/MxDbPolyline/index.d.ts} +0 -1
- package/dist/lib/MxModule/MxDbPolyline/index.js +1 -1
- package/dist/{types/MxModule/MxDbRect/MxDbRect.d.ts → lib/MxModule/MxDbRect/index.d.ts} +5 -6
- package/dist/lib/MxModule/MxDbRect/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +1 -2
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -1
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.d.ts +26 -0
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +4 -5
- package/dist/lib/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.js +1 -1
- package/dist/lib/MxModule/MxDbRegularPolygon/index.d.ts +20 -0
- package/dist/lib/MxModule/MxDbRegularPolygon/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbSVG/MxDbSVG.d.ts +0 -1
- package/dist/lib/MxModule/MxDbSVG/MxDbSVG.js +1 -1
- package/dist/lib/MxModule/MxDbSVG/index.d.ts +92 -0
- package/dist/lib/MxModule/MxDbSVG/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDbSVGText/MxDbSVGText.d.ts +0 -1
- package/dist/lib/MxModule/MxDbSVGText/MxDbSVGText.js +1 -1
- package/dist/lib/MxModule/MxDbSVGText/index.d.ts +18 -0
- package/dist/lib/MxModule/MxDbSVGText/index.js +1 -1
- package/dist/{types/MxModule/MxDbText/MxDbText.d.ts → lib/MxModule/MxDbText/index.d.ts} +3 -4
- package/dist/lib/MxModule/MxDbText/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxDrawObject/MxDrawObject.d.ts +0 -0
- package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +1 -1
- package/dist/lib/MxModule/MxDrawObject/index.d.ts +822 -0
- package/dist/lib/MxModule/MxDrawObject/index.js +1 -1
- package/dist/{types/MxModule/MxFilters/MxFilters.d.ts → lib/MxModule/MxFilters/index.d.ts} +3 -4
- package/dist/lib/MxModule/MxFilters/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxFun/MxFun.d.ts +3 -3
- package/dist/lib/MxModule/MxFun/MxFun.js +1 -1
- package/dist/lib/MxModule/MxFun/index.d.ts +592 -0
- package/dist/lib/MxModule/MxFun/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxThreeJS/MxThreeJS.d.ts +10 -11
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -1
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.d.ts +2 -0
- package/dist/lib/MxModule/MxThreeJS/MxThreeJS.mixin.js +1 -1
- package/dist/lib/MxModule/MxThreeJS/index.d.ts +3 -0
- package/dist/lib/MxModule/MxThreeJS/index.js +1 -1
- package/dist/{types → lib}/MxModule/MxType/MxType.d.ts +0 -0
- package/dist/lib/MxModule/MxType/MxType.js +1 -1
- package/dist/lib/MxModule/MxType/index.d.ts +44 -0
- package/dist/lib/MxModule/MxType/index.js +1 -1
- package/dist/{types/MxModule/Mxassembly/Mxassembly.d.ts → lib/MxModule/Mxassembly/index.d.ts} +9 -7
- package/dist/lib/MxModule/Mxassembly/index.js +1 -1
- package/dist/{types/MxModule/loadCoreCode/loadCoreCode.d.ts → lib/MxModule/loadCoreCode/index.d.ts} +0 -0
- package/dist/lib/MxModule/loadCoreCode/index.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxUiData.d.ts +2 -2
- package/dist/lib/MxModule/loadCoreCode/mxUiData.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxcadassembly_es5.d.ts +0 -0
- package/dist/lib/MxModule/loadCoreCode/mxcadassembly_es5.js +1 -1
- package/dist/{types → lib}/MxModule/loadCoreCode/mxfun.es5.d.ts +0 -0
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/{types → lib}/MxModule/store/PubsubClass.d.ts +0 -0
- package/dist/lib/MxModule/store/PubsubClass.js +1 -1
- package/dist/{types → lib}/MxModule/store/StoreClass.d.ts +1 -1
- package/dist/lib/MxModule/store/StoreClass.js +1 -1
- package/dist/{types → lib}/MxModule/store/index.d.ts +0 -0
- package/dist/lib/MxModule/store/index.js +1 -1
- package/dist/{types → lib}/MxModule/store/store.d.ts +4 -4
- package/dist/lib/MxModule/store/store.js +1 -1
- package/dist/{types/MxModule/useCanvasResizeListener/useCanvasResizeListener.d.ts → lib/MxModule/useCanvasResizeListener/index.d.ts} +2 -2
- package/dist/lib/MxModule/useCanvasResizeListener/index.js +1 -1
- package/dist/{types → lib}/doc.d.ts +1 -1
- package/dist/lib/doc.js +1 -1
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/mxdraw.d.ts +43 -0
- package/dist/lib/mxdraw.js +1 -1
- package/dist/{types → lib}/tools/algorithm/math.d.ts +0 -0
- package/dist/lib/tools/algorithm/math.js +1 -1
- package/dist/{types → lib}/tools/algorithm/random.d.ts +0 -0
- package/dist/lib/tools/algorithm/random.js +1 -1
- package/dist/{types → lib}/tools/dom/create.d.ts +0 -0
- package/dist/lib/tools/dom/create.js +1 -1
- package/dist/{types → lib}/tools/dynamicImport/index.d.ts +0 -0
- package/dist/lib/tools/dynamicImport/index.js +1 -1
- package/dist/{types → lib}/tools/formatting/index.d.ts +0 -0
- package/dist/lib/tools/formatting/index.js +1 -1
- package/dist/{types → lib}/tools/proxy/index.d.ts +0 -0
- package/dist/lib/tools/proxy/index.js +1 -1
- package/dist/{types → lib}/tools/three/index.d.ts +14 -15
- package/dist/lib/tools/three/index.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/package.json +16 -10
- package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js +0 -1
- package/dist/lib/MxModule/McGePoint3d/McGePoint3d.js +0 -1
- package/dist/lib/MxModule/McGePoint3dArray/McGePoint3dArray.js +0 -1
- package/dist/lib/MxModule/McGeTool/McGeTool.js +0 -1
- package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +0 -1
- package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js +0 -1
- package/dist/lib/MxModule/MrxDbgUiPrBaseReturn/MrxDbgUiPrBaseReturn.js +0 -1
- package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +0 -1
- package/dist/lib/MxModule/MrxDbgUtils/MrxDbgUtils.js +0 -1
- package/dist/lib/MxModule/Mx3PointArc/Mx3PointArc.js +0 -1
- package/dist/lib/MxModule/MxCADObject/MxCADObject.js +0 -1
- package/dist/lib/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.js +0 -1
- package/dist/lib/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.js +0 -1
- package/dist/lib/MxModule/MxDbAnyLine/MxDbAnyLine.js +0 -1
- package/dist/lib/MxModule/MxDbArea/MxDbArea.js +0 -1
- package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +0 -1
- package/dist/lib/MxModule/MxDbCoord/MxDbCoord.js +0 -1
- package/dist/lib/MxModule/MxDbDatabase/MxDbDatabase.js +0 -1
- package/dist/lib/MxModule/MxDbEllipse/MxDbEllipse.js +0 -1
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +0 -1
- package/dist/lib/MxModule/MxDbGroup/MxDbGroup.js +0 -1
- package/dist/lib/MxModule/MxDbHatch/MxDbHatch.js +0 -1
- package/dist/lib/MxModule/MxDbImage/MxDbImage.js +0 -1
- package/dist/lib/MxModule/MxDbLayerTableRecord/MxDbLayerTableRecord.js +0 -1
- package/dist/lib/MxModule/MxDbLeadTag/MxDbLeadTag.js +0 -1
- package/dist/lib/MxModule/MxDbLine/MxDbLine.js +0 -1
- package/dist/lib/MxModule/MxDbPolyline/MxDbPolyline.js +0 -1
- package/dist/lib/MxModule/MxDbRect/MxDbRect.js +0 -1
- package/dist/lib/MxModule/MxDbText/MxDbText.js +0 -1
- package/dist/lib/MxModule/MxFilters/MxFilters.js +0 -1
- package/dist/lib/MxModule/Mxassembly/Mxassembly.js +0 -1
- package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +0 -1
- package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +0 -1
- package/dist/mxdraw.es5.js +0 -1
- package/dist/types/MxModule/McEdGetPointWorldDrawObject/index.d.ts +0 -3
- package/dist/types/MxModule/McGePoint3d/index.d.ts +0 -3
- package/dist/types/MxModule/McGePoint3dArray/index.d.ts +0 -3
- package/dist/types/MxModule/McGeTool/index.d.ts +0 -4
- package/dist/types/MxModule/McGiWorldDraw/index.d.ts +0 -2
- package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +0 -2
- package/dist/types/MxModule/MrxDbgUiPrBaseReturn/index.d.ts +0 -3
- package/dist/types/MxModule/MrxDbgUiPrPoint/index.d.ts +0 -3
- package/dist/types/MxModule/MrxDbgUtils/index.d.ts +0 -4
- package/dist/types/MxModule/Mx3PointArc/index.d.ts +0 -3
- package/dist/types/MxModule/MxCADObject/index.d.ts +0 -3
- package/dist/types/MxModule/MxDb2LineAngularDimension/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbAlignedDimension/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbAnyLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbArea/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbCloudLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbCoord/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbDatabase/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbEllipse/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbEntity/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbGroup/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbHatch/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbImage/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLayerTableRecord/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLeadComment/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLeadTag/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbLine/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbPolyline/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbRect/index.d.ts +0 -2
- package/dist/types/MxModule/MxDbRectBoxLeadComment/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbRegularPolygon/index.d.ts +0 -2
- package/dist/types/MxModule/MxDbSVG/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbSVGText/index.d.ts +0 -3
- package/dist/types/MxModule/MxDbText/index.d.ts +0 -3
- package/dist/types/MxModule/MxDrawObject/index.d.ts +0 -3
- package/dist/types/MxModule/MxFilters/index.d.ts +0 -2
- package/dist/types/MxModule/MxFun/index.d.ts +0 -3
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.mixin.d.ts +0 -2
- package/dist/types/MxModule/MxThreeJS/index.d.ts +0 -3
- package/dist/types/MxModule/MxType/index.d.ts +0 -2
- package/dist/types/MxModule/Mxassembly/index.d.ts +0 -3
- package/dist/types/MxModule/loadCoreCode/index.d.ts +0 -3
- package/dist/types/MxModule/useCanvasResizeListener/index.d.ts +0 -3
- package/dist/types/mxdraw.d.ts +0 -86
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3802 @@
|
|
|
1
|
+
import * as three from 'three';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 加载MxDraw库的核心代码 才能使用Mx的其他模块
|
|
5
|
+
* @returns Promise<{@link MxFun}>
|
|
6
|
+
* @example
|
|
7
|
+
* ```
|
|
8
|
+
* Mx.loadCoreCode().then(()=> console.log("加载完成", Mx.MxFun))
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
declare function loadCoreCode(): Promise<void>;
|
|
12
|
+
|
|
13
|
+
/** @module MxCADObject */
|
|
14
|
+
interface MxCADLayerTableRecord {
|
|
15
|
+
id: number;
|
|
16
|
+
name: string;
|
|
17
|
+
color: number;
|
|
18
|
+
off: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* MxCAD 对象,用来实现在线编辑功能
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
declare class MxCADObject {
|
|
25
|
+
private _mxCAD;
|
|
26
|
+
constructor(mxCAD: any);
|
|
27
|
+
/**
|
|
28
|
+
* 新建一个图纸
|
|
29
|
+
* @example
|
|
30
|
+
* ```typescript
|
|
31
|
+
*
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
newFile(): void;
|
|
35
|
+
/** 撤销操作 */
|
|
36
|
+
undo(): void;
|
|
37
|
+
/**
|
|
38
|
+
* 打开个CAD文件
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
*
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
openFile(file: string, retfun?: (ret: Object) => void): void;
|
|
45
|
+
/**
|
|
46
|
+
* 保存CAD文件
|
|
47
|
+
* 文件保存路径,在bin/release/ini.json, 中server.savepath设置。默认保存到,bin/release/public/save目录下。
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
*
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
saveFile(file: string, retfun: (ret: Object) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* 从服务器上得到显示数据
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
*
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
getDisplayFromServer(): void;
|
|
62
|
+
/**
|
|
63
|
+
* 获取打开的文件名称
|
|
64
|
+
* @param file 文件路径
|
|
65
|
+
* @param retfun 保存文件后的回调函数
|
|
66
|
+
*
|
|
67
|
+
* */
|
|
68
|
+
getFileName(): string;
|
|
69
|
+
/**
|
|
70
|
+
* 获取全部图层数据
|
|
71
|
+
* @retruns 全部图层数据
|
|
72
|
+
*
|
|
73
|
+
* */
|
|
74
|
+
getAllLayerData(): MxCADLayerTableRecord[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** @module McGiWorldDrawType*/
|
|
78
|
+
/**
|
|
79
|
+
* 动态绘制类型
|
|
80
|
+
* @example ```typescript
|
|
81
|
+
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
declare enum McGiWorldDrawType {
|
|
85
|
+
/** 正常绘制 */
|
|
86
|
+
kWorldDraw = 1,
|
|
87
|
+
/** 动态拖动的绘制 */
|
|
88
|
+
kDynDragDraw = 2,
|
|
89
|
+
/** 对选择高亮的绘制 */
|
|
90
|
+
kSelectDraw = 3
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @module McGiWorldDraw*/
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* McGiWorldDraw 用于构建一个动态绘制回调对象的规范接口
|
|
97
|
+
* @abstract 是 {@link MxDbEntity.worldDraw }必须实现的抽象回调方法中的回调对象 通过回调对象完成一些动态绘制任务
|
|
98
|
+
* @example ```typescript
|
|
99
|
+
*
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
interface McGiWorldDraw {
|
|
103
|
+
/**
|
|
104
|
+
* 得到WorldDraw的绘制类型.
|
|
105
|
+
* @returns McGiWorldDrawType
|
|
106
|
+
* @example
|
|
107
|
+
* ``` typescript
|
|
108
|
+
*
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
*/
|
|
112
|
+
getType(): McGiWorldDrawType;
|
|
113
|
+
/**
|
|
114
|
+
* 绘制一个Three.js对象
|
|
115
|
+
* @param ent Three.js对象
|
|
116
|
+
* @returns void
|
|
117
|
+
* @example
|
|
118
|
+
* ``` typescript
|
|
119
|
+
*
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
drawEntity(ent: THREE.Object3D): void;
|
|
124
|
+
/**
|
|
125
|
+
* 返回动态绘制的控件对像
|
|
126
|
+
* @returns MxDrawObject
|
|
127
|
+
* @example
|
|
128
|
+
* ``` typescript
|
|
129
|
+
*
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
getMxObject(): MxDrawObject;
|
|
134
|
+
/**
|
|
135
|
+
* 设置绘制颜色
|
|
136
|
+
* @param iColor 颜色值
|
|
137
|
+
* @returns
|
|
138
|
+
* @example
|
|
139
|
+
* ``` typescript
|
|
140
|
+
*
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
144
|
+
setColor(iColor: number | string | THREE.Color): void;
|
|
145
|
+
/**
|
|
146
|
+
* 返回绘制颜色
|
|
147
|
+
* @returns
|
|
148
|
+
* @example
|
|
149
|
+
* ``` typescript
|
|
150
|
+
*
|
|
151
|
+
* ```
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
getColor(): number;
|
|
155
|
+
/**
|
|
156
|
+
* 设置绘制的线宽
|
|
157
|
+
* @returns
|
|
158
|
+
* @example
|
|
159
|
+
* ``` typescript
|
|
160
|
+
*
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
*/
|
|
164
|
+
setLineWidth(iLineWidth: number): void;
|
|
165
|
+
/**
|
|
166
|
+
* 返回绘制的线宽
|
|
167
|
+
* @returns
|
|
168
|
+
* @example
|
|
169
|
+
* ``` typescript
|
|
170
|
+
*
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
*/
|
|
174
|
+
getLineWidth(): number;
|
|
175
|
+
/**
|
|
176
|
+
* 绘制直线
|
|
177
|
+
* @param pt1 第一个点 THREE.Vector3
|
|
178
|
+
* @param pt2 第二个点
|
|
179
|
+
* @returns
|
|
180
|
+
* @example
|
|
181
|
+
* ``` typescript
|
|
182
|
+
*
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
*/
|
|
186
|
+
drawLine(pt1: THREE.Vector3 | number, pt2: THREE.Vector3 | number, x2?: number, y2?: number): void;
|
|
187
|
+
/**
|
|
188
|
+
* 绘制连续的直线
|
|
189
|
+
* @param points 点数组
|
|
190
|
+
* @returns
|
|
191
|
+
* @example
|
|
192
|
+
* ``` typescript
|
|
193
|
+
*
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
drawLines(points: THREE.Vector3[]): void;
|
|
198
|
+
/**
|
|
199
|
+
* 根据几何数据绘制直线
|
|
200
|
+
* @param points 点数组
|
|
201
|
+
* @returns
|
|
202
|
+
* @example
|
|
203
|
+
* ``` typescript
|
|
204
|
+
*
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
drawGeometryLines(geometry: THREE.Geometry): void;
|
|
209
|
+
/**
|
|
210
|
+
* 绘制圆
|
|
211
|
+
* @param cen 圆的中心点 THREE.Vector3
|
|
212
|
+
* @param dRadius 圆的半径
|
|
213
|
+
* @returns
|
|
214
|
+
* @example
|
|
215
|
+
* ``` typescript
|
|
216
|
+
*
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
drawCircle(cen: THREE.Vector3, dRadius: number): void;
|
|
221
|
+
/**
|
|
222
|
+
* 绘文本
|
|
223
|
+
* @param sText 文本信息
|
|
224
|
+
* @param iSize 文字大小
|
|
225
|
+
* @param dAngle 角度
|
|
226
|
+
* @param pt 位置
|
|
227
|
+
* @returns
|
|
228
|
+
* @example
|
|
229
|
+
* ``` typescript
|
|
230
|
+
*
|
|
231
|
+
* ```
|
|
232
|
+
*
|
|
233
|
+
*/
|
|
234
|
+
drawText(sText: string, iSize: number, dAngle: number, pt: THREE.Vector3, width?: number): THREE.Sprite | null;
|
|
235
|
+
/**
|
|
236
|
+
* 设置DrawOrder,默认值为100.
|
|
237
|
+
* @returns
|
|
238
|
+
* @example
|
|
239
|
+
* ``` typescript
|
|
240
|
+
*
|
|
241
|
+
* ```
|
|
242
|
+
*
|
|
243
|
+
*/
|
|
244
|
+
setRenderOrder(iRenderOrder: number): void;
|
|
245
|
+
/**
|
|
246
|
+
* 得到DrawOrder
|
|
247
|
+
* @returns
|
|
248
|
+
* @example
|
|
249
|
+
* ``` typescript
|
|
250
|
+
*
|
|
251
|
+
* ```
|
|
252
|
+
*
|
|
253
|
+
*/
|
|
254
|
+
getRenderOrder(): number;
|
|
255
|
+
/**
|
|
256
|
+
* 设置宽度单位是屏幕像素,默认是屏幕像素,设置false,单位是Threejs坐标。
|
|
257
|
+
* @returns
|
|
258
|
+
* @example
|
|
259
|
+
* ``` typescript
|
|
260
|
+
*
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
setLineWidthIsPixels(isPixels: boolean): void;
|
|
265
|
+
/**
|
|
266
|
+
* 得到宽度单位
|
|
267
|
+
* @returns
|
|
268
|
+
* @example
|
|
269
|
+
* ``` typescript
|
|
270
|
+
*
|
|
271
|
+
* ```
|
|
272
|
+
*
|
|
273
|
+
*/
|
|
274
|
+
getLineWidthIsPixels(): boolean;
|
|
275
|
+
/**
|
|
276
|
+
* 设置虚线显示数据。
|
|
277
|
+
* @returns
|
|
278
|
+
* @example
|
|
279
|
+
* ``` typescript
|
|
280
|
+
*
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
*/
|
|
284
|
+
setDash(dDashArray: number, dDashRatio: number): void;
|
|
285
|
+
/**
|
|
286
|
+
* 得到虚线显示数据。
|
|
287
|
+
* @returns
|
|
288
|
+
* @example
|
|
289
|
+
* ``` typescript
|
|
290
|
+
*
|
|
291
|
+
* ```
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
getDash(): any;
|
|
295
|
+
/**
|
|
296
|
+
* 设置虚线显示
|
|
297
|
+
* @returns
|
|
298
|
+
* @example
|
|
299
|
+
* ``` typescript
|
|
300
|
+
*
|
|
301
|
+
* ```
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
setDashLineDisplay(isDashLine: boolean): void;
|
|
305
|
+
/**
|
|
306
|
+
*是否虚线显示
|
|
307
|
+
* @returns
|
|
308
|
+
* @example
|
|
309
|
+
* ``` typescript
|
|
310
|
+
*
|
|
311
|
+
* ```
|
|
312
|
+
*
|
|
313
|
+
*/
|
|
314
|
+
isDashLineDisplay(): boolean;
|
|
315
|
+
/**
|
|
316
|
+
*绘制选择线。
|
|
317
|
+
* @returns
|
|
318
|
+
* @example
|
|
319
|
+
* ``` typescript
|
|
320
|
+
*
|
|
321
|
+
* ```
|
|
322
|
+
*
|
|
323
|
+
*/
|
|
324
|
+
drawSelectLine(pt1: THREE.Vector3 | number, pt2: THREE.Vector3 | number, x2?: number, y2?: number): void;
|
|
325
|
+
/**
|
|
326
|
+
* 设置变换矩阵
|
|
327
|
+
* @param
|
|
328
|
+
*/
|
|
329
|
+
setMatrix(matrix: THREE.Matrix4 | null): void;
|
|
330
|
+
/**
|
|
331
|
+
* 返回变换矩阵
|
|
332
|
+
* @param
|
|
333
|
+
*/
|
|
334
|
+
getMatrix(): THREE.Matrix4 | null;
|
|
335
|
+
/**
|
|
336
|
+
*设置透明度
|
|
337
|
+
* @returns
|
|
338
|
+
* @example
|
|
339
|
+
* ``` typescript
|
|
340
|
+
*
|
|
341
|
+
* ```
|
|
342
|
+
*
|
|
343
|
+
*/
|
|
344
|
+
setOpacity(opacity: number): void;
|
|
345
|
+
/**
|
|
346
|
+
*返回透明度
|
|
347
|
+
* @returns
|
|
348
|
+
* @example
|
|
349
|
+
* ``` typescript
|
|
350
|
+
*
|
|
351
|
+
* ```
|
|
352
|
+
*
|
|
353
|
+
*/
|
|
354
|
+
getOpacity(): number;
|
|
355
|
+
/**
|
|
356
|
+
*绘制纯色填充
|
|
357
|
+
* @returns
|
|
358
|
+
* @example
|
|
359
|
+
* ``` typescript
|
|
360
|
+
*
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
*/
|
|
364
|
+
drawSolid(points: THREE.Vector3[]): void;
|
|
365
|
+
/**
|
|
366
|
+
*把一个对象的绘图属性设置到当前绘图上下文
|
|
367
|
+
* @returns
|
|
368
|
+
* @example
|
|
369
|
+
* ``` typescript
|
|
370
|
+
*
|
|
371
|
+
* ```
|
|
372
|
+
*
|
|
373
|
+
*/
|
|
374
|
+
setupForEntity(ent: MxDbEntity): void;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/** @module MxDbEntity*/
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* MxDbEntity 用于构建一个自定义对象的抽象类(该类无法实例化 请通过继承的方式对其抽象方法进行实现)
|
|
381
|
+
* @description MxDbEntity 属于 abstract class(抽象类) 主要用途是通过继承这个类实现一个用于动态绘制的图形对象
|
|
382
|
+
* 继承实现这个类必须实现的抽象方法:(方法名称前有'Abstract'标签就是必须实现的方法)
|
|
383
|
+
* @example ```typescript
|
|
384
|
+
* import THREE from "three"
|
|
385
|
+
* import { McGiWorldDraw, MxDbEntity } from "mxdraw"
|
|
386
|
+
* class MxLineEntity extends MxDbEntity {
|
|
387
|
+
* constructor() {
|
|
388
|
+
* super(); // 在派生类的构造函数中必须调用 super()
|
|
389
|
+
* }
|
|
390
|
+
* private pt1: THREE.Vector3 = new THREE.Vector3();
|
|
391
|
+
* private pt2: THREE.Vector3 = new THREE.Vector3();
|
|
392
|
+
* worldDraw(pWorldDraw: McGiWorldDraw) {
|
|
393
|
+
* pWorldDraw.drawLine(this.pt1,this.pt2);
|
|
394
|
+
* }
|
|
395
|
+
* ...
|
|
396
|
+
* }
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
declare abstract class MxDbEntity {
|
|
400
|
+
/**
|
|
401
|
+
* 颜色值
|
|
402
|
+
* */
|
|
403
|
+
color: number | string | THREE.Color;
|
|
404
|
+
/**
|
|
405
|
+
* 显示顺序
|
|
406
|
+
* */
|
|
407
|
+
renderOrder: number;
|
|
408
|
+
/**
|
|
409
|
+
* 设置透明度 0 ~ 1,1表示完全不透明,0表示全透明.
|
|
410
|
+
* */
|
|
411
|
+
opacity: number;
|
|
412
|
+
/**
|
|
413
|
+
* 该矩形对象是否可见
|
|
414
|
+
* */
|
|
415
|
+
visible: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* 用户自定义数据.
|
|
418
|
+
* */
|
|
419
|
+
userData: {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
};
|
|
422
|
+
private sGuid;
|
|
423
|
+
private dLineWidth;
|
|
424
|
+
private lineWidthByPixels;
|
|
425
|
+
private dDashArray;
|
|
426
|
+
private dDashRatio;
|
|
427
|
+
private layer;
|
|
428
|
+
private _event;
|
|
429
|
+
abstract getTypeName(): string;
|
|
430
|
+
initGuid(guid: string): void;
|
|
431
|
+
/**
|
|
432
|
+
* 自定义对象的绘制函数。在方法中定义如何绘制图形
|
|
433
|
+
* @param pWorldDraw 绘制对象{@link McGiWorldDraw }
|
|
434
|
+
* @returns void
|
|
435
|
+
*/
|
|
436
|
+
abstract worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
437
|
+
/**
|
|
438
|
+
* 返回自定义对象的夹点.
|
|
439
|
+
* @param
|
|
440
|
+
* @returns Array<THREE.Vector3>
|
|
441
|
+
*/
|
|
442
|
+
abstract getGripPoints(): Array<THREE.Vector3>;
|
|
443
|
+
/**
|
|
444
|
+
* 移动自定义对象的夹点.
|
|
445
|
+
* @param
|
|
446
|
+
* @returns boolean
|
|
447
|
+
*/
|
|
448
|
+
abstract moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
449
|
+
/**
|
|
450
|
+
* 自定义对象数据输入,辅助函数.
|
|
451
|
+
* @param
|
|
452
|
+
* @returns boolean
|
|
453
|
+
* @example
|
|
454
|
+
* ``` typescript
|
|
455
|
+
* class MxLine extends MxDbEntity {
|
|
456
|
+
* dwgIn(obj) {
|
|
457
|
+
* // 必须调用 同步自定义数据对象输入
|
|
458
|
+
* this.dwgInHelp(obj,["xxx"])
|
|
459
|
+
* }
|
|
460
|
+
* }
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
protected dwgInHelp(obj: any, aryProp: string[]): boolean;
|
|
464
|
+
/**
|
|
465
|
+
* 自定义对象数据输出 辅助函数.
|
|
466
|
+
* @param
|
|
467
|
+
* @returns object
|
|
468
|
+
* @example
|
|
469
|
+
* ``` typescript
|
|
470
|
+
* class MxLine extends MxDbEntity {
|
|
471
|
+
* dwgOut(obj) {
|
|
472
|
+
* // 必须调用 同步自定义数据对象输出
|
|
473
|
+
* this.dwgOutHelp(obj,["xxx"])
|
|
474
|
+
* }
|
|
475
|
+
* }
|
|
476
|
+
* ```
|
|
477
|
+
*/
|
|
478
|
+
protected dwgOutHelp(obj: any, aryProp: string[]): any;
|
|
479
|
+
protected callEvent(sEventName: string, param?: any): any;
|
|
480
|
+
/**
|
|
481
|
+
* 新创建一个自定义对象 (默认调用该对象的构造函数来创建新的对象)
|
|
482
|
+
* @param
|
|
483
|
+
* @returns MxDbEntity
|
|
484
|
+
*/
|
|
485
|
+
create(): MxDbEntity;
|
|
486
|
+
/**
|
|
487
|
+
* 自定义对象数据输入,必须要实现该函数
|
|
488
|
+
* @param
|
|
489
|
+
* @returns boolean
|
|
490
|
+
* @example
|
|
491
|
+
* ``` typescript
|
|
492
|
+
* class MxLine extends MxDbEntity {
|
|
493
|
+
* dwgIn(obj) {
|
|
494
|
+
* // 必须调用 同步自定义数据对象输入
|
|
495
|
+
* this.onDwgIn(obj)
|
|
496
|
+
* }
|
|
497
|
+
* }
|
|
498
|
+
* ```
|
|
499
|
+
*/
|
|
500
|
+
abstract dwgIn(obj: any): boolean;
|
|
501
|
+
/**
|
|
502
|
+
* 自定义对象数据输出,必须要实现该函数
|
|
503
|
+
* @param
|
|
504
|
+
* @returns object
|
|
505
|
+
* @example
|
|
506
|
+
* ``` typescript
|
|
507
|
+
* class MxLine extends MxDbEntity {
|
|
508
|
+
* dwgOut(obj) {
|
|
509
|
+
* // 必须调用 同步自定义数据对象输出
|
|
510
|
+
* this.onDwgOut(obj)
|
|
511
|
+
* }
|
|
512
|
+
* }
|
|
513
|
+
* ```
|
|
514
|
+
*/
|
|
515
|
+
abstract dwgOut(obj: any): object;
|
|
516
|
+
/**
|
|
517
|
+
* 自定义实体的矩阵 坐标变换 (需要重写该方法实现如果通过矩阵对自定义实体进行操作 默认不会进行任何操作)
|
|
518
|
+
* @param mat THREE.Matrix4 变化矩阵
|
|
519
|
+
* @returns void
|
|
520
|
+
*/
|
|
521
|
+
transformBy(mat: THREE.Matrix4): void;
|
|
522
|
+
/**
|
|
523
|
+
* 返回对象最小外包.
|
|
524
|
+
* @param
|
|
525
|
+
* @returns void
|
|
526
|
+
*/
|
|
527
|
+
getGeomExtents(): THREE.Box3 | null;
|
|
528
|
+
private getImp;
|
|
529
|
+
/**
|
|
530
|
+
* 更新显示
|
|
531
|
+
* @param 为true 重绘时立即更新显示,默认值false
|
|
532
|
+
* @returns boolean
|
|
533
|
+
|
|
534
|
+
*/
|
|
535
|
+
setNeedUpdateDisplay(isImmediate?: boolean): boolean;
|
|
536
|
+
/**
|
|
537
|
+
* 返回对象所在的控件对象。
|
|
538
|
+
* @returns {@link MxDrawObject}
|
|
539
|
+
*/
|
|
540
|
+
getMxObject(): MxDrawObject | null;
|
|
541
|
+
/**
|
|
542
|
+
* 视区显示比较发生成变化,继承类可以向应该事件,更新显示大小。
|
|
543
|
+
* @returns boolean
|
|
544
|
+
*/
|
|
545
|
+
protected onViewChange(): boolean;
|
|
546
|
+
/**
|
|
547
|
+
* 得到对象的id.
|
|
548
|
+
* @returns number
|
|
549
|
+
*/
|
|
550
|
+
objectId(): number;
|
|
551
|
+
/**
|
|
552
|
+
* 删除对象
|
|
553
|
+
* @returns boolean
|
|
554
|
+
*/
|
|
555
|
+
erase(): boolean;
|
|
556
|
+
/**
|
|
557
|
+
* 设置图层
|
|
558
|
+
* @returns boolean
|
|
559
|
+
*/
|
|
560
|
+
setLayer(layer: string): void;
|
|
561
|
+
/**
|
|
562
|
+
* 得到图层
|
|
563
|
+
* @returns boolean
|
|
564
|
+
*/
|
|
565
|
+
getLayer(): string;
|
|
566
|
+
/**
|
|
567
|
+
* 设置颜色
|
|
568
|
+
* @param color 颜色值
|
|
569
|
+
* @returns boolean
|
|
570
|
+
*/
|
|
571
|
+
setColor(color: number | string | THREE.Color): void;
|
|
572
|
+
/**
|
|
573
|
+
* 得到颜色
|
|
574
|
+
* @returns boolean
|
|
575
|
+
*/
|
|
576
|
+
getColor(): number | string | THREE.Color;
|
|
577
|
+
/**
|
|
578
|
+
* 复制克隆对象。
|
|
579
|
+
* @param type {@link MxType.MxCloneType} 传入参数区分是正常拷贝还是动态拷贝
|
|
580
|
+
* @returns MxDbEntity
|
|
581
|
+
*/
|
|
582
|
+
clone(type?: number): MxDbEntity;
|
|
583
|
+
/**
|
|
584
|
+
* 自定义对象内部数据输入同步(重写实现dwgIn抽象方法时 必须在实现中调用 this.onDwgIn(obj))
|
|
585
|
+
* @param obj dwgIn抽象方法的回调数据
|
|
586
|
+
*/
|
|
587
|
+
protected onDwgIn(obj: any): void;
|
|
588
|
+
/**
|
|
589
|
+
* 自定义对象内部数据输出同步(重写实现dwgIn抽象方法 必须在实现中调用 this.onDwgIn(obj)
|
|
590
|
+
* @param obj dwgOut抽象方法的回调数据
|
|
591
|
+
*/
|
|
592
|
+
protected onDwgOut(obj: any): void;
|
|
593
|
+
/**
|
|
594
|
+
* 初始自定义对象的类型信息.(如果需要实现该图形对象的保存数据和恢复数据的功能, 需要在项目中初始化一次该图形对象的类)
|
|
595
|
+
* @returns
|
|
596
|
+
*/
|
|
597
|
+
rxInit(): void;
|
|
598
|
+
/**
|
|
599
|
+
* 设置显示顺序 (通过显示顺序控制图层)
|
|
600
|
+
* @param renderOrder 显示顺序
|
|
601
|
+
*/
|
|
602
|
+
setRenderOrder(renderOrder: number): void;
|
|
603
|
+
/**
|
|
604
|
+
* 得到显示顺序
|
|
605
|
+
* @returns number
|
|
606
|
+
*/
|
|
607
|
+
getRenderOrder(): number;
|
|
608
|
+
/**
|
|
609
|
+
* 设置线宽是否随像素
|
|
610
|
+
* @returns number
|
|
611
|
+
*/
|
|
612
|
+
setLineWidthByPixels(isPixels: boolean): void;
|
|
613
|
+
/**
|
|
614
|
+
* 线宽是否随像素
|
|
615
|
+
* @returns number
|
|
616
|
+
*/
|
|
617
|
+
getLineWidthByPixels(): boolean;
|
|
618
|
+
/**
|
|
619
|
+
* 设置线宽
|
|
620
|
+
* @returns number
|
|
621
|
+
*/
|
|
622
|
+
setLineWidth(dLineWidth: number): void;
|
|
623
|
+
/**
|
|
624
|
+
* 得到线宽
|
|
625
|
+
* @returns number
|
|
626
|
+
*/
|
|
627
|
+
getLineWidth(): number;
|
|
628
|
+
/**
|
|
629
|
+
* 返回曲线长度
|
|
630
|
+
* @returns number
|
|
631
|
+
*/
|
|
632
|
+
getGetLength(): number;
|
|
633
|
+
/**
|
|
634
|
+
* 设置虚线 +实线的长度.
|
|
635
|
+
* dDashRatio确定虚线,与实线的比率.
|
|
636
|
+
* @returns number
|
|
637
|
+
*/
|
|
638
|
+
setDashLen(dashLen: number): void;
|
|
639
|
+
/**
|
|
640
|
+
* 设置虚线,与实线的比率
|
|
641
|
+
* @returns number
|
|
642
|
+
*/
|
|
643
|
+
setDashRatio(dDashRatio: number): void;
|
|
644
|
+
/**
|
|
645
|
+
* 设置实线虚线总段数 = 1 / dashArray
|
|
646
|
+
* @returns number
|
|
647
|
+
*/
|
|
648
|
+
setDashArray(dDashArray: number): void;
|
|
649
|
+
/**
|
|
650
|
+
* 设置虚线数据
|
|
651
|
+
* @returns number
|
|
652
|
+
*/
|
|
653
|
+
setDash(dDashArray: number, dDashRatio: number): void;
|
|
654
|
+
/**
|
|
655
|
+
* 得到虚线数据
|
|
656
|
+
* @returns number
|
|
657
|
+
*/
|
|
658
|
+
getDash(): any;
|
|
659
|
+
/**
|
|
660
|
+
* 设置虚线显示。并初始化一个默认值。
|
|
661
|
+
* @returns number
|
|
662
|
+
*/
|
|
663
|
+
setDashLineDisplay(isDashLine: boolean): void;
|
|
664
|
+
/**
|
|
665
|
+
* 是否虚线显示
|
|
666
|
+
* @returns number
|
|
667
|
+
*/
|
|
668
|
+
isDashLineDisplay(): boolean;
|
|
669
|
+
/**
|
|
670
|
+
* 返回唯一标识guid
|
|
671
|
+
* @returns string
|
|
672
|
+
*/
|
|
673
|
+
guid(): string;
|
|
674
|
+
/**
|
|
675
|
+
* 对象结束开始编辑
|
|
676
|
+
* @returns string
|
|
677
|
+
*/
|
|
678
|
+
onEndGripEidt(): void;
|
|
679
|
+
/**
|
|
680
|
+
* 对象开始开始编辑
|
|
681
|
+
* @returns string
|
|
682
|
+
*/
|
|
683
|
+
onStartGripEidt(): any;
|
|
684
|
+
/**
|
|
685
|
+
* 添加一个事件处理
|
|
686
|
+
* @returns void
|
|
687
|
+
*/
|
|
688
|
+
addEvent(name: string, fun: object): void;
|
|
689
|
+
/**
|
|
690
|
+
* 删除一个事件处理
|
|
691
|
+
* @returns void
|
|
692
|
+
*/
|
|
693
|
+
removeEvent(name: string): void;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/** @module MxDbGroup */
|
|
697
|
+
/**
|
|
698
|
+
* MxDbGroup 组对象对象.
|
|
699
|
+
*
|
|
700
|
+
*/
|
|
701
|
+
interface MxDbGroup {
|
|
702
|
+
name(): string;
|
|
703
|
+
append(id: number): void;
|
|
704
|
+
clear(): void;
|
|
705
|
+
getAll(): number[];
|
|
706
|
+
has(id: number): boolean;
|
|
707
|
+
delete(id: number): boolean;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** @module MxDbLayerTableRecord */
|
|
711
|
+
/**
|
|
712
|
+
* MxDbDatabase 当前数据库对象.
|
|
713
|
+
*
|
|
714
|
+
*/
|
|
715
|
+
interface MxDbLayerTableRecord {
|
|
716
|
+
getName(): string;
|
|
717
|
+
setVisible(visible: boolean): void;
|
|
718
|
+
getVisible(): boolean;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/** @module MxDbDatabase */
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* MxDbDatabase 当前数据库对象.
|
|
725
|
+
*
|
|
726
|
+
*/
|
|
727
|
+
declare class MxDbDatabase {
|
|
728
|
+
private _mxDatabase;
|
|
729
|
+
constructor(mxDatabase: any);
|
|
730
|
+
/**
|
|
731
|
+
* 添加图层.
|
|
732
|
+
* @example
|
|
733
|
+
* ```typescript
|
|
734
|
+
*
|
|
735
|
+
* ```
|
|
736
|
+
*/
|
|
737
|
+
addLayer(layer: string): MxDbLayerTableRecord;
|
|
738
|
+
/**
|
|
739
|
+
* 显示或隐藏图层
|
|
740
|
+
* @example
|
|
741
|
+
* ```typescript
|
|
742
|
+
*
|
|
743
|
+
* ```
|
|
744
|
+
*/
|
|
745
|
+
showLayer(layer: string, isVisible: boolean): void;
|
|
746
|
+
/**
|
|
747
|
+
* 设置当前图层
|
|
748
|
+
* @example
|
|
749
|
+
* ```typescript
|
|
750
|
+
*
|
|
751
|
+
* ```
|
|
752
|
+
*/
|
|
753
|
+
setCurrentLayer(layer: string): MxDbLayerTableRecord;
|
|
754
|
+
/**
|
|
755
|
+
* 得到图层对象.
|
|
756
|
+
* @example
|
|
757
|
+
* ```typescript
|
|
758
|
+
*
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
getLayer(layer: string): MxDbLayerTableRecord;
|
|
762
|
+
/**
|
|
763
|
+
* 添加对象到当前数据库.
|
|
764
|
+
* @example
|
|
765
|
+
* ```typescript
|
|
766
|
+
*
|
|
767
|
+
* ```
|
|
768
|
+
*/
|
|
769
|
+
addEntity(ent: MxDbEntity): number;
|
|
770
|
+
/**
|
|
771
|
+
* 根据组名,得到组对象。
|
|
772
|
+
* @example
|
|
773
|
+
* ```typescript
|
|
774
|
+
*
|
|
775
|
+
* ```
|
|
776
|
+
*/
|
|
777
|
+
getGroup(sName: string): MxDbGroup;
|
|
778
|
+
/**
|
|
779
|
+
* 添加一个组,如果组已经存在,直接返回该组。
|
|
780
|
+
* @example
|
|
781
|
+
* ```typescript
|
|
782
|
+
*
|
|
783
|
+
* ```
|
|
784
|
+
*/
|
|
785
|
+
addGroup(sName: string): MxDbGroup;
|
|
786
|
+
/**
|
|
787
|
+
* 得到一个实体所在的所有组。
|
|
788
|
+
* @example
|
|
789
|
+
* ```typescript
|
|
790
|
+
*
|
|
791
|
+
* ```
|
|
792
|
+
*/
|
|
793
|
+
getEntityInGroup(id: number): MxDbGroup[];
|
|
794
|
+
/**
|
|
795
|
+
* 删除一个组.
|
|
796
|
+
* @example
|
|
797
|
+
* ```typescript
|
|
798
|
+
*
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
deleteGroup(sName: string): MxDbGroup;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/** @module MxDrawObject */
|
|
805
|
+
|
|
806
|
+
interface MxDrawObjectType {
|
|
807
|
+
renderer: THREE.WebGLRenderer;
|
|
808
|
+
addEvent(arg0: string, arg1: (...parmes: any) => any): void;
|
|
809
|
+
setIniset(arg0: {
|
|
810
|
+
EnableOsnapFunction: boolean;
|
|
811
|
+
}): void;
|
|
812
|
+
getScene(): THREE.Scene;
|
|
813
|
+
getCamera(): THREE.Camera;
|
|
814
|
+
setMouseRightRotate(isRotate: boolean): void;
|
|
815
|
+
getFullDisplayRange(): object;
|
|
816
|
+
getCanvas(): HTMLCanvasElement;
|
|
817
|
+
updateDisplay(): void;
|
|
818
|
+
createCanvasImageData(fun: (imageData: string) => void, param?: object): void;
|
|
819
|
+
setViewColor(color: number): void;
|
|
820
|
+
setSize(width: number, height: number): void;
|
|
821
|
+
getIntersectObjects(ptMouse: THREE.Vector2): THREE.Intersection[];
|
|
822
|
+
getViewWidth(): number;
|
|
823
|
+
getViewHeight(): number;
|
|
824
|
+
zoomInitialStates(): void;
|
|
825
|
+
zoomScale(scale: number): void;
|
|
826
|
+
zoomW(minPt: THREE.Vector3, maxPt: THREE.Vector3, isWorld?: boolean): void;
|
|
827
|
+
zoomCenter(dCenX: number, dCenY: number): void;
|
|
828
|
+
initZoomW(pt1Doc: THREE.Vector3, pt2Doc: THREE.Vector3): void;
|
|
829
|
+
addMxEntity(ent: any): number;
|
|
830
|
+
eraseMxEntity(id: number): boolean;
|
|
831
|
+
screenCoord2World(x: number, y: number, z?: number): THREE.Vector3;
|
|
832
|
+
worldCoord2Screen(x: number, y: number, z: number): THREE.Vector3;
|
|
833
|
+
screenCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
834
|
+
worldCoordLong2Doc(l: number): number;
|
|
835
|
+
docCoordLong2World(l: number): number;
|
|
836
|
+
docCoord2World(x: number, y: number, z: number): THREE.Vector3;
|
|
837
|
+
worldCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
838
|
+
docCoord2Screen(x: number, y: number, z: number): THREE.Vector3;
|
|
839
|
+
screenCoordLong2Doc(l: number): number;
|
|
840
|
+
docCoordLong2Screen(l: number): number;
|
|
841
|
+
screenCoordLong2World(l: number): number;
|
|
842
|
+
worldCoordLong2Screen(l: number): number;
|
|
843
|
+
initRendererParam(param: object): void;
|
|
844
|
+
getMxAllSelect(): Array<number>;
|
|
845
|
+
addMxCurrentSelect(id: number): void;
|
|
846
|
+
clearMxCurrentSelect(): boolean;
|
|
847
|
+
getMxEntityUserObject(id: number): MxDbEntity;
|
|
848
|
+
findMxEntityAtPoint(ptMouse: THREE.Vector3): Array<MxDbEntity>;
|
|
849
|
+
setMouseMiddlePan(isPan: boolean): void;
|
|
850
|
+
resetThreeJSControls(): void;
|
|
851
|
+
getAllMxEntity(): Array<MxDbEntity>;
|
|
852
|
+
enableZoom(isEnable: boolean): void;
|
|
853
|
+
enablePan(isEnable: boolean): void;
|
|
854
|
+
addObject(obj: THREE.Object3D | null, isAddToSelect?: boolean): void;
|
|
855
|
+
addViewObject(obj: THREE.Object3D): void;
|
|
856
|
+
removeViewObject(obj: THREE.Object3D): void;
|
|
857
|
+
removeObject(obj: THREE.Object3D, isRemoveSelectObject?: boolean): void;
|
|
858
|
+
saveMxEntityToJson(): object;
|
|
859
|
+
loadMxEntityFromJson(dataString: object): Promise<boolean>;
|
|
860
|
+
eraseAllMxEntity(): void;
|
|
861
|
+
makeCurrent(): void;
|
|
862
|
+
getViewCenterDocCoord(): THREE.Vector3;
|
|
863
|
+
updateCanvasSize(): void;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* 引入mxdraw库不会挂载MxDrawObject 只能在以下特定函数中获取
|
|
867
|
+
* @function
|
|
868
|
+
* {@link MxFun.createMxObject}中callback回调参数`mxDraw`的构造类
|
|
869
|
+
* @function
|
|
870
|
+
* {@link MxFun.getCurrentDraw} 方法返回值的构造类
|
|
871
|
+
* @function
|
|
872
|
+
* {@link MxFun.getCurrentMxCAD} 方法返回值的构造类
|
|
873
|
+
*
|
|
874
|
+
*/
|
|
875
|
+
declare class MxDrawObject {
|
|
876
|
+
private _mxdrawObj;
|
|
877
|
+
constructor(Mxdraw: MxDrawObjectType);
|
|
878
|
+
/**
|
|
879
|
+
* @instance
|
|
880
|
+
*/
|
|
881
|
+
renderer: THREE.WebGLRenderer;
|
|
882
|
+
/**
|
|
883
|
+
* 获取Three.js绘图场景
|
|
884
|
+
* @returns THREE.Scene
|
|
885
|
+
*/
|
|
886
|
+
getScene(): THREE.Scene;
|
|
887
|
+
/**
|
|
888
|
+
* 获取Three.js相机对象
|
|
889
|
+
* @returns THREE.Camera
|
|
890
|
+
*/
|
|
891
|
+
getCamera(): THREE.Camera;
|
|
892
|
+
/**
|
|
893
|
+
* 获取Three renderer渲染器
|
|
894
|
+
* @returns THREE.WebGLRenderer
|
|
895
|
+
*/
|
|
896
|
+
getRenderer(): THREE.WebGLRenderer;
|
|
897
|
+
/**
|
|
898
|
+
* 设置鼠标按下是否旋视区
|
|
899
|
+
* @param isRotate 是否旋视区
|
|
900
|
+
* @returns void
|
|
901
|
+
* @example
|
|
902
|
+
* ```typescript
|
|
903
|
+
* Mx.MxFun.getCurrentDraw().setMouseRightRotate(false)
|
|
904
|
+
* ```
|
|
905
|
+
*
|
|
906
|
+
*/
|
|
907
|
+
setMouseRightRotate(isRotate?: boolean): void;
|
|
908
|
+
/**
|
|
909
|
+
* 得到全部显示所有图形所需要的显示的范围 ,Three.js的坐标系。world坐标。
|
|
910
|
+
* @returns {minPt: value,maxPt: value}
|
|
911
|
+
* @example
|
|
912
|
+
* ```typescript
|
|
913
|
+
* Mx.MxFun.getCurrentDraw().getFullDisplayRange()
|
|
914
|
+
* ```
|
|
915
|
+
*/
|
|
916
|
+
getFullDisplayRange(): object;
|
|
917
|
+
/**
|
|
918
|
+
* 获取Canvas对象.
|
|
919
|
+
* @returns HTMLCanvasElement
|
|
920
|
+
*/
|
|
921
|
+
getCanvas(): HTMLCanvasElement;
|
|
922
|
+
/**
|
|
923
|
+
* 通知Three.js更新显示
|
|
924
|
+
* @returns void
|
|
925
|
+
*/
|
|
926
|
+
updateDisplay(): void;
|
|
927
|
+
/**
|
|
928
|
+
* 通知Three.js生成ImgeData显示I数据.
|
|
929
|
+
* @param fn 回调函数或者imageData
|
|
930
|
+
* @param param 函数载荷
|
|
931
|
+
* @returns void
|
|
932
|
+
* @example
|
|
933
|
+
* ```typescript
|
|
934
|
+
* Mx.MxFun.getCurrentDraw().createCanvasImageData((imageData)=> {
|
|
935
|
+
* console.log(imageData)
|
|
936
|
+
* })
|
|
937
|
+
* ```
|
|
938
|
+
*/
|
|
939
|
+
createCanvasImageData(fn: (imageData: string) => void, param?: object): void;
|
|
940
|
+
/**
|
|
941
|
+
* 设置视区背景色,
|
|
942
|
+
* @param color 如0xFFFFFF 白色
|
|
943
|
+
* @returns void
|
|
944
|
+
* @example
|
|
945
|
+
* ```typescript
|
|
946
|
+
* Mx.MxFun.getCurrentDraw().setViewColor(0xFFFFFF)
|
|
947
|
+
* ```
|
|
948
|
+
*/
|
|
949
|
+
setViewColor(color: number): void;
|
|
950
|
+
/**
|
|
951
|
+
* 设置视区背景色,
|
|
952
|
+
* @param width 宽度
|
|
953
|
+
* @param height 宽度
|
|
954
|
+
* @returns void
|
|
955
|
+
* @example
|
|
956
|
+
* ```typescript
|
|
957
|
+
* Mx.MxFun.getCurrentDraw().setSize(0xFFFFFF)
|
|
958
|
+
* ```
|
|
959
|
+
*/
|
|
960
|
+
setSize(width: number, height: number): void;
|
|
961
|
+
/**
|
|
962
|
+
* 获取某屏幕点下的绘制对象,ptMouse是.,
|
|
963
|
+
* @param ptMouse THREE.Vector2 屏幕坐标
|
|
964
|
+
* @returns THREE.Intersection[]
|
|
965
|
+
* @example
|
|
966
|
+
* ```typescript
|
|
967
|
+
* Mx.MxFun.getCurrentDraw().getIntersectObjects(new THREE.Vector2(2, 3))
|
|
968
|
+
* ```
|
|
969
|
+
*/
|
|
970
|
+
getIntersectObjects(ptMouse: THREE.Vector2): THREE.Intersection[];
|
|
971
|
+
/**
|
|
972
|
+
* 添加THREE.Object3D对象到当前场景
|
|
973
|
+
* @param obj THREE.Object3D
|
|
974
|
+
* @param isAddToSelect 默认值为true 是否把对象添加选择对象集中,调用 getIntersectObjects可以找到
|
|
975
|
+
* @returns void
|
|
976
|
+
* @example
|
|
977
|
+
* ```typescript
|
|
978
|
+
* Mx.MxFun.getCurrentDraw().addObject(new THREE.Object3D(), false)
|
|
979
|
+
* ```
|
|
980
|
+
*/
|
|
981
|
+
addObject(obj: THREE.Object3D, isAddToSelect?: boolean): void;
|
|
982
|
+
/**
|
|
983
|
+
* 添加THREE.Object3D对象到视区场景,对象坐标系是窗口视区坐标系。0,0点在左下角.
|
|
984
|
+
* @param obj THREE.Object3D
|
|
985
|
+
* @returns void
|
|
986
|
+
* @example
|
|
987
|
+
* ```typescript
|
|
988
|
+
* Mx.MxFun.getCurrentDraw().addViewObject(new THREE.Object3D())
|
|
989
|
+
* ```
|
|
990
|
+
*/
|
|
991
|
+
addViewObject(obj: THREE.Object3D): void;
|
|
992
|
+
/**
|
|
993
|
+
* 得到对象画布的宽度,单位屏幕像素
|
|
994
|
+
* @returns number
|
|
995
|
+
* @example
|
|
996
|
+
* ```typescript
|
|
997
|
+
* Mx.MxFun.getCurrentDraw().getViewWidth()
|
|
998
|
+
* ```
|
|
999
|
+
*/
|
|
1000
|
+
getViewWidth(): number;
|
|
1001
|
+
/**
|
|
1002
|
+
* 得到对象画布的高度,单位屏幕像素
|
|
1003
|
+
* @returns number
|
|
1004
|
+
* @example
|
|
1005
|
+
* ```typescript
|
|
1006
|
+
* Mx.MxFun.getCurrentDraw().getViewHeight()
|
|
1007
|
+
* ```
|
|
1008
|
+
*/
|
|
1009
|
+
getViewHeight(): number;
|
|
1010
|
+
/**
|
|
1011
|
+
* 删除addObject函数添加的THREE.Object3D对象
|
|
1012
|
+
* @param obj THREE.Object3D
|
|
1013
|
+
* @param isRemoveSelectObject 默认值为true 删除选择集中的对象
|
|
1014
|
+
* @returns void
|
|
1015
|
+
* @example
|
|
1016
|
+
* ```typescript
|
|
1017
|
+
* Mx.MxFun.getCurrentDraw().removeObject(new THREE.Object3D(), false)
|
|
1018
|
+
* ```
|
|
1019
|
+
*/
|
|
1020
|
+
removeObject(obj: THREE.Object3D, isRemoveSelectObject?: boolean): void;
|
|
1021
|
+
/**
|
|
1022
|
+
* 把视区显示范围恢复到初始显示范围.
|
|
1023
|
+
* @returns void
|
|
1024
|
+
*/
|
|
1025
|
+
zoomInitialStates(): void;
|
|
1026
|
+
/**
|
|
1027
|
+
* 缩放当前显示范围,它是相对于当前显示范围进行缩放
|
|
1028
|
+
* @param scale scale缩放比例
|
|
1029
|
+
* @returns void
|
|
1030
|
+
* @example
|
|
1031
|
+
* ```typescript
|
|
1032
|
+
* Mx.MxFun.getCurrentDraw().zoomScale(0.8)
|
|
1033
|
+
* ```
|
|
1034
|
+
*/
|
|
1035
|
+
zoomScale(scale: number): void;
|
|
1036
|
+
/**
|
|
1037
|
+
* 把当前显示范围移到指定的显示范围
|
|
1038
|
+
* @param minPt 坐标1 THREE.Vector3
|
|
1039
|
+
* @param maxPt 坐标2 THREE.Vector3
|
|
1040
|
+
* @param isWorld 默认为felse DWG图纸坐标,设置为true是THREEJS坐标
|
|
1041
|
+
* @returns void
|
|
1042
|
+
* @example
|
|
1043
|
+
* ```typescript
|
|
1044
|
+
* Mx.MxFun.getCurrentDraw().zoomW(new THREE.Vector3(0,10,10), new THREE.Vector3(3,8,20), true)
|
|
1045
|
+
* ```
|
|
1046
|
+
*/
|
|
1047
|
+
zoomW(minPt: THREE.Vector3, maxPt: THREE.Vector3, isWorld?: boolean): void;
|
|
1048
|
+
/**
|
|
1049
|
+
* 把当前显示范围移到指定的位置,dCenX,dCenY是DWG图纸坐标。
|
|
1050
|
+
* @param minPt DWG图纸坐标1 THREE.Vector3
|
|
1051
|
+
* @param maxPt DWG图纸坐标2 THREE.Vector3
|
|
1052
|
+
* @returns void
|
|
1053
|
+
* @example
|
|
1054
|
+
* ```typescript
|
|
1055
|
+
* Mx.MxFun.getCurrentDraw().zoomCenter(new THREE.Vector3(0,10,10), new THREE.Vector3(3,8,20))
|
|
1056
|
+
* ```
|
|
1057
|
+
*/
|
|
1058
|
+
zoomCenter(dCenX: number, dCenY: number): void;
|
|
1059
|
+
/**
|
|
1060
|
+
* 初始化控件默认加载后,显示视区范围,默认使用图纸转换时的显示范围。。
|
|
1061
|
+
* @param minPt DWG文档坐标1显示区域的左下角 THREE.Vector3
|
|
1062
|
+
* @param maxPt DWG文档坐标2显示区域的右上角 THREE.Vector3
|
|
1063
|
+
* @returns void
|
|
1064
|
+
* @example
|
|
1065
|
+
* ```typescript
|
|
1066
|
+
* Mx.MxFun.getCurrentDraw().initZoomW(new THREE.Vector3(0,10,10), new THREE.Vector3(3,8,20))
|
|
1067
|
+
*
|
|
1068
|
+
* ```
|
|
1069
|
+
*/
|
|
1070
|
+
initZoomW(pt1Doc: THREE.Vector3, pt2Doc: THREE.Vector3): void;
|
|
1071
|
+
/**
|
|
1072
|
+
* 初始化控件默认加载后,显示视区范围,默认使用图纸转换时的显示范围。。
|
|
1073
|
+
* @param minPt DWG文档坐标1显示区域的左下角 THREE.Vector3
|
|
1074
|
+
* @param maxPt DWG文档坐标2显示区域的右上角 THREE.Vector3
|
|
1075
|
+
* @returns void
|
|
1076
|
+
* @example
|
|
1077
|
+
* ```typescript
|
|
1078
|
+
* Mx.MxFun.getCurrentDraw().addEvent(new THREE.Vector3(0,10,10), new THREE.Vector3(3,8,20))
|
|
1079
|
+
*
|
|
1080
|
+
* ```
|
|
1081
|
+
*/
|
|
1082
|
+
/**
|
|
1083
|
+
* 控件对象的事件监听
|
|
1084
|
+
* @param eventNaem 事件名称
|
|
1085
|
+
* @param fun 回调函数
|
|
1086
|
+
* @returns void
|
|
1087
|
+
* @example
|
|
1088
|
+
* ```typescript
|
|
1089
|
+
* Mx.MxFun.getCurrentDraw().addEvent("addResizeEvent", ()=> {})
|
|
1090
|
+
* Mx.MxFun.getCurrentDraw().addEvent("viewchange", ()=> {})
|
|
1091
|
+
* 图纸加载完成
|
|
1092
|
+
* Mx.MxFun.getCurrentDraw().addEvent("loadComplete", ()=> {})
|
|
1093
|
+
* 视区重绘事件.
|
|
1094
|
+
* Mx.MxFun.getCurrentDraw().addEvent("render", (renderer)=> {})
|
|
1095
|
+
* 视区大小被修改事件.,viewsize={viewWidth:viewWidth,viewHeight:viewHeight}
|
|
1096
|
+
* Mx.MxFun.getCurrentDraw().addEvent("viewsizechange", (viewsize)=> {})
|
|
1097
|
+
* 实体选择状态发生改变的事件.
|
|
1098
|
+
* Mx.MxFun.getCurrentDraw().addEvent("MxEntitySelectChange", (aryId:Array<number>)=> {})
|
|
1099
|
+
* ```
|
|
1100
|
+
*/
|
|
1101
|
+
addEvent(eventNaem: string, fun: (...parmes: any) => any): void;
|
|
1102
|
+
/**
|
|
1103
|
+
* 控件对象的事件监听
|
|
1104
|
+
* @param eventNaem 事件名称
|
|
1105
|
+
* @param fun 回调函数
|
|
1106
|
+
* @returns void
|
|
1107
|
+
* @example
|
|
1108
|
+
* ```typescript
|
|
1109
|
+
* Mx.MxFun.getCurrentDraw().on("addResizeEvent", ()=> {})
|
|
1110
|
+
* Mx.MxFun.getCurrentDraw().on("viewchange", ()=> {})
|
|
1111
|
+
* 图纸加载完成
|
|
1112
|
+
* Mx.MxFun.getCurrentDraw().on("loadComplete", ()=> {})
|
|
1113
|
+
* 视区重绘事件.
|
|
1114
|
+
* Mx.MxFun.getCurrentDraw().on("render", (renderer)=> {})
|
|
1115
|
+
* 视区大小被修改事件.,viewsize={viewWidth:viewWidth,viewHeight:viewHeight}
|
|
1116
|
+
* Mx.MxFun.getCurrentDraw().on("viewsizechange", (viewsize)=> {})
|
|
1117
|
+
* 实体选择状态发生改变的事件.
|
|
1118
|
+
* Mx.MxFun.getCurrentDraw().on("MxEntitySelectChange", (aryId:Array<number>)=> {})
|
|
1119
|
+
* ```
|
|
1120
|
+
*/
|
|
1121
|
+
on(eventNaem: string, fun: (...parmes: any) => any): void;
|
|
1122
|
+
/**
|
|
1123
|
+
* INI设置
|
|
1124
|
+
* @param options { EnableOsnapFunction: boolean; }
|
|
1125
|
+
* @returns void
|
|
1126
|
+
* @example
|
|
1127
|
+
* ```typescript
|
|
1128
|
+
* Mx.MxFun.getCurrentDraw().setIniset(options: { EnableOsnapFunction: true })
|
|
1129
|
+
*
|
|
1130
|
+
* ```
|
|
1131
|
+
*/
|
|
1132
|
+
setIniset(options: {
|
|
1133
|
+
EnableOsnapFunction: boolean;
|
|
1134
|
+
}): void;
|
|
1135
|
+
/**
|
|
1136
|
+
* 屏幕坐标到ThreeJS坐标
|
|
1137
|
+
* @returns THREE.Vector3
|
|
1138
|
+
* @example
|
|
1139
|
+
* ```typescript
|
|
1140
|
+
*
|
|
1141
|
+
*
|
|
1142
|
+
* ```
|
|
1143
|
+
*/
|
|
1144
|
+
screenCoord2World(x: number, y: number, z?: number): THREE.Vector3;
|
|
1145
|
+
/**
|
|
1146
|
+
* ThreeJS坐标到屏幕坐标,屏幕坐标的Y轴向下。坐标原点在左上角.
|
|
1147
|
+
* @returns THREE.Vector3
|
|
1148
|
+
* @example
|
|
1149
|
+
* ```typescript
|
|
1150
|
+
*
|
|
1151
|
+
*
|
|
1152
|
+
* ```
|
|
1153
|
+
*/
|
|
1154
|
+
worldCoord2Screen(x: number, y: number, z: number): THREE.Vector3;
|
|
1155
|
+
/**
|
|
1156
|
+
* 屏幕坐标到DWG文档坐标
|
|
1157
|
+
* @returns THREE.Vector3
|
|
1158
|
+
* @example
|
|
1159
|
+
* ```typescript
|
|
1160
|
+
*
|
|
1161
|
+
*
|
|
1162
|
+
* ```
|
|
1163
|
+
*/
|
|
1164
|
+
screenCoord2Doc(x: number, y: number): THREE.Vector3;
|
|
1165
|
+
/**
|
|
1166
|
+
* ThreeJS坐标长度到DWG文档坐标长度
|
|
1167
|
+
* @returns number
|
|
1168
|
+
* @example
|
|
1169
|
+
* ```typescript
|
|
1170
|
+
*
|
|
1171
|
+
*
|
|
1172
|
+
* ```
|
|
1173
|
+
*/
|
|
1174
|
+
worldCoordLong2Doc(l: number): number;
|
|
1175
|
+
/**
|
|
1176
|
+
* DWG文档坐标长度到ThreeJS坐标长度
|
|
1177
|
+
* @returns number
|
|
1178
|
+
* @example
|
|
1179
|
+
* ```typescript
|
|
1180
|
+
*
|
|
1181
|
+
*
|
|
1182
|
+
* ```
|
|
1183
|
+
*/
|
|
1184
|
+
docCoordLong2World(l: number): number;
|
|
1185
|
+
/**
|
|
1186
|
+
* DWG文档坐标到ThreeJS坐标
|
|
1187
|
+
* @returns number
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```typescript
|
|
1190
|
+
*
|
|
1191
|
+
*
|
|
1192
|
+
* ```
|
|
1193
|
+
*/
|
|
1194
|
+
docCoord2World(x: number, y: number, z: number): THREE.Vector3;
|
|
1195
|
+
/**
|
|
1196
|
+
* DWG文档坐标到ThreeJS坐标
|
|
1197
|
+
* @returns THREE.Vector3
|
|
1198
|
+
* @example
|
|
1199
|
+
* ```typescript
|
|
1200
|
+
*
|
|
1201
|
+
*
|
|
1202
|
+
* ```
|
|
1203
|
+
*/
|
|
1204
|
+
docCoord2World2(pt: THREE.Vector3): THREE.Vector3;
|
|
1205
|
+
/**
|
|
1206
|
+
* ThreeJS坐标到DWG文档坐标
|
|
1207
|
+
* @returns number
|
|
1208
|
+
* @example
|
|
1209
|
+
* ```typescript
|
|
1210
|
+
*
|
|
1211
|
+
*
|
|
1212
|
+
* ```
|
|
1213
|
+
*/
|
|
1214
|
+
worldCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
1215
|
+
/**
|
|
1216
|
+
* ThreeJS坐标到DWG文档坐标
|
|
1217
|
+
* @returns THREE.Vector3
|
|
1218
|
+
* @example
|
|
1219
|
+
* ```typescript
|
|
1220
|
+
*
|
|
1221
|
+
*
|
|
1222
|
+
* ```
|
|
1223
|
+
*/
|
|
1224
|
+
worldCoord2Doc2(pt: THREE.Vector3): THREE.Vector3;
|
|
1225
|
+
/**
|
|
1226
|
+
* DWG文档坐标到屏幕坐标
|
|
1227
|
+
* @returns number
|
|
1228
|
+
* @example
|
|
1229
|
+
* ```typescript
|
|
1230
|
+
*
|
|
1231
|
+
*
|
|
1232
|
+
* ```
|
|
1233
|
+
*/
|
|
1234
|
+
docCoord2Screen(x: number, y: number): THREE.Vector3;
|
|
1235
|
+
/**
|
|
1236
|
+
* 屏幕坐标长度到DWG文档坐标长度
|
|
1237
|
+
* @returns number
|
|
1238
|
+
* @example
|
|
1239
|
+
* ```typescript
|
|
1240
|
+
*
|
|
1241
|
+
*
|
|
1242
|
+
* ```
|
|
1243
|
+
*/
|
|
1244
|
+
screenCoordLong2Doc(l: number): number;
|
|
1245
|
+
/**
|
|
1246
|
+
* DWG文档坐标长度到屏幕坐标长度
|
|
1247
|
+
* @returns number
|
|
1248
|
+
* @example
|
|
1249
|
+
* ```typescript
|
|
1250
|
+
*
|
|
1251
|
+
*
|
|
1252
|
+
* ```
|
|
1253
|
+
*/
|
|
1254
|
+
docCoordLong2Screen(l: number): number;
|
|
1255
|
+
/**
|
|
1256
|
+
* 屏幕坐标长度到ThreeJS坐标长度
|
|
1257
|
+
* @returns number
|
|
1258
|
+
* @example
|
|
1259
|
+
* ```typescript
|
|
1260
|
+
*
|
|
1261
|
+
*
|
|
1262
|
+
* ```
|
|
1263
|
+
*/
|
|
1264
|
+
screenCoordLong2World(l: number): number;
|
|
1265
|
+
/**
|
|
1266
|
+
* ThreeJS坐标长度到屏幕坐标长度
|
|
1267
|
+
* @returns number
|
|
1268
|
+
* @example
|
|
1269
|
+
* ```typescript
|
|
1270
|
+
*
|
|
1271
|
+
*
|
|
1272
|
+
* ```
|
|
1273
|
+
*/
|
|
1274
|
+
worldCoordLong2Screen(l: number): number;
|
|
1275
|
+
/**
|
|
1276
|
+
* 初始WebGL Renderer的创建参数,该函数在MxFun.createMxObject函数调用时,调用。
|
|
1277
|
+
* @param param
|
|
1278
|
+
* @returns void
|
|
1279
|
+
* @example
|
|
1280
|
+
* ```typescript
|
|
1281
|
+
* mxObj.initRendererParam({preserveDrawingBuffer: true})
|
|
1282
|
+
*
|
|
1283
|
+
* ```
|
|
1284
|
+
*/
|
|
1285
|
+
initRendererParam(param: object): void;
|
|
1286
|
+
/**
|
|
1287
|
+
* 添加一个自定义实体到图上。
|
|
1288
|
+
* @param ent 自定义实体对象
|
|
1289
|
+
* @returns number 返回对象的id.
|
|
1290
|
+
* @example
|
|
1291
|
+
* ```typescript
|
|
1292
|
+
*
|
|
1293
|
+
*
|
|
1294
|
+
* ```
|
|
1295
|
+
*/
|
|
1296
|
+
addMxEntity(ent: MxDbEntity): number;
|
|
1297
|
+
/**
|
|
1298
|
+
* 得到图上当前选择的对象.
|
|
1299
|
+
* @returns Array<number> 返回对象的id数组.
|
|
1300
|
+
* @example
|
|
1301
|
+
* ```typescript
|
|
1302
|
+
*
|
|
1303
|
+
*
|
|
1304
|
+
* ```
|
|
1305
|
+
*/
|
|
1306
|
+
getMxCurrentSelect(): Array<number>;
|
|
1307
|
+
/**
|
|
1308
|
+
* 把对象添加到当前选择中.
|
|
1309
|
+
* @returns void
|
|
1310
|
+
* @example
|
|
1311
|
+
* ```typescript
|
|
1312
|
+
*
|
|
1313
|
+
*
|
|
1314
|
+
* ```
|
|
1315
|
+
*/
|
|
1316
|
+
addMxCurrentSelect(id: number): void;
|
|
1317
|
+
/**
|
|
1318
|
+
* 清除当前所有选择
|
|
1319
|
+
* @returns void
|
|
1320
|
+
* @example
|
|
1321
|
+
* ```typescript
|
|
1322
|
+
*
|
|
1323
|
+
*
|
|
1324
|
+
* ```
|
|
1325
|
+
*/
|
|
1326
|
+
clearMxCurrentSelect(): boolean;
|
|
1327
|
+
/**
|
|
1328
|
+
*通过id获取绘制的对象.
|
|
1329
|
+
* @param id 返回对象的id
|
|
1330
|
+
* @returns MxDbEntity
|
|
1331
|
+
* @example
|
|
1332
|
+
* ```typescript
|
|
1333
|
+
*
|
|
1334
|
+
*
|
|
1335
|
+
* ```
|
|
1336
|
+
*/
|
|
1337
|
+
getMxEntity(id: number): MxDbEntity;
|
|
1338
|
+
/**
|
|
1339
|
+
* 查找某点位置处的用户自绘对象.
|
|
1340
|
+
* @param ptMouse 查找的点位 THREE.Vector3,默认是文档坐标
|
|
1341
|
+
* @returns MxDbEntity[] 返回用户自绘对象数组
|
|
1342
|
+
* @example
|
|
1343
|
+
* ```typescript
|
|
1344
|
+
*
|
|
1345
|
+
*
|
|
1346
|
+
* ```
|
|
1347
|
+
*/
|
|
1348
|
+
findMxEntityAtPoint(ptMouse: THREE.Vector3): Array<MxDbEntity>;
|
|
1349
|
+
/**
|
|
1350
|
+
*得到所有用户自绘对象.
|
|
1351
|
+
* @returns MxDbEntity[] 返回用户自绘对象数组
|
|
1352
|
+
* @example
|
|
1353
|
+
* ```typescript
|
|
1354
|
+
*
|
|
1355
|
+
*
|
|
1356
|
+
* ```
|
|
1357
|
+
*/
|
|
1358
|
+
getAllMxEntity(): Array<MxDbEntity>;
|
|
1359
|
+
/**
|
|
1360
|
+
* 设置鼠标中键移动视区。
|
|
1361
|
+
* @param isPan 设置是否可以鼠标中键移动视区
|
|
1362
|
+
* @returns
|
|
1363
|
+
* @example
|
|
1364
|
+
* ```typescript
|
|
1365
|
+
*
|
|
1366
|
+
*
|
|
1367
|
+
* ```
|
|
1368
|
+
*/
|
|
1369
|
+
setMouseMiddlePan(isPan: boolean): void;
|
|
1370
|
+
/**
|
|
1371
|
+
*重新设置ThreeJS Controls状态.
|
|
1372
|
+
* @returns
|
|
1373
|
+
* @example
|
|
1374
|
+
* ```typescript
|
|
1375
|
+
*
|
|
1376
|
+
*
|
|
1377
|
+
* ```
|
|
1378
|
+
*/
|
|
1379
|
+
resetThreeJSControls(): void;
|
|
1380
|
+
/**
|
|
1381
|
+
* 启用或禁用鼠标中键滚动缩放视区
|
|
1382
|
+
* @param isEnable 是否启用
|
|
1383
|
+
* @returns
|
|
1384
|
+
* @example
|
|
1385
|
+
* ```typescript
|
|
1386
|
+
*
|
|
1387
|
+
*
|
|
1388
|
+
* ```
|
|
1389
|
+
*/
|
|
1390
|
+
enableZoom(isEnable: boolean): void;
|
|
1391
|
+
/**
|
|
1392
|
+
* 启用或禁用鼠标移动视区
|
|
1393
|
+
* @param isEnable 是否启用
|
|
1394
|
+
* @returns
|
|
1395
|
+
* @example
|
|
1396
|
+
* ```typescript
|
|
1397
|
+
*
|
|
1398
|
+
*
|
|
1399
|
+
* ```
|
|
1400
|
+
*/
|
|
1401
|
+
enablePan(isEnable: boolean): void;
|
|
1402
|
+
/**
|
|
1403
|
+
* 删除MxEntity
|
|
1404
|
+
* @param id 实体id.
|
|
1405
|
+
* @returns
|
|
1406
|
+
* @example
|
|
1407
|
+
* ```typescript
|
|
1408
|
+
*
|
|
1409
|
+
*
|
|
1410
|
+
* ```
|
|
1411
|
+
*/
|
|
1412
|
+
eraseMxEntity(id: number): boolean;
|
|
1413
|
+
/**
|
|
1414
|
+
* 移除安视图坐标绘制的对象.
|
|
1415
|
+
* @param obj 对象.
|
|
1416
|
+
* @returns
|
|
1417
|
+
* @example
|
|
1418
|
+
* ```typescript
|
|
1419
|
+
*
|
|
1420
|
+
*
|
|
1421
|
+
* ```
|
|
1422
|
+
*/
|
|
1423
|
+
removeViewObject(obj: THREE.Object3D): void;
|
|
1424
|
+
/**
|
|
1425
|
+
* 保存所有MxEntity的数据到json字符串.
|
|
1426
|
+
* @param
|
|
1427
|
+
* @returns json字符串
|
|
1428
|
+
* @example
|
|
1429
|
+
* ```typescript
|
|
1430
|
+
*
|
|
1431
|
+
*
|
|
1432
|
+
* ```
|
|
1433
|
+
*/
|
|
1434
|
+
saveMxEntityToJson(): string;
|
|
1435
|
+
/**
|
|
1436
|
+
* 保存所有MxEntity的数据到js对象.
|
|
1437
|
+
* @param
|
|
1438
|
+
* @returns js对象
|
|
1439
|
+
* @example
|
|
1440
|
+
* ```typescript
|
|
1441
|
+
*
|
|
1442
|
+
*
|
|
1443
|
+
* ```
|
|
1444
|
+
*/
|
|
1445
|
+
saveMxEntityToObject(): object;
|
|
1446
|
+
/**
|
|
1447
|
+
* 从json字符串恢复MxEntity
|
|
1448
|
+
* @param dataString json字符串.
|
|
1449
|
+
* @returns
|
|
1450
|
+
* @example
|
|
1451
|
+
* ```typescript
|
|
1452
|
+
*
|
|
1453
|
+
*
|
|
1454
|
+
* ```
|
|
1455
|
+
*/
|
|
1456
|
+
loadMxEntityFromJson(dataString: string | object, aryPreloadSVG?: string[] | null): Promise<boolean>;
|
|
1457
|
+
/**
|
|
1458
|
+
* 删除所有的MxEntity
|
|
1459
|
+
* @param
|
|
1460
|
+
* @returns
|
|
1461
|
+
* @example
|
|
1462
|
+
* ```typescript
|
|
1463
|
+
*
|
|
1464
|
+
*
|
|
1465
|
+
* ```
|
|
1466
|
+
*/
|
|
1467
|
+
eraseAllMxEntity(): void;
|
|
1468
|
+
/**
|
|
1469
|
+
* 把该控件对象,设置成当前控件.
|
|
1470
|
+
* @param
|
|
1471
|
+
* @returns
|
|
1472
|
+
* @example
|
|
1473
|
+
* ```typescript
|
|
1474
|
+
*
|
|
1475
|
+
*
|
|
1476
|
+
* ```
|
|
1477
|
+
*/
|
|
1478
|
+
makeCurrent(): void;
|
|
1479
|
+
/**
|
|
1480
|
+
* 得到视区中心的文档坐标.
|
|
1481
|
+
* @param
|
|
1482
|
+
* @returns
|
|
1483
|
+
* @example
|
|
1484
|
+
* ```typescript
|
|
1485
|
+
*
|
|
1486
|
+
*
|
|
1487
|
+
* ```
|
|
1488
|
+
*/
|
|
1489
|
+
getViewCenterDocCoord(): THREE.Vector3;
|
|
1490
|
+
/**
|
|
1491
|
+
* 画布大小,自动修改到它父亲div大小。
|
|
1492
|
+
* @param
|
|
1493
|
+
* @returns
|
|
1494
|
+
* @example
|
|
1495
|
+
* ```typescript
|
|
1496
|
+
*
|
|
1497
|
+
*
|
|
1498
|
+
* ```
|
|
1499
|
+
*/
|
|
1500
|
+
updateCanvasSize(): void;
|
|
1501
|
+
/**
|
|
1502
|
+
* 新建图纸.
|
|
1503
|
+
* @param ptin1,ptin2新建图纸的显示范围.
|
|
1504
|
+
* @returns
|
|
1505
|
+
* @example
|
|
1506
|
+
* ```typescript
|
|
1507
|
+
*
|
|
1508
|
+
*
|
|
1509
|
+
* ```
|
|
1510
|
+
*/
|
|
1511
|
+
newFile(ptin1: THREE.Vector3 | number, ptin2: THREE.Vector3 | number, x2?: number, y2?: number): boolean;
|
|
1512
|
+
/**
|
|
1513
|
+
* 停止当前加载
|
|
1514
|
+
* @example
|
|
1515
|
+
* ```typescript
|
|
1516
|
+
*
|
|
1517
|
+
* ```
|
|
1518
|
+
*/
|
|
1519
|
+
stopAllLoading(): void;
|
|
1520
|
+
/**
|
|
1521
|
+
* 得到Three.js的 OrbitControls对象.
|
|
1522
|
+
* @example
|
|
1523
|
+
* ```typescript
|
|
1524
|
+
*
|
|
1525
|
+
* ```
|
|
1526
|
+
*/
|
|
1527
|
+
getOrbitControls(): any;
|
|
1528
|
+
/**
|
|
1529
|
+
* 禁用或启用视区的移动,放大,缩小等操作.
|
|
1530
|
+
* @example
|
|
1531
|
+
* ```typescript
|
|
1532
|
+
*
|
|
1533
|
+
* ```
|
|
1534
|
+
*/
|
|
1535
|
+
enableViewControls(isEnable: boolean): void;
|
|
1536
|
+
/**
|
|
1537
|
+
* 得到当前图形数据库对象
|
|
1538
|
+
* @example
|
|
1539
|
+
* ```typescript
|
|
1540
|
+
*
|
|
1541
|
+
* ```
|
|
1542
|
+
*/
|
|
1543
|
+
getMxDatabase(): MxDbDatabase;
|
|
1544
|
+
/**
|
|
1545
|
+
* 设置鼠标中键的滚动的缩放比例,在PC上,默认值4,手机上默认值,1.5
|
|
1546
|
+
* 返回之前设置值。
|
|
1547
|
+
* @example
|
|
1548
|
+
* ```typescript
|
|
1549
|
+
*
|
|
1550
|
+
* ```
|
|
1551
|
+
*/
|
|
1552
|
+
setZoomSpeed(zoomSpeed: number): number;
|
|
1553
|
+
/**
|
|
1554
|
+
* 得到MxCAD对象.
|
|
1555
|
+
* @return MxCADObject
|
|
1556
|
+
* @example
|
|
1557
|
+
* ``` typescript
|
|
1558
|
+
* ```
|
|
1559
|
+
*/
|
|
1560
|
+
getMxCAD(): MxCADObject;
|
|
1561
|
+
/**
|
|
1562
|
+
* 重新计数Renderer状态, this.renderer.info.reset();
|
|
1563
|
+
* @return
|
|
1564
|
+
* @example
|
|
1565
|
+
* ``` typescript
|
|
1566
|
+
* ```
|
|
1567
|
+
*/
|
|
1568
|
+
resetRenderer(): any;
|
|
1569
|
+
/**
|
|
1570
|
+
* 设置服务器发送文件请求时,需要带的参数.;
|
|
1571
|
+
* @return
|
|
1572
|
+
* @example
|
|
1573
|
+
* ``` typescript
|
|
1574
|
+
* ``` mxobj.setRequestHeader("{'data':'value1'}");
|
|
1575
|
+
*/
|
|
1576
|
+
setRequestHeader(val: string): any;
|
|
1577
|
+
/**
|
|
1578
|
+
* 在MxCAD模式下,关闭与服务器的socket连接 。
|
|
1579
|
+
* @return
|
|
1580
|
+
* @example
|
|
1581
|
+
*/
|
|
1582
|
+
closeWebSocket(): any;
|
|
1583
|
+
/**
|
|
1584
|
+
* CAD坐标到文档坐标.
|
|
1585
|
+
* 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
|
|
1586
|
+
* @returns number
|
|
1587
|
+
* @example
|
|
1588
|
+
* ```typescript
|
|
1589
|
+
*
|
|
1590
|
+
*
|
|
1591
|
+
* ```
|
|
1592
|
+
*/
|
|
1593
|
+
cadCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
1594
|
+
/**
|
|
1595
|
+
* 文档坐标坐标到CAD.
|
|
1596
|
+
* 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
|
|
1597
|
+
* @returns number
|
|
1598
|
+
* @example
|
|
1599
|
+
* ```typescript
|
|
1600
|
+
*
|
|
1601
|
+
*
|
|
1602
|
+
* ```
|
|
1603
|
+
*/
|
|
1604
|
+
docCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
|
|
1605
|
+
/**
|
|
1606
|
+
* 设置视区的旋转角度
|
|
1607
|
+
* @example
|
|
1608
|
+
* ```typescript
|
|
1609
|
+
*
|
|
1610
|
+
*
|
|
1611
|
+
* ```
|
|
1612
|
+
*/
|
|
1613
|
+
setViewAngle(ang: number): void;
|
|
1614
|
+
/**
|
|
1615
|
+
* 得到视区的旋转角度
|
|
1616
|
+
* @example
|
|
1617
|
+
* ```typescript
|
|
1618
|
+
*
|
|
1619
|
+
*
|
|
1620
|
+
* ```
|
|
1621
|
+
*/
|
|
1622
|
+
getViewAngle(): number;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/**
|
|
1626
|
+
* 使用canvas大小调整侦听器 (只有在 {@link MxFun.createMxObject} 的callbakc回调中调用才有效) 不调用该方法则默认使用window窗口监听从而自动调整画布大小,canvas大小或者其canvas父级元素变化不会自动调整。
|
|
1627
|
+
* > 注意:调用方法会加载[element-resize-event-polyfill](https://www.npmjs.com/package/element-resize-event-polyfill)}依赖包 可以通过resize监听dom元素大小变化 `dom.addEventListener('resize', callback)`
|
|
1628
|
+
* > 注意: MxFun.createMxObject 方法调用后默认会依据canvasParent父级元素作为自动调整的参考大小 所以传入的canvas也会默认监听canvas父级元素,适配大小请将canvas和canvasParent当作一个整体。
|
|
1629
|
+
* @param mxdrawObj 调用{@link MxFun.createMxObject}的callback回调函数拿到的 mxDraw 对象参数
|
|
1630
|
+
* @param canvas 调用{@link MxFun?.createMxObject}的callback回调函数拿到的dom.canvas作为要监听的元素
|
|
1631
|
+
* @param time 大小监听节流函数节流时间 默认 100
|
|
1632
|
+
* @param autoAdjust 是否自动调整大小 默认true
|
|
1633
|
+
* @param callback 监听回调
|
|
1634
|
+
*/
|
|
1635
|
+
declare function useCanvasResizeListener(mxdrawObj: MxDrawObject, canvas: HTMLCanvasElement, time?: number): Promise<void>;
|
|
1636
|
+
|
|
1637
|
+
/** @module McGePoint3d */
|
|
1638
|
+
/**
|
|
1639
|
+
* McGePoint3d
|
|
1640
|
+
* @example ```typescript
|
|
1641
|
+
* ```
|
|
1642
|
+
*/
|
|
1643
|
+
interface McGePoint3d {
|
|
1644
|
+
x: number;
|
|
1645
|
+
y: number;
|
|
1646
|
+
z: number;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/** @module McGePoint3dArray */
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* McGePoint3dArray
|
|
1653
|
+
* @example ```typescript
|
|
1654
|
+
* ```
|
|
1655
|
+
*/
|
|
1656
|
+
interface McGePoint3dArray {
|
|
1657
|
+
/**
|
|
1658
|
+
*
|
|
1659
|
+
* @returns
|
|
1660
|
+
*/
|
|
1661
|
+
append(pt: McGePoint3d): void;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
interface MxassemblyType {
|
|
1665
|
+
McGePoint3d: any;
|
|
1666
|
+
McGePoint3dArray: any;
|
|
1667
|
+
McGeTool: any;
|
|
1668
|
+
}
|
|
1669
|
+
declare class MxassemblyClass {
|
|
1670
|
+
constructor();
|
|
1671
|
+
private mxassembly;
|
|
1672
|
+
private initImp;
|
|
1673
|
+
NewMcGePoint3d(x?: number, y?: number, z?: number): McGePoint3d;
|
|
1674
|
+
NewMcGePoint3dArray(aryPoint?: Array<THREE.Vector3>): McGePoint3dArray;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Mxassembly 模块
|
|
1678
|
+
* 导出库时已实例化,只需要调用实例方法 例如:
|
|
1679
|
+
* ```typescript
|
|
1680
|
+
* ```
|
|
1681
|
+
*/
|
|
1682
|
+
declare const Mxassembly: MxassemblyClass;
|
|
1683
|
+
|
|
1684
|
+
declare class MxVueComandLine {
|
|
1685
|
+
[x: string]: any;
|
|
1686
|
+
msCmdText: string;
|
|
1687
|
+
msCmdDisplay: string;
|
|
1688
|
+
msCmdTip: string;
|
|
1689
|
+
mUpDisplayFun: ((data: {
|
|
1690
|
+
msCmdTip: string;
|
|
1691
|
+
msCmdDisplay: string;
|
|
1692
|
+
msCmdText: string;
|
|
1693
|
+
}) => void) | undefined;
|
|
1694
|
+
mxFunObject: undefined;
|
|
1695
|
+
mountUpDisplayFun: (fun: ((data: {
|
|
1696
|
+
msCmdTip: string;
|
|
1697
|
+
msCmdDisplay: string;
|
|
1698
|
+
msCmdText: string;
|
|
1699
|
+
}) => void) | undefined) => void;
|
|
1700
|
+
upDisplay(): void;
|
|
1701
|
+
setCmdText: (str: string) => void;
|
|
1702
|
+
getCmdText: () => string;
|
|
1703
|
+
getCmdDisplay: () => string;
|
|
1704
|
+
setCmdDisplay: (str: string) => void;
|
|
1705
|
+
addCmdDisplay: (str: string) => void;
|
|
1706
|
+
setCmdTip: (str: string) => void;
|
|
1707
|
+
getCmdTip: () => string;
|
|
1708
|
+
}
|
|
1709
|
+
declare class MxDynamicInput {
|
|
1710
|
+
[x: string]: any;
|
|
1711
|
+
mType: number;
|
|
1712
|
+
mPos: number[];
|
|
1713
|
+
mTip: string;
|
|
1714
|
+
mValue1: string;
|
|
1715
|
+
mValue1Pos: number[];
|
|
1716
|
+
mValue2: string;
|
|
1717
|
+
mValue2Pos: number[];
|
|
1718
|
+
misShow: boolean;
|
|
1719
|
+
mOnKeydownEvent: ((arg0: any) => void) | undefined;
|
|
1720
|
+
mFocusValue: string;
|
|
1721
|
+
setFocusValue: (value: string) => void;
|
|
1722
|
+
getFocusValue: () => string;
|
|
1723
|
+
mountKeydownEvent: (fun: ((arg0: any) => void) | undefined) => void;
|
|
1724
|
+
onKeydown: (keyCode: any) => void;
|
|
1725
|
+
setType: (type: number) => void;
|
|
1726
|
+
getType: () => number;
|
|
1727
|
+
isShow: () => boolean;
|
|
1728
|
+
setPos: (pos: number[]) => void;
|
|
1729
|
+
setTip: (tip: string) => void;
|
|
1730
|
+
setValue1: (val: string) => void;
|
|
1731
|
+
getValue1: () => string;
|
|
1732
|
+
setValue1Pos: (pos: number[]) => void;
|
|
1733
|
+
setValue2: (val: string) => void;
|
|
1734
|
+
getValue2: () => string;
|
|
1735
|
+
setValue2Pos: (pos: number[]) => void;
|
|
1736
|
+
setShow: (isShow: boolean) => void;
|
|
1737
|
+
getData: () => {
|
|
1738
|
+
list: Array<{
|
|
1739
|
+
value: string;
|
|
1740
|
+
readonly: boolean;
|
|
1741
|
+
show?: boolean;
|
|
1742
|
+
pos?: number[];
|
|
1743
|
+
}>;
|
|
1744
|
+
pos: number[];
|
|
1745
|
+
postype: number;
|
|
1746
|
+
} | undefined;
|
|
1747
|
+
}
|
|
1748
|
+
declare class MxVueInterface {
|
|
1749
|
+
[x: string]: any;
|
|
1750
|
+
mSetCoordFun: ((coordTip: string) => void) | undefined;
|
|
1751
|
+
mUpdateCursorFun: ((cursorType: string) => void) | undefined;
|
|
1752
|
+
mOnKeydownEvent: ((arg0: any) => void) | undefined;
|
|
1753
|
+
mCursorType: string;
|
|
1754
|
+
mComandLine: MxVueComandLine;
|
|
1755
|
+
mdynamicInput: MxDynamicInput;
|
|
1756
|
+
mMxEvents: {
|
|
1757
|
+
[key: string]: Function;
|
|
1758
|
+
};
|
|
1759
|
+
mxFunObject: any;
|
|
1760
|
+
mFooterData: any;
|
|
1761
|
+
mLinetypeComboxData: any;
|
|
1762
|
+
mTitle: any;
|
|
1763
|
+
mTopButtonBarData: any;
|
|
1764
|
+
mMenuBarData: any;
|
|
1765
|
+
mRighButtonBarData: any;
|
|
1766
|
+
mLeftButtonBarData: any;
|
|
1767
|
+
mTitleButtonBarData: any;
|
|
1768
|
+
mLayerComboxData: any;
|
|
1769
|
+
mColorComboxData: any;
|
|
1770
|
+
mountSetCoordFun: (fun: ((coordTip: string) => void) | undefined) => void;
|
|
1771
|
+
mountUpdateCursorFun: (fun: ((cursorType: string) => void) | undefined) => void;
|
|
1772
|
+
mountKeydownEvent: (fun: ((arg0: any) => void) | undefined) => void;
|
|
1773
|
+
onKeydown: (keyCode: number) => void;
|
|
1774
|
+
setTipCoord: (str: any) => void;
|
|
1775
|
+
getCursorType: () => string;
|
|
1776
|
+
setCursorType: (curtype: string) => void;
|
|
1777
|
+
getTitle: () => any;
|
|
1778
|
+
getTopButtonBarData: () => any;
|
|
1779
|
+
getMenuBarData: () => any;
|
|
1780
|
+
getRighButtonBarData: () => any;
|
|
1781
|
+
getLeftButtonBarData: () => any;
|
|
1782
|
+
getTitleButtonBarData: () => any;
|
|
1783
|
+
getLayerComboxData: () => any;
|
|
1784
|
+
getColorComboxData: () => any;
|
|
1785
|
+
getLinetypeComboxData: () => any;
|
|
1786
|
+
getFooterData: () => any;
|
|
1787
|
+
sendStringToExecute: (sCmd: any) => void;
|
|
1788
|
+
getCmdLine: () => MxVueComandLine;
|
|
1789
|
+
getDynamicInput: () => MxDynamicInput;
|
|
1790
|
+
init: (mxFun: any) => void;
|
|
1791
|
+
OnMxEvent: (event: {
|
|
1792
|
+
[x: string]: any;
|
|
1793
|
+
}) => void;
|
|
1794
|
+
mountMxEvent: (name: string | number, call: any) => void;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
declare let mxUiData: MxVueInterface;
|
|
1798
|
+
interface CanvasParent extends HTMLElement {
|
|
1799
|
+
tabindex?: number;
|
|
1800
|
+
}
|
|
1801
|
+
interface CmdMangerType {
|
|
1802
|
+
McEdGetPointWorldDrawObjectClass(): any;
|
|
1803
|
+
getMrxDbgUiPrPointClass(): any;
|
|
1804
|
+
}
|
|
1805
|
+
interface MxFunType {
|
|
1806
|
+
createMxObject(canvasId: string, arg1: string | string[], arg2: (mxDraw: MxDrawObjectType) => void, is2d: boolean | undefined, isNewCreate?: boolean, isStaticLoad?: boolean, mapBox?: any): void;
|
|
1807
|
+
setMxServer(MXSERVER: string): void;
|
|
1808
|
+
addCommand(cmdName: string, fun: Function): void;
|
|
1809
|
+
sendStringToExecute(sCmd: string, ...params: any[]): boolean;
|
|
1810
|
+
call(cmd: string, param?: any, retfun?: Function): void;
|
|
1811
|
+
getCurrentDraw(): MxDrawObjectType;
|
|
1812
|
+
screenCoordLong2World(len: number): number;
|
|
1813
|
+
screenCoordLong2Doc(len: number): number;
|
|
1814
|
+
worldCoordLong2Doc(len: number): number;
|
|
1815
|
+
docCoordLong2World(len: number): number;
|
|
1816
|
+
docCoordLong2Screen(len: number): number;
|
|
1817
|
+
screenCoord2World(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1818
|
+
worldCoord2Screen(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1819
|
+
docCoord2World(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1820
|
+
worldCoord2Doc(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1821
|
+
screenCoord2Doc(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1822
|
+
docCoord2Screen(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
1823
|
+
updateDisplay(): void;
|
|
1824
|
+
addWindowsEvent(fun: (type: string, event: any) => number): void;
|
|
1825
|
+
isRunningCommand(): boolean;
|
|
1826
|
+
zoomW(x1: number, y1: number, x2: number, y2: number, isWorld?: boolean): void;
|
|
1827
|
+
showLayer(idLayer: number | string, isShow: boolean, isSketch?: boolean): void;
|
|
1828
|
+
acutPrintf(sval: string, ...val: string[]): void;
|
|
1829
|
+
getCurrentMxCAD(): any;
|
|
1830
|
+
getQueryString(name: string): string;
|
|
1831
|
+
setIniset(iniObj: object): void;
|
|
1832
|
+
upDisplayForLayerData(dataLayers: any): boolean;
|
|
1833
|
+
enablStaticLoad(isStaticLoad?: boolean): void;
|
|
1834
|
+
setStaticServer(server: string): void;
|
|
1835
|
+
initUiDataObject(uiDataObj: any): void;
|
|
1836
|
+
loadImageMaterial(imageUrlPath: string, callResult: (material: THREE.MeshLambertMaterial) => void): void;
|
|
1837
|
+
initMxDbEntityType(userObject: any): void;
|
|
1838
|
+
initDynamicCreate(dynCreate: any): void;
|
|
1839
|
+
openFile(sFile: string | string[], useWebsocket: boolean): boolean;
|
|
1840
|
+
getMxJigCmdManager(): CmdMangerType;
|
|
1841
|
+
loadSVG(url: string, color?: number | string | THREE.Color, callResult?: any, loadSet?: any): void;
|
|
1842
|
+
getTHREE(): typeof window.THREE;
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* MxFun 模块
|
|
1846
|
+
* 导出库时已实例化,只需要调用实例方法 例如:
|
|
1847
|
+
* ```typescript
|
|
1848
|
+
* Mx.MxFun.createMxObject
|
|
1849
|
+
* ```
|
|
1850
|
+
*/
|
|
1851
|
+
declare class MxFunClass {
|
|
1852
|
+
constructor();
|
|
1853
|
+
/**
|
|
1854
|
+
* 创建图纸展示控件实例
|
|
1855
|
+
* @param canvasId 提供一个canvas元素或者唯一的ID或者class类亦或者Jquery选中的元素
|
|
1856
|
+
* @paramType string | HTMLCanvasElement | JQuery<HTMLElement>
|
|
1857
|
+
* @param cadFile 提供要展示的图纸名称
|
|
1858
|
+
* @paramType string
|
|
1859
|
+
* @param callback 图纸展示控件创建完成后的回调函数 回调参数mxDraw和dom
|
|
1860
|
+
* @paramType function
|
|
1861
|
+
* @param isNewFile 是否新建文件
|
|
1862
|
+
* @paramType boolean
|
|
1863
|
+
* @return void
|
|
1864
|
+
* @example
|
|
1865
|
+
* ``` typescript
|
|
1866
|
+
* Mx.MxFun.createMxObject({
|
|
1867
|
+
* canvasId: "my-app",
|
|
1868
|
+
* cadFile: "test2.dwg",
|
|
1869
|
+
* callback(mxDraw, { canvas, canvasParent }) {
|
|
1870
|
+
* console.log(mxDraw, canvas, canvasParent)
|
|
1871
|
+
* },
|
|
1872
|
+
* isNewFile: true
|
|
1873
|
+
* })
|
|
1874
|
+
* ```
|
|
1875
|
+
*/
|
|
1876
|
+
createMxObject({ canvasId, cadFile, callback, isNewFile, useWebsocket, isAutoResize, mapBox, isMxCAD, userIdentitySign }: {
|
|
1877
|
+
canvasId?: string;
|
|
1878
|
+
cadFile?: string | string[];
|
|
1879
|
+
callback?: (mxDraw: MxDrawObject, dom: {
|
|
1880
|
+
canvas: HTMLCanvasElement;
|
|
1881
|
+
canvasParent: CanvasParent;
|
|
1882
|
+
}) => void;
|
|
1883
|
+
isNewFile?: boolean;
|
|
1884
|
+
useWebsocket?: boolean;
|
|
1885
|
+
isAutoResize?: boolean;
|
|
1886
|
+
mapBox?: any;
|
|
1887
|
+
isMxCAD?: boolean;
|
|
1888
|
+
userIdentitySign?: string;
|
|
1889
|
+
}): void;
|
|
1890
|
+
/**
|
|
1891
|
+
* 为程序设置服务器地址
|
|
1892
|
+
* @param MXSERVER 服务器地址
|
|
1893
|
+
* @return void
|
|
1894
|
+
* @example
|
|
1895
|
+
* ``` typescript
|
|
1896
|
+
* Mx.MxFun.setMxServer("ws://localhost:5090")
|
|
1897
|
+
* ```
|
|
1898
|
+
*/
|
|
1899
|
+
setMxServer(MXSERVER?: string): void;
|
|
1900
|
+
/**
|
|
1901
|
+
* 设置加载dwg文件,直接使用html get协议加载数据,这样就不需要梦想后台服务器程序。
|
|
1902
|
+
* @param isStaticLoad 是否启用html get协议加载数据文件
|
|
1903
|
+
* @return void
|
|
1904
|
+
* @example
|
|
1905
|
+
* ``` typescript
|
|
1906
|
+
* Mx.MxFun.enablStaticLoad(true)
|
|
1907
|
+
* ```
|
|
1908
|
+
*/
|
|
1909
|
+
enablStaticLoad(isStaticLoad?: boolean): void;
|
|
1910
|
+
/**
|
|
1911
|
+
* 设置加载dwg文件,直接使用html get协议加载数据时,使用的服务器地址。
|
|
1912
|
+
* @param server 服务网络地址.
|
|
1913
|
+
* @return void
|
|
1914
|
+
* @example
|
|
1915
|
+
* ``` typescript
|
|
1916
|
+
* Mx.MxFun.setStaticServer("http://localhost:3000/demo");
|
|
1917
|
+
* ```
|
|
1918
|
+
*/
|
|
1919
|
+
setStaticServer(server: string): void;
|
|
1920
|
+
/**
|
|
1921
|
+
* 注册命令
|
|
1922
|
+
* @param cmdName 命令名
|
|
1923
|
+
* @param fun 命令函数
|
|
1924
|
+
* @return void
|
|
1925
|
+
* @example
|
|
1926
|
+
* ``` typescript
|
|
1927
|
+
* Mx.MxFun.addCommand("draw", ()=> {
|
|
1928
|
+
* console.log("draw")
|
|
1929
|
+
* })
|
|
1930
|
+
* ```
|
|
1931
|
+
*/
|
|
1932
|
+
addCommand(cmdName: string, fun: Function): void;
|
|
1933
|
+
/**
|
|
1934
|
+
* 执行命令
|
|
1935
|
+
* @param cmdName 命令名
|
|
1936
|
+
* @return boolean 命令执行成功为true
|
|
1937
|
+
* @example
|
|
1938
|
+
* ``` typescript
|
|
1939
|
+
* if(Mx.MxFun.sendStringToExecute("draw")) {
|
|
1940
|
+
* console.log("成功执行draw命令")
|
|
1941
|
+
* }
|
|
1942
|
+
* ```
|
|
1943
|
+
*/
|
|
1944
|
+
sendStringToExecute(cmdName: string, ...ages: any[]): boolean;
|
|
1945
|
+
/**
|
|
1946
|
+
* 调用后台服务程序中的NodeJS用户定义函数 后台程序使用Mx.MxFun.registFun注册用户定义函数
|
|
1947
|
+
* @param funName 函数名
|
|
1948
|
+
* @param param 函数参数
|
|
1949
|
+
* @param retfun 函数返回值回调
|
|
1950
|
+
* @return void
|
|
1951
|
+
* @example
|
|
1952
|
+
* ``` typescript
|
|
1953
|
+
* Mx.MxFun.call("getDrawObject", {
|
|
1954
|
+
* cadFile: "test.dwg"
|
|
1955
|
+
* }, (res)=> {
|
|
1956
|
+
* console.log(res)
|
|
1957
|
+
* })
|
|
1958
|
+
* ```
|
|
1959
|
+
*/
|
|
1960
|
+
call(funName: string, param?: any, retfun?: Function): void;
|
|
1961
|
+
/**
|
|
1962
|
+
* 获取当前绘图控件对象
|
|
1963
|
+
* @return MxDrawObjectType 当前绘图控件对象
|
|
1964
|
+
* @example
|
|
1965
|
+
* ``` typescript
|
|
1966
|
+
* const mxDraw = Mx.MxFun.getCurrentDraw()
|
|
1967
|
+
* mxDraw.getScene()
|
|
1968
|
+
* ```
|
|
1969
|
+
*/
|
|
1970
|
+
getCurrentDraw(): MxDrawObject;
|
|
1971
|
+
/**
|
|
1972
|
+
* 获得到当前数据库对象.
|
|
1973
|
+
* @return MxDbDatabase
|
|
1974
|
+
* @example
|
|
1975
|
+
* ``` typescript
|
|
1976
|
+
* ```
|
|
1977
|
+
*/
|
|
1978
|
+
getCurrentDatabase(): MxDbDatabase;
|
|
1979
|
+
/**
|
|
1980
|
+
* 屏幕坐标长度转THREE.JS坐标长度
|
|
1981
|
+
* @param len 屏幕坐标长度
|
|
1982
|
+
* @return number THREE.JS坐标长度
|
|
1983
|
+
* @example
|
|
1984
|
+
* ``` typescript
|
|
1985
|
+
* const len = Mx.MxFun.screenCoordLong2World(36)
|
|
1986
|
+
* console.log(len)
|
|
1987
|
+
* ```
|
|
1988
|
+
*/
|
|
1989
|
+
screenCoordLong2World(len: number): number;
|
|
1990
|
+
/**
|
|
1991
|
+
* 屏幕坐标长度转文档坐标长度
|
|
1992
|
+
* @param len 屏幕坐标长度
|
|
1993
|
+
* @return number 文档坐标长度
|
|
1994
|
+
* @example
|
|
1995
|
+
* ``` typescript
|
|
1996
|
+
* const len = Mx.MxFun.screenCoordLong2Doc(36)
|
|
1997
|
+
* console.log(len)
|
|
1998
|
+
* ```
|
|
1999
|
+
*/
|
|
2000
|
+
screenCoordLong2Doc(len: number): number;
|
|
2001
|
+
/**
|
|
2002
|
+
* 文档坐标长度转屏幕坐标长度
|
|
2003
|
+
* @param len 文档坐标长度
|
|
2004
|
+
* @return number 屏幕坐标长度
|
|
2005
|
+
* @example
|
|
2006
|
+
* ``` typescript
|
|
2007
|
+
* const len = Mx.MxFun.docCoordLong2Screen(36)
|
|
2008
|
+
* console.log(len)
|
|
2009
|
+
* ```
|
|
2010
|
+
*/
|
|
2011
|
+
docCoordLong2Screen(len: number): number;
|
|
2012
|
+
/**
|
|
2013
|
+
* THREE.JS坐标长度转屏幕坐标长度
|
|
2014
|
+
* @param len THREE.JS坐标长度
|
|
2015
|
+
* @return number 屏幕坐标长度
|
|
2016
|
+
* @example
|
|
2017
|
+
* ``` typescript
|
|
2018
|
+
* const len = Mx.MxFun.worldCoordLong2Doc(36)
|
|
2019
|
+
* console.log(len)
|
|
2020
|
+
* ```
|
|
2021
|
+
*/
|
|
2022
|
+
worldCoordLong2Doc(len: number): number;
|
|
2023
|
+
/**
|
|
2024
|
+
* DWG文档坐标长度到ThreeJS坐标长度
|
|
2025
|
+
* @returns number
|
|
2026
|
+
* @example
|
|
2027
|
+
* ```typescript
|
|
2028
|
+
*
|
|
2029
|
+
*
|
|
2030
|
+
* ```
|
|
2031
|
+
*/
|
|
2032
|
+
docCoordLong2World(l: number): number;
|
|
2033
|
+
/**
|
|
2034
|
+
* 屏幕坐标转THREE.JS坐标.
|
|
2035
|
+
* @param x 坐标x
|
|
2036
|
+
* @param y 坐标y
|
|
2037
|
+
* @param z 坐标z
|
|
2038
|
+
* @return THREE.Vector3 THREE.JS坐标
|
|
2039
|
+
* @example
|
|
2040
|
+
* ``` typescript
|
|
2041
|
+
* const vector3 = Mx.MxFun.screenCoord2World(36, 21, 0)
|
|
2042
|
+
* console.log(vector3)
|
|
2043
|
+
* ```
|
|
2044
|
+
*/
|
|
2045
|
+
screenCoord2World(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
2046
|
+
/**
|
|
2047
|
+
* THREE.JS坐标转屏幕坐标.,屏幕坐标的Y轴向下。坐标原点在左上角.
|
|
2048
|
+
* @param x 坐标x
|
|
2049
|
+
* @param y 坐标y
|
|
2050
|
+
* @param z 坐标z
|
|
2051
|
+
* @return THREE.Vector3 屏幕坐标
|
|
2052
|
+
* @example
|
|
2053
|
+
* ``` typescript
|
|
2054
|
+
* const vector3 = Mx.MxFun.worldCoord2Screen(36, 21, 0)
|
|
2055
|
+
* console.log(vector3)
|
|
2056
|
+
* ```
|
|
2057
|
+
*/
|
|
2058
|
+
worldCoord2Screen(x: number | THREE.Vector3, y?: number, z?: number): THREE.Vector3;
|
|
2059
|
+
/**
|
|
2060
|
+
* 文档坐标转THREE.JS坐标
|
|
2061
|
+
* 说明: 文档坐标,THREE.JS坐标的X轴都是从左到右,Y轴是下到上,但是屏幕像素坐标系:X轴都是从左到右,Y轴是上到下
|
|
2062
|
+
* @param x 坐标x
|
|
2063
|
+
* @param y 坐标y
|
|
2064
|
+
* @param z 坐标z
|
|
2065
|
+
* @return THREE.Vector3 THREE.JS坐标
|
|
2066
|
+
* @example
|
|
2067
|
+
* ``` typescript
|
|
2068
|
+
* const vector3 = Mx.MxFun.docCoord2World(36, 21, 0)
|
|
2069
|
+
* console.log(vector3)
|
|
2070
|
+
* ```
|
|
2071
|
+
*/
|
|
2072
|
+
docCoord2World(x: number, y: number, z: number): THREE.Vector3;
|
|
2073
|
+
/**
|
|
2074
|
+
* THREE.JS坐标转文档坐标.
|
|
2075
|
+
* @param x 坐标x
|
|
2076
|
+
* @param y 坐标y
|
|
2077
|
+
* @param z 坐标z
|
|
2078
|
+
* @return THREE.Vector3 文档坐标
|
|
2079
|
+
* @example
|
|
2080
|
+
* ``` typescript
|
|
2081
|
+
* const vector3 = Mx.MxFun.worldCoord2Doc(36, 21, 0)
|
|
2082
|
+
* console.log(vector3)
|
|
2083
|
+
* ```
|
|
2084
|
+
*/
|
|
2085
|
+
worldCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
2086
|
+
/**
|
|
2087
|
+
* 屏幕转文档坐标
|
|
2088
|
+
* @param x 坐标x
|
|
2089
|
+
* @param y 坐标y
|
|
2090
|
+
* @param z 坐标z
|
|
2091
|
+
* @return THREE.Vector3 文档坐标
|
|
2092
|
+
* @example
|
|
2093
|
+
* ``` typescript
|
|
2094
|
+
* const vector3 = Mx.MxFun.screenCoord2Doc(36, 21, 0)
|
|
2095
|
+
* console.log(vector3)
|
|
2096
|
+
* ```
|
|
2097
|
+
*/
|
|
2098
|
+
screenCoord2Doc(x: number | THREE.Vector3, y?: number): THREE.Vector3;
|
|
2099
|
+
/**
|
|
2100
|
+
* 文档转屏幕坐标.
|
|
2101
|
+
* @param x 坐标x
|
|
2102
|
+
* @param y 坐标y
|
|
2103
|
+
* @param z 坐标z
|
|
2104
|
+
* @return THREE.Vector3 屏幕坐标
|
|
2105
|
+
* @example
|
|
2106
|
+
* ``` typescript
|
|
2107
|
+
* const vector3 = Mx.MxFun.docCoord2Screen(36, 21, 0)
|
|
2108
|
+
* console.log(vector3)
|
|
2109
|
+
* ```
|
|
2110
|
+
*/
|
|
2111
|
+
docCoord2Screen(x: number | THREE.Vector3, y?: number): THREE.Vector3;
|
|
2112
|
+
/**
|
|
2113
|
+
* 更新显示,使用Three.js绘制了对象,调用该函数更新显示。
|
|
2114
|
+
* @return void
|
|
2115
|
+
* @example
|
|
2116
|
+
* ``` typescript
|
|
2117
|
+
* Mx.MxFun.updateDisplay()
|
|
2118
|
+
* ```
|
|
2119
|
+
*/
|
|
2120
|
+
updateDisplay(): void;
|
|
2121
|
+
/**
|
|
2122
|
+
* 设置窗口鼠标等事件的回调操作
|
|
2123
|
+
* @param fun 参数1 type: 鼠标事件类型 "mouseup"鼠标释放 、"mousedown" 鼠标按下 参数2 event:事件对象 返回值: number 为0,表示事件往下传递,如果非0,表示事件已经被处理,不要往下传递了
|
|
2124
|
+
* @return void
|
|
2125
|
+
* @example
|
|
2126
|
+
* ``` typescript
|
|
2127
|
+
* Mx.MxFun.addWindowsEvent((type, event)=> {
|
|
2128
|
+
* console.log(event)
|
|
2129
|
+
* if(type = "mouseup") {
|
|
2130
|
+
* console.log("鼠标释放")
|
|
2131
|
+
* }else {
|
|
2132
|
+
* console.log("鼠标按下")
|
|
2133
|
+
* }
|
|
2134
|
+
* // 事件往下传递
|
|
2135
|
+
* // return 0
|
|
2136
|
+
* // 事件已处理不再传递
|
|
2137
|
+
* return -1
|
|
2138
|
+
* })
|
|
2139
|
+
* ```
|
|
2140
|
+
*/
|
|
2141
|
+
addWindowsEvent(fun: (type: string, event: any) => number): void;
|
|
2142
|
+
/**
|
|
2143
|
+
* 当前是否有命令在运行
|
|
2144
|
+
* @return boolean
|
|
2145
|
+
* @example
|
|
2146
|
+
* ``` typescript
|
|
2147
|
+
* if(Mx.MxFun.isRunningCommand()) {
|
|
2148
|
+
* // 当前已有命令在运行
|
|
2149
|
+
* }
|
|
2150
|
+
* ```
|
|
2151
|
+
*/
|
|
2152
|
+
isRunningCommand(): boolean;
|
|
2153
|
+
/**
|
|
2154
|
+
* 窗口缩放,把指定的范围内的图形放到视区中
|
|
2155
|
+
* @param dLBx 矩形框范围的左下角X坐标
|
|
2156
|
+
* @param dLBy 矩形框范围的左下角X坐标
|
|
2157
|
+
* @param dRTx 矩形框范围的左下角X坐标
|
|
2158
|
+
* @param dRTy 矩形框范围的左下角X坐标
|
|
2159
|
+
* @param isWorld 传入的坐标是否是thruee.js坐标,默认传文档坐标
|
|
2160
|
+
* @return void
|
|
2161
|
+
* @example
|
|
2162
|
+
* ``` typescript
|
|
2163
|
+
* Mx.MxFun.zoomW(21, 22, 300, 310, false)
|
|
2164
|
+
* ```
|
|
2165
|
+
*/
|
|
2166
|
+
zoomW(dLBx: number, dLBy: number, dRTx: number, dRTy: number, isWorld?: boolean): void;
|
|
2167
|
+
/**
|
|
2168
|
+
* 显示或隐藏图层
|
|
2169
|
+
* @param idLayer 图层id,或层名
|
|
2170
|
+
* @param isShow 是否显示
|
|
2171
|
+
* @param isSketch 暂不使用
|
|
2172
|
+
* @return void
|
|
2173
|
+
* @example
|
|
2174
|
+
* ``` typescript
|
|
2175
|
+
* Mx.MxFun.showLayer(366, true, false)
|
|
2176
|
+
* Mx.MxFun.showLayer("2363", fasle, false)
|
|
2177
|
+
* ```
|
|
2178
|
+
*/
|
|
2179
|
+
showLayer(idLayer: number | string, isShow: boolean, isSketch?: boolean): void;
|
|
2180
|
+
/**
|
|
2181
|
+
* 输出字符串到命令行.
|
|
2182
|
+
* @param sval 输出字符串
|
|
2183
|
+
* @param ...val 剩余参数 命令cmd
|
|
2184
|
+
* @return void
|
|
2185
|
+
* @example
|
|
2186
|
+
* ``` typescript
|
|
2187
|
+
* Mx.MxFun.acutPrintf("{0}:", "draw")
|
|
2188
|
+
* ```
|
|
2189
|
+
*/
|
|
2190
|
+
acutPrintf: ((sval: string, ...val: string[]) => void) | undefined;
|
|
2191
|
+
/**
|
|
2192
|
+
* 获取当前MxCAD对象,该函数在MxCAD模式下使用
|
|
2193
|
+
* @return MxDrawObjectType MxCAD对象
|
|
2194
|
+
* @example
|
|
2195
|
+
* ``` typescript
|
|
2196
|
+
* const mxcad = Mx.MxFun.getCurrentMxCAD()
|
|
2197
|
+
* console.log(mxcad)
|
|
2198
|
+
* ```
|
|
2199
|
+
*/
|
|
2200
|
+
getCurrentMxCAD(): MxCADObject;
|
|
2201
|
+
/**
|
|
2202
|
+
* 得到地址栏参数
|
|
2203
|
+
* @param name
|
|
2204
|
+
* @return string 地址栏参数
|
|
2205
|
+
* @example
|
|
2206
|
+
* ``` typescript
|
|
2207
|
+
* if(Mx.MxFun.getQueryString("mousetest") === "y")
|
|
2208
|
+
* ```
|
|
2209
|
+
*/
|
|
2210
|
+
getQueryString(name: string): string;
|
|
2211
|
+
/**
|
|
2212
|
+
* 设置控件的配制参数.
|
|
2213
|
+
* @param name
|
|
2214
|
+
* @return object 配制参数.
|
|
2215
|
+
* @example
|
|
2216
|
+
* ``` typescript
|
|
2217
|
+
* Mx.MxFun.setIniset({
|
|
2218
|
+
* EnableIntelliSelect: true
|
|
2219
|
+
* })
|
|
2220
|
+
* ```
|
|
2221
|
+
*/
|
|
2222
|
+
setIniset(iniObj: object): void;
|
|
2223
|
+
/**
|
|
2224
|
+
* 更新图纸图层数据
|
|
2225
|
+
* @param dataLayers
|
|
2226
|
+
* @return boolean 更新成功或失败
|
|
2227
|
+
* @example
|
|
2228
|
+
* ``` typescript
|
|
2229
|
+
* if(Mx.MxFun.upDisplayForLayerData({
|
|
2230
|
+
*
|
|
2231
|
+
* })) {
|
|
2232
|
+
* console.log("更新成功")
|
|
2233
|
+
* }
|
|
2234
|
+
* ```
|
|
2235
|
+
*/
|
|
2236
|
+
upDisplayForLayerData(dataLayers: any): boolean;
|
|
2237
|
+
/**
|
|
2238
|
+
* 初始化插件的UI数据对象。
|
|
2239
|
+
* @param uiDataObj
|
|
2240
|
+
* @return
|
|
2241
|
+
* @example
|
|
2242
|
+
* ``` typescript
|
|
2243
|
+
* ```
|
|
2244
|
+
*/
|
|
2245
|
+
initUiDataObject(uiDataObj: typeof mxUiData): void;
|
|
2246
|
+
/**
|
|
2247
|
+
* 获取UI数据对象
|
|
2248
|
+
* @param uiDataObj
|
|
2249
|
+
* @return mxUiData
|
|
2250
|
+
* @example
|
|
2251
|
+
* ``` typescript
|
|
2252
|
+
* ```
|
|
2253
|
+
*/
|
|
2254
|
+
getUIData(): MxVueInterface;
|
|
2255
|
+
/**
|
|
2256
|
+
* 梦想开发测试
|
|
2257
|
+
* @param p
|
|
2258
|
+
* @return any
|
|
2259
|
+
* @example
|
|
2260
|
+
* ``` typescript
|
|
2261
|
+
* console.log(Mx.MxFun.TestMX());
|
|
2262
|
+
* ```
|
|
2263
|
+
*/
|
|
2264
|
+
testMX(p?: any): any;
|
|
2265
|
+
/**
|
|
2266
|
+
* 加载一个图片对象,返回Three.js材质对象,该函数具有缓存功能,下次加载同样的图片,可以直接返回.
|
|
2267
|
+
* @param p
|
|
2268
|
+
* @return any
|
|
2269
|
+
* @example
|
|
2270
|
+
* ``` typescript
|
|
2271
|
+
*
|
|
2272
|
+
* ```
|
|
2273
|
+
*/
|
|
2274
|
+
loadImageMaterial(imageUrlPath: string, callResult: (material: THREE.MeshLambertMaterial) => void | null): Promise<THREE.MeshLambertMaterial | null>;
|
|
2275
|
+
/**
|
|
2276
|
+
* 重新打开cad文件,该函数在控件创建完后,需要再次重新打开文件,调用。
|
|
2277
|
+
* @param sFile 打的cad文件路径
|
|
2278
|
+
* @return any
|
|
2279
|
+
* @example
|
|
2280
|
+
* ``` typescript
|
|
2281
|
+
* ```
|
|
2282
|
+
*/
|
|
2283
|
+
openFile(sFile: string | string[], useWebsocket?: boolean): boolean;
|
|
2284
|
+
/**
|
|
2285
|
+
* 添加一个MxDbEntity实体到当前绘图对象上。
|
|
2286
|
+
* @param ent 实体对象
|
|
2287
|
+
* @returns number 返回对象的id.
|
|
2288
|
+
* @example
|
|
2289
|
+
* ```typescript
|
|
2290
|
+
*
|
|
2291
|
+
*
|
|
2292
|
+
* ```
|
|
2293
|
+
*/
|
|
2294
|
+
addToCurrentSpace(ent: MxDbEntity): number;
|
|
2295
|
+
/**
|
|
2296
|
+
* 在图上选择一个对象。
|
|
2297
|
+
* @param strPrompt 提示字符串
|
|
2298
|
+
* @param filter 过滤条件
|
|
2299
|
+
* @returns number 返回对象的id
|
|
2300
|
+
* @example
|
|
2301
|
+
* ```typescript
|
|
2302
|
+
*
|
|
2303
|
+
*
|
|
2304
|
+
* ```
|
|
2305
|
+
*/
|
|
2306
|
+
selectEnt(strPrompt: string, filter?: any): Promise<number>;
|
|
2307
|
+
/**
|
|
2308
|
+
* 监听命令行消息动态更新的数据
|
|
2309
|
+
* 在取点对象中设置的命令以及我们提供的图形对象中是有一套命令提示和参数化绘图,而该回调函数主要用来监听消息变化
|
|
2310
|
+
* @parma callback 回调函数中data中的msCmdTip表示命令提示 msCmdText表示当前用户输入的输入内容 msCmdDisplay表示所有的消息记录
|
|
2311
|
+
* */
|
|
2312
|
+
listenForCommandLineInput(callback: ((data: {
|
|
2313
|
+
msCmdTip: string;
|
|
2314
|
+
msCmdDisplay: string;
|
|
2315
|
+
msCmdText: string;
|
|
2316
|
+
}) => void) | undefined): void;
|
|
2317
|
+
/**
|
|
2318
|
+
* 设置命令行消息数据 (在监听input输入框的onKeydown事件的回调函数中调用)
|
|
2319
|
+
* @param msCmdText 用户输入的数据 input输入框输入的文本信息
|
|
2320
|
+
* @param keyCode 按键Code input输入框的onKeydown事件的event事件对象的keyCode属性
|
|
2321
|
+
* */
|
|
2322
|
+
setCommandLineInputData(msCmdText: string, keyCode: number): void;
|
|
2323
|
+
/**
|
|
2324
|
+
* 监听指针(鼠标光标)移动变化的坐标信息
|
|
2325
|
+
* @parma callback 回调函数中返回坐标信息
|
|
2326
|
+
* */
|
|
2327
|
+
listenForCoordTip(callback: (coordTip: string) => void): void;
|
|
2328
|
+
/**
|
|
2329
|
+
* 监听光标更新
|
|
2330
|
+
* @parma cursorType当前使用的光标类型
|
|
2331
|
+
* */
|
|
2332
|
+
listenForUpdateCursor: (callback: ((cursorType: string) => void) | undefined) => void;
|
|
2333
|
+
/**
|
|
2334
|
+
* 返回mxfun.min.js中的THREE.JS对象,可以用它来创建mxfun.min.js中THREE对象。
|
|
2335
|
+
* */
|
|
2336
|
+
getMxFunTHREE(): any;
|
|
2337
|
+
/**
|
|
2338
|
+
* 返回mxfun.min.js中的ThreeJsTool对象
|
|
2339
|
+
* */
|
|
2340
|
+
getMxFunThreeTool(): any;
|
|
2341
|
+
/**
|
|
2342
|
+
* 创建十字光标图片
|
|
2343
|
+
* */
|
|
2344
|
+
ceneratecursor(cursorSize?: number, squareSize?: number, isRoss?: boolean): HTMLImageElement;
|
|
2345
|
+
/**
|
|
2346
|
+
* 调用服务器后台CAD命令.
|
|
2347
|
+
* */
|
|
2348
|
+
callCommand(cmd: string, param: string, retCall?: (param: any) => void): any;
|
|
2349
|
+
/**
|
|
2350
|
+
* CAD坐标到文档坐标.
|
|
2351
|
+
* 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
|
|
2352
|
+
* @returns number
|
|
2353
|
+
* @example
|
|
2354
|
+
* ```typescript
|
|
2355
|
+
*
|
|
2356
|
+
*
|
|
2357
|
+
* ```
|
|
2358
|
+
*/
|
|
2359
|
+
cadCoord2Doc(x: number, y: number, z: number): THREE.Vector3;
|
|
2360
|
+
/**
|
|
2361
|
+
* 文档坐标坐标到CAD.
|
|
2362
|
+
* 默认情况下,cad等于doc,当前m_isCorrectLargeCoordinates为true时,doc变成了把cad图纸修改到小范围坐标系下的坐标。
|
|
2363
|
+
* @returns number
|
|
2364
|
+
* @example
|
|
2365
|
+
* ```typescript
|
|
2366
|
+
*
|
|
2367
|
+
*
|
|
2368
|
+
* ```
|
|
2369
|
+
*/
|
|
2370
|
+
docCoord2Cad(x: number, y: number, z: number): THREE.Vector3;
|
|
2371
|
+
/**
|
|
2372
|
+
* 通过id得到对象.
|
|
2373
|
+
* @returns 返MxDbEntity
|
|
2374
|
+
* @example
|
|
2375
|
+
* ```typescript
|
|
2376
|
+
*
|
|
2377
|
+
*
|
|
2378
|
+
* ```
|
|
2379
|
+
*/
|
|
2380
|
+
getMxEntity(id: number): MxDbEntity | undefined;
|
|
2381
|
+
}
|
|
2382
|
+
declare const MxFun: MxFunClass;
|
|
2383
|
+
|
|
2384
|
+
declare class PubSub {
|
|
2385
|
+
events: {
|
|
2386
|
+
[x: string]: Function[];
|
|
2387
|
+
};
|
|
2388
|
+
constructor();
|
|
2389
|
+
/**
|
|
2390
|
+
* 订阅
|
|
2391
|
+
* @param event 事件名称
|
|
2392
|
+
* @param callback 事件回调
|
|
2393
|
+
*/
|
|
2394
|
+
on(event: string, callback: Function): [] | number;
|
|
2395
|
+
/**
|
|
2396
|
+
* 发布
|
|
2397
|
+
* @param event 事件名称
|
|
2398
|
+
* @param data 载荷
|
|
2399
|
+
*/
|
|
2400
|
+
emit<T>(event: string | number, ...data: T | any): any[];
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
declare class Store<T extends {}> {
|
|
2404
|
+
actions: {
|
|
2405
|
+
[x: string | number]: Function;
|
|
2406
|
+
};
|
|
2407
|
+
mutations: {
|
|
2408
|
+
[x: string | number]: Function;
|
|
2409
|
+
};
|
|
2410
|
+
state: T;
|
|
2411
|
+
status: string;
|
|
2412
|
+
events: PubSub;
|
|
2413
|
+
constructor(params: {
|
|
2414
|
+
state: T;
|
|
2415
|
+
mutations: {
|
|
2416
|
+
[x: string | number]: Function;
|
|
2417
|
+
};
|
|
2418
|
+
actions: {
|
|
2419
|
+
[x: string | number]: Function;
|
|
2420
|
+
};
|
|
2421
|
+
});
|
|
2422
|
+
/**
|
|
2423
|
+
* 调用active方法 触发修改状态前的异步行为
|
|
2424
|
+
* @param actionKey 方法名称
|
|
2425
|
+
* @param payload 执行参数
|
|
2426
|
+
*/
|
|
2427
|
+
dispatch<T>(actionKey: string | number, payload: T | any): boolean;
|
|
2428
|
+
/**
|
|
2429
|
+
* 调用mutation 的方法 修改state中属性的状态
|
|
2430
|
+
* @param mutationKey 方法名称
|
|
2431
|
+
* @param payload 执行参数
|
|
2432
|
+
*/
|
|
2433
|
+
commit<T>(mutationKey: string | number, payload: T | any): boolean;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
declare type stateType = {
|
|
2437
|
+
[x: string]: any;
|
|
2438
|
+
MxFun: MxFunType | null;
|
|
2439
|
+
Mxassembly: MxassemblyType | null;
|
|
2440
|
+
isCreateDrawObj: boolean;
|
|
2441
|
+
};
|
|
2442
|
+
declare const store: Store<stateType>;
|
|
2443
|
+
|
|
2444
|
+
/**
|
|
2445
|
+
* MxThreeJS 模块
|
|
2446
|
+
* ##### 使用说明:
|
|
2447
|
+
*
|
|
2448
|
+
* > 基于three.js实现创建直线对象、加载图片、SVG等功能,以下是使用的流程:
|
|
2449
|
+
* - 模块中大部分方法返回的{@link http://www.yanhuangxueyuan.com/threejs/docs/index.html#api/zh/core/Object3D | THREE.Object3D}类型继承创建的对象都可以通过取点对象{@link MrxDbgUiPrPointClass.value} 得到鼠标对应位置
|
|
2450
|
+
* - {@link MrxDbgUiPrPointClass.go}和{@link MrxDbgUiPrPointClass.goWhile}方法监听鼠标点击事件回调中通过
|
|
2451
|
+
* - {@link MxDrawObject.addObject} 方法添加到场景{@link MxDrawObject.getScene}中
|
|
2452
|
+
* - 最后调用{@link MxFun.updateDisplay} 更新视图显示完成
|
|
2453
|
+
*
|
|
2454
|
+
* > 提示: 在实际开发中MxThreeJS是配合着{@link MxDrawObject} 和 {@link MrxDbgUiPrPointClass} 完成绘制线段、文字、图片等功能,当然你也可以使用{@link http://www.yanhuangxueyuan.com/threejs/docs/index.html | three.js}来完成MxThreeJS模块的这些工作
|
|
2455
|
+
*
|
|
2456
|
+
* > 该模块导出库时已实例化为对象,只需要调用实例方法 例如:
|
|
2457
|
+
*
|
|
2458
|
+
* ```typescript
|
|
2459
|
+
* // html
|
|
2460
|
+
* <button id="line">line</button>
|
|
2461
|
+
*
|
|
2462
|
+
* // js
|
|
2463
|
+
* import Mx from "mxdraw"
|
|
2464
|
+
* import Three from "three"
|
|
2465
|
+
* Mx.loadCoreCode().then(()=> {
|
|
2466
|
+
* Mx.MxFun.setMxServer()
|
|
2467
|
+
* Mx.MxFun.createMxObject({
|
|
2468
|
+
* callback(mxDraw, dom) {
|
|
2469
|
+
* document.getElementById("line").onclick = ()=> {
|
|
2470
|
+
* const getPoint = new Mx.MrxDbgUiPrPointClass()
|
|
2471
|
+
* let lastPt, isLine
|
|
2472
|
+
* getPoint.goWhile(()=> {
|
|
2473
|
+
* const pt1 = getPoint.value()
|
|
2474
|
+
* if(isLine) {
|
|
2475
|
+
* const line = Mx.MxThreeJS.createLine(pt1, lastPt, 0xffffff)
|
|
2476
|
+
* const currentDraw = Mx.MxFun.getCurrentDraw()
|
|
2477
|
+
* currentDraw.addObject(line)
|
|
2478
|
+
* Mx.MxFun.updateDisplay()
|
|
2479
|
+
* }
|
|
2480
|
+
* lastPt = pt1.clone()
|
|
2481
|
+
* isLine = !isLine
|
|
2482
|
+
* })
|
|
2483
|
+
* }
|
|
2484
|
+
* }
|
|
2485
|
+
* })
|
|
2486
|
+
* })
|
|
2487
|
+
* ```
|
|
2488
|
+
*/
|
|
2489
|
+
declare class MxThreeJS$1 {
|
|
2490
|
+
/**
|
|
2491
|
+
* 创建Three.js直线对象。
|
|
2492
|
+
* @param vPt1 {@link http://www.yanhuangxueyuan.com/threejs/docs/index.html#api/zh/math/Vector3 | THREE.Vector3} 点1
|
|
2493
|
+
* @param vPt2 {@link http://www.yanhuangxueyuan.com/threejs/docs/index.html#api/zh/math/Vector3 | THREE.Vector3} 点2
|
|
2494
|
+
* @param iColor 颜色Color
|
|
2495
|
+
* @returns {@link http://www.yanhuangxueyuan.com/threejs/docs/index.html#api/zh/objects/Line |THREE.Line}
|
|
2496
|
+
* @example
|
|
2497
|
+
* ```typescript
|
|
2498
|
+
* Mx.MxThreeJS.createLine(new Three.Vector3(1,10,0), new Three.Vector3(1,300,0), 0)
|
|
2499
|
+
* ```
|
|
2500
|
+
*/
|
|
2501
|
+
createLine(vPt1: THREE.Vector3, vPt2: THREE.Vector3, iColor: number | string | THREE.Color): THREE.Line;
|
|
2502
|
+
/**
|
|
2503
|
+
* 创建Three.js圆对象。
|
|
2504
|
+
* @param mCenterPt 圆中心点
|
|
2505
|
+
* @param dRadius 圆半径
|
|
2506
|
+
* @param iColor 颜色
|
|
2507
|
+
* @returns THREE.Object3D
|
|
2508
|
+
* @example
|
|
2509
|
+
* ```typescript
|
|
2510
|
+
* Mx.MxThreeJS.createCircle(new Three.Vector3(1,10,0), 10, 0)
|
|
2511
|
+
* ```
|
|
2512
|
+
*/
|
|
2513
|
+
createCircle(mCenterPt: THREE.Vector3, dRadius: number, iColor: number | string | THREE.Color): THREE.Object3D;
|
|
2514
|
+
/**
|
|
2515
|
+
* 创建Three.js点对象。
|
|
2516
|
+
* @param mPt 点位置
|
|
2517
|
+
* @param iColor 颜色
|
|
2518
|
+
* @returns THREE.Points
|
|
2519
|
+
* @example
|
|
2520
|
+
* ```typescript
|
|
2521
|
+
* Mx.MxThreeJS.createPoint(new Three.Vector3(1,10,0), 0)
|
|
2522
|
+
* ```
|
|
2523
|
+
*/
|
|
2524
|
+
createPoint(mPt: THREE.Vector3, iColor: number | string | THREE.Color): THREE.Points;
|
|
2525
|
+
/**
|
|
2526
|
+
* 创建Three.js 文字
|
|
2527
|
+
* @param message 文字信息
|
|
2528
|
+
* @param pt 位置
|
|
2529
|
+
* @param iSize 文字大小
|
|
2530
|
+
* @param fAngle 旋转角度
|
|
2531
|
+
* @param iColor 颜色
|
|
2532
|
+
* @returns THREE.Sprite
|
|
2533
|
+
* @example
|
|
2534
|
+
* ```typescript
|
|
2535
|
+
* Mx.MxThreeJS.creatTextSprite("hello",new Three.Vector3(1,10,0), 90, 60, 0)
|
|
2536
|
+
* ```
|
|
2537
|
+
*/
|
|
2538
|
+
creatTextSprite(message: string, pt: THREE.Vector3, iSize: number, fAngle: number, iColor: number): THREE.Sprite | null;
|
|
2539
|
+
/**
|
|
2540
|
+
* 计算creatTextSprite函数,创建的文字对象,的尺寸.
|
|
2541
|
+
* @param message 文字信息
|
|
2542
|
+
* @param iHeight 文字大小
|
|
2543
|
+
* @param iWidth 文字宽度.
|
|
2544
|
+
* @returns {spritewidth:number,spriteheight:number,textwidth:number,singleline:boolean}
|
|
2545
|
+
* @example
|
|
2546
|
+
* ```typescript
|
|
2547
|
+
*
|
|
2548
|
+
* ```
|
|
2549
|
+
*/
|
|
2550
|
+
clacTextSpriteSize(message: string, iHeight: number, iWidth?: number): any;
|
|
2551
|
+
/**
|
|
2552
|
+
* 计算文字宽度.
|
|
2553
|
+
* @param message 文字信息
|
|
2554
|
+
* @param iHeight 文字大小
|
|
2555
|
+
* @returns number
|
|
2556
|
+
* @example
|
|
2557
|
+
* ```typescript
|
|
2558
|
+
*
|
|
2559
|
+
* ```
|
|
2560
|
+
*/
|
|
2561
|
+
clacTextSize(message: string, iHeight: number): number;
|
|
2562
|
+
/**
|
|
2563
|
+
* 根据三角形数组,创建Three.js Mesh
|
|
2564
|
+
* @param points 由三个点组成的数组
|
|
2565
|
+
* @param iColor 颜色
|
|
2566
|
+
* @param opacity 透明度
|
|
2567
|
+
* @returns THREE.Mesh
|
|
2568
|
+
* @example
|
|
2569
|
+
* ```typescript
|
|
2570
|
+
* Mx.MxThreeJS.createTriangle(
|
|
2571
|
+
* [new THREE.Vector3(1,2,2),new THREE.Vector3(1,65,4),new THREE.Vector3(12,2,2)],
|
|
2572
|
+
* 0,
|
|
2573
|
+
* 1
|
|
2574
|
+
* )
|
|
2575
|
+
* ```
|
|
2576
|
+
*/
|
|
2577
|
+
createTriangle(points: Array<THREE.Vector3>, iColor: number | string | THREE.Color, opacity?: number): THREE.Mesh | null;
|
|
2578
|
+
/**
|
|
2579
|
+
* 创建连续直线
|
|
2580
|
+
* @param points 由多个点组成的数组
|
|
2581
|
+
* @param iColor 颜色
|
|
2582
|
+
* @returns THREE.Line
|
|
2583
|
+
* @example
|
|
2584
|
+
* ```typescript
|
|
2585
|
+
* Mx.MxThreeJS.createLines([new THREE.Vector3(1,2,2),new THREE.Vector3(1,65,4),new THREE.Vector3(12,2,2)], 0)
|
|
2586
|
+
* ```
|
|
2587
|
+
*/
|
|
2588
|
+
createLines(points: Array<THREE.Vector3>, iColor: number | string | THREE.Color): THREE.Line;
|
|
2589
|
+
/**
|
|
2590
|
+
* 创建虚线
|
|
2591
|
+
* @param points 由多个点组成的数组
|
|
2592
|
+
* @param iColor 颜色
|
|
2593
|
+
* @param dashSize 短划线的大小
|
|
2594
|
+
* @param gapSize 短划线之间的距离
|
|
2595
|
+
* @returns THREE.Line
|
|
2596
|
+
* @example
|
|
2597
|
+
* ```typescript
|
|
2598
|
+
* Mx.MxThreeJS.createDashedLines([new THREE.Vector3(1,2,2),new THREE.Vector3(1,65,4),new THREE.Vector3(12,2,2)], 10, 20, 2)
|
|
2599
|
+
* ```
|
|
2600
|
+
*/
|
|
2601
|
+
createDashedLines(points: Array<THREE.Vector3>, iColor: number | string | THREE.Color, dashSize: number, gapSize: number): THREE.Line;
|
|
2602
|
+
/**
|
|
2603
|
+
* 创建Image
|
|
2604
|
+
* @param pos 图片中心点位置,屏幕坐标,屏幕坐标的Y轴向上。坐标原点在左下角.
|
|
2605
|
+
* @param w 图片宽度
|
|
2606
|
+
* @param h 图片高度
|
|
2607
|
+
* @param imageUrlPath 图片URl地址
|
|
2608
|
+
* @param callResult 图片加载完成的回调 回调参数:THREE.Mesh
|
|
2609
|
+
* @returns void
|
|
2610
|
+
* @example
|
|
2611
|
+
* ```typescript
|
|
2612
|
+
* Mx.MxThreeJS.createImage(new THREE.Vector3(12,2,2), 10, 20, "../img/icon.png", (mesh)=> {
|
|
2613
|
+
* console.log(mesh)
|
|
2614
|
+
* })
|
|
2615
|
+
* ```
|
|
2616
|
+
*/
|
|
2617
|
+
createImage(pos: THREE.Vector3, w: number, h: number, imageUrlPath: string, callResult?: (mesh: THREE.Mesh | null) => void): void;
|
|
2618
|
+
/**
|
|
2619
|
+
* 加载SVG
|
|
2620
|
+
* @param url SVG路径地址,该函数具有缓存功能,下次加载同样的图片,可以直接返回.
|
|
2621
|
+
* @param color 颜色
|
|
2622
|
+
* @param callResult SVG加载完成的回调 回调参数:THREE.Object3D和Array<THREE.MeshBasicMaterial>
|
|
2623
|
+
* @returns void
|
|
2624
|
+
* @example
|
|
2625
|
+
* ```typescript
|
|
2626
|
+
* Mx.MxThreeJS.loadSVG("../img/icon.svg", 10, 20, 1.5, new THREE.Color(0xff0000), (threeobj, aryMeterial)=> {
|
|
2627
|
+
* console.log(threeobj, aryMeterial)
|
|
2628
|
+
* })
|
|
2629
|
+
* ```
|
|
2630
|
+
*/
|
|
2631
|
+
loadSVG(url: string, color?: number | string | THREE.Color, callResult?: (threeobj: THREE.Object3D, aryMeterial: Array<THREE.MeshBasicMaterial>) => void, loadSet?: any): Promise<THREE.Object3D | null>;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
declare const MxThreeJS: MxThreeJS$1;
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* 动态绘制类型
|
|
2638
|
+
* @example ```typescript
|
|
2639
|
+
|
|
2640
|
+
* ```
|
|
2641
|
+
*/
|
|
2642
|
+
declare enum MxCloneType {
|
|
2643
|
+
/** 正常Clone */
|
|
2644
|
+
kClone = 1,
|
|
2645
|
+
/** 动态拖动Clone */
|
|
2646
|
+
kDragClone = 2,
|
|
2647
|
+
/** 数据归档 */
|
|
2648
|
+
kMxFileClone = 3
|
|
2649
|
+
}
|
|
2650
|
+
/**
|
|
2651
|
+
* 控件对象缺省的绘制顺序
|
|
2652
|
+
* @example ```typescript
|
|
2653
|
+
|
|
2654
|
+
* ```
|
|
2655
|
+
*/
|
|
2656
|
+
declare enum MxDefaultRenderOrder {
|
|
2657
|
+
kCADMeshRenderOrder = 10,
|
|
2658
|
+
kCADCurveRenderOrder = 20,
|
|
2659
|
+
kMxEntityRenderOrder = 30,
|
|
2660
|
+
kGripRenderOrder = 110,
|
|
2661
|
+
kDynJigRenderOrder = 120
|
|
2662
|
+
}
|
|
2663
|
+
/**
|
|
2664
|
+
* 交互操作,需要的输入的触摸类型.
|
|
2665
|
+
* @example ```typescript
|
|
2666
|
+
|
|
2667
|
+
* ```
|
|
2668
|
+
*/
|
|
2669
|
+
declare enum InputToucheType {
|
|
2670
|
+
kGetBegan = 1,
|
|
2671
|
+
kGetEnd = 2
|
|
2672
|
+
}
|
|
2673
|
+
declare type MxColorType = number | string | THREE.Color;
|
|
2674
|
+
declare const MxType: {
|
|
2675
|
+
MxCloneType: typeof MxCloneType;
|
|
2676
|
+
MxDefaultRenderOrder: typeof MxDefaultRenderOrder;
|
|
2677
|
+
InputToucheType: typeof InputToucheType;
|
|
2678
|
+
};
|
|
2679
|
+
|
|
2680
|
+
/** @module McGeTool */
|
|
2681
|
+
|
|
2682
|
+
/**
|
|
2683
|
+
* McGeTool
|
|
2684
|
+
* @example ```typescript
|
|
2685
|
+
* ```
|
|
2686
|
+
*/
|
|
2687
|
+
declare class McGeToolClass {
|
|
2688
|
+
private mxgeTool;
|
|
2689
|
+
private initImp;
|
|
2690
|
+
/**
|
|
2691
|
+
* 计算闭合的区域面积
|
|
2692
|
+
* @param aryPoint 构成区域面积的顶点位置集合
|
|
2693
|
+
* @return number
|
|
2694
|
+
* @example
|
|
2695
|
+
* ```
|
|
2696
|
+
*/
|
|
2697
|
+
calcArea(aryPoint: McGePoint3dArray | THREE.Vector3[]): number;
|
|
2698
|
+
/**
|
|
2699
|
+
* 判断点是否在一个闭合的多边形区域。
|
|
2700
|
+
* @param pt 点的坐标位置
|
|
2701
|
+
* @param aryPoint 闭合多边形区域的顶点坐标集合
|
|
2702
|
+
* @return any
|
|
2703
|
+
* @example
|
|
2704
|
+
* ``` typescript
|
|
2705
|
+
* let aryPoint:Array<THREE.Vector3> = [];
|
|
2706
|
+
* aryPoint.push(new THREE.Vector3(0,0,0));
|
|
2707
|
+
* aryPoint.push(new THREE.Vector3(0,100,0));
|
|
2708
|
+
* aryPoint.push(new THREE.Vector3(100,100,0));
|
|
2709
|
+
* aryPoint.push(new THREE.Vector3(100,0,0));
|
|
2710
|
+
* let pt:THREE.Vector3 = new THREE.Vector3(150,150);
|
|
2711
|
+
* if(McGeTool.pointInPolyline(pt,aryPoint) ){
|
|
2712
|
+
* console.log("in");
|
|
2713
|
+
* }
|
|
2714
|
+
* ```
|
|
2715
|
+
*/
|
|
2716
|
+
pointInPolyline(pt: McGePoint3d, aryPoint: McGePoint3dArray | THREE.Vector3[]): boolean;
|
|
2717
|
+
}
|
|
2718
|
+
declare const McGeTool: McGeToolClass;
|
|
2719
|
+
|
|
2720
|
+
/** @module McGeTool */
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* MrxDbgUtils
|
|
2724
|
+
* 当常用的工具类.
|
|
2725
|
+
* @example ```typescript
|
|
2726
|
+
* ```
|
|
2727
|
+
*/
|
|
2728
|
+
declare class MrxDbgUtilsClass {
|
|
2729
|
+
private imp;
|
|
2730
|
+
private initImp;
|
|
2731
|
+
/**
|
|
2732
|
+
* 查找某个位置的对象.
|
|
2733
|
+
* @param pt 查找位置
|
|
2734
|
+
* @return 返回找到的对象id数组.
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```
|
|
2737
|
+
*/
|
|
2738
|
+
findEntAtPoint(pt: THREE.Vector3, filter?: any, mxObj?: MxDrawObject): Promise<number[]>;
|
|
2739
|
+
/**
|
|
2740
|
+
* 交互选择对象.
|
|
2741
|
+
* @param strPrompt 提示字符串
|
|
2742
|
+
* @return 返回找到的对象id数组.
|
|
2743
|
+
* @example
|
|
2744
|
+
* ```
|
|
2745
|
+
*/
|
|
2746
|
+
selectEnt(strPrompt?: string, filter?: any): Promise<number[]>;
|
|
2747
|
+
}
|
|
2748
|
+
declare const MrxDbgUtils: MrxDbgUtilsClass;
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* McEdGetPointWorldDrawObject 用于构建一个动态绘制回调对象
|
|
2752
|
+
* @example ```typescript
|
|
2753
|
+
* Mx.McEdGetPointWorldDrawObject()
|
|
2754
|
+
* ```
|
|
2755
|
+
*/
|
|
2756
|
+
declare class McEdGetPointWorldDrawObject {
|
|
2757
|
+
[x: string]: any;
|
|
2758
|
+
private _McEdGetPointWorldDraw;
|
|
2759
|
+
constructor();
|
|
2760
|
+
/**
|
|
2761
|
+
* 绘制圆
|
|
2762
|
+
* @param cen 圆心位置
|
|
2763
|
+
* @param dRadius 圆半径
|
|
2764
|
+
* @returns void
|
|
2765
|
+
* @example
|
|
2766
|
+
* ``` typescript
|
|
2767
|
+
* pWorldDraw.drawCircle(new HTREE.Vector3(0,100,5), 6)
|
|
2768
|
+
* ```
|
|
2769
|
+
*
|
|
2770
|
+
*/
|
|
2771
|
+
drawCircle(cen: THREE.Vector3, dRadius: number): void;
|
|
2772
|
+
/**
|
|
2773
|
+
* 绘制直线
|
|
2774
|
+
* @param pt1 开始点
|
|
2775
|
+
* @param pt2 结束点
|
|
2776
|
+
* @returns void
|
|
2777
|
+
* @example
|
|
2778
|
+
* ``` typescript
|
|
2779
|
+
* pWorldDraw.drawLine(new HTREE.Vector3(0,100,5), new HTREE.Vector3(0,600,5))
|
|
2780
|
+
* ```
|
|
2781
|
+
*
|
|
2782
|
+
*/
|
|
2783
|
+
drawLine(pt1: THREE.Vector3, pt2: THREE.Vector3): void;
|
|
2784
|
+
/**
|
|
2785
|
+
* 绘制一个Three.js对象.
|
|
2786
|
+
* @param ent THREE.Object3D对象
|
|
2787
|
+
* @returns void
|
|
2788
|
+
* @example
|
|
2789
|
+
* ``` typescript
|
|
2790
|
+
* pWorldDraw.drawEntity(new THREE.Object3D()))
|
|
2791
|
+
* ```
|
|
2792
|
+
*
|
|
2793
|
+
*/
|
|
2794
|
+
drawEntity(ent: THREE.Object3D | null, renderOrder?: number): void;
|
|
2795
|
+
/**
|
|
2796
|
+
* 绘制一个文档对象
|
|
2797
|
+
* @param sText 文本
|
|
2798
|
+
* @param iSize 大小
|
|
2799
|
+
* @param dAngle 角度
|
|
2800
|
+
* @param pt 位置
|
|
2801
|
+
* @returns void
|
|
2802
|
+
* @example
|
|
2803
|
+
* ``` typescript
|
|
2804
|
+
* pWorldDraw.drawText("字符串" ,36 ,90 ,new HTREE.Vector3(0,100,5))
|
|
2805
|
+
* ```
|
|
2806
|
+
*
|
|
2807
|
+
*/
|
|
2808
|
+
drawText(sText: string, iSize: number, dAngle: number, pt: THREE.Vector3): void;
|
|
2809
|
+
/**
|
|
2810
|
+
* 设置动态绘制回调函数。
|
|
2811
|
+
* @param call 回调函数 currentPoint 回调参数 当前位置 pWorldDraw 回调参数文档绘制对象
|
|
2812
|
+
* @returns void
|
|
2813
|
+
* @example
|
|
2814
|
+
* ``` typescript
|
|
2815
|
+
* pWorldDraw.setDraw((currentPoint, pWorldDraw)=> {
|
|
2816
|
+
*
|
|
2817
|
+
* })
|
|
2818
|
+
* ```
|
|
2819
|
+
*/
|
|
2820
|
+
setDraw(call: (currentPoint: THREE.Vector3, pWorldDraw?: any) => void): void;
|
|
2821
|
+
/**
|
|
2822
|
+
* 设置绘制对象颜色.
|
|
2823
|
+
* @param iColor 颜色
|
|
2824
|
+
* @returns void
|
|
2825
|
+
* @example
|
|
2826
|
+
* ``` typescript
|
|
2827
|
+
* pWorldDraw.setColor(0xFFFFFF)
|
|
2828
|
+
* ```
|
|
2829
|
+
*/
|
|
2830
|
+
setColor(iColor: number | string | THREE.Color): void;
|
|
2831
|
+
/**
|
|
2832
|
+
* 得到绘制对象颜色.
|
|
2833
|
+
* @returns 颜色
|
|
2834
|
+
* @example
|
|
2835
|
+
* ``` typescript
|
|
2836
|
+
* pWorldDraw.getColor()
|
|
2837
|
+
* ```
|
|
2838
|
+
*/
|
|
2839
|
+
getColor(): void;
|
|
2840
|
+
/**
|
|
2841
|
+
* 动态绘制一个自定义实体
|
|
2842
|
+
* @returns
|
|
2843
|
+
* @example
|
|
2844
|
+
* ``` typescript
|
|
2845
|
+
*
|
|
2846
|
+
* ```
|
|
2847
|
+
*/
|
|
2848
|
+
drawCustomEntity(ent: any, renderOrder?: number): void;
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2851
|
+
/** @module MrxDbgUiPrBaseReturn*/
|
|
2852
|
+
/**
|
|
2853
|
+
* MrxDbgUiPrBaseReturn枚举
|
|
2854
|
+
* @description
|
|
2855
|
+
* 用于适配{@link MrxDbgUiPrPoint.go} 和 {@link MrxDbgUiPrPoint.goWhile} 方法中的回调参数`status`
|
|
2856
|
+
* @example
|
|
2857
|
+
* ```
|
|
2858
|
+
* const Point = new Mx.MrxDbgUiPrPoint()
|
|
2859
|
+
* Point.go((status)=> {
|
|
2860
|
+
* if(Mx.MrxDbgUiPrBaseReturn.kCancel === status) {
|
|
2861
|
+
* // 取消
|
|
2862
|
+
* }
|
|
2863
|
+
* })
|
|
2864
|
+
*
|
|
2865
|
+
* ```
|
|
2866
|
+
* @enum
|
|
2867
|
+
* */
|
|
2868
|
+
declare enum MrxDbgUiPrBaseReturn {
|
|
2869
|
+
/** 取消 */
|
|
2870
|
+
kCancel = -2,
|
|
2871
|
+
/** 空输入,当输入关键字和实体时会返回此值 */
|
|
2872
|
+
kNone = -1,
|
|
2873
|
+
/** 获取用户输入成功 */
|
|
2874
|
+
kOk = 0,
|
|
2875
|
+
/** 用户输入了关键字*/
|
|
2876
|
+
kKeyWord = 1
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
/** @module MrxDbgUiPrPointClass */
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* MrxDbgUiPrPoint 用于构建一个取点对象
|
|
2883
|
+
* @example ```typescript
|
|
2884
|
+
* new Mx.MrxDbgUiPrPoint()
|
|
2885
|
+
* ```
|
|
2886
|
+
*/
|
|
2887
|
+
declare class MrxDbgUiPrPoint {
|
|
2888
|
+
constructor();
|
|
2889
|
+
/**
|
|
2890
|
+
* 返回关键字列表
|
|
2891
|
+
* @returns 关键词列表
|
|
2892
|
+
*/
|
|
2893
|
+
keyWords(): string;
|
|
2894
|
+
/**
|
|
2895
|
+
* 设置关键字列表
|
|
2896
|
+
* @param keyWordList 关键词列表
|
|
2897
|
+
* @returns void
|
|
2898
|
+
*/
|
|
2899
|
+
setKeyWords(keyWordList: string): void;
|
|
2900
|
+
/**
|
|
2901
|
+
* 提示字符串
|
|
2902
|
+
* @returns 提示消息
|
|
2903
|
+
*/
|
|
2904
|
+
message(): string;
|
|
2905
|
+
/**
|
|
2906
|
+
* 设置提示字符串
|
|
2907
|
+
* @param message 提示消息
|
|
2908
|
+
* @returns 提示消息
|
|
2909
|
+
*/
|
|
2910
|
+
setMessage(message: string): void;
|
|
2911
|
+
/**
|
|
2912
|
+
* 返回用户选择的关键字
|
|
2913
|
+
* @returns 选择的关键字
|
|
2914
|
+
*/
|
|
2915
|
+
keyWordPicked(): string;
|
|
2916
|
+
/**
|
|
2917
|
+
* 测试某一个关键字是否被用户选择
|
|
2918
|
+
* @param matchKeyWord 要检测的关键字
|
|
2919
|
+
* @returns true为真
|
|
2920
|
+
*/
|
|
2921
|
+
isKeyWordPicked(matchKeyWord: string): boolean;
|
|
2922
|
+
/**
|
|
2923
|
+
* 设置交互过程的动态绘制调用对象
|
|
2924
|
+
* @param pDraw {@link McEdGetPointWorldDrawObject | 动态绘制调用对象}
|
|
2925
|
+
* @returns void
|
|
2926
|
+
*/
|
|
2927
|
+
setUserDraw(pDraw: McEdGetPointWorldDrawObject | ((currentPoint: THREE.Vector3, pWorldDraw: McEdGetPointWorldDrawObject) => void)): void;
|
|
2928
|
+
/**
|
|
2929
|
+
* 得以获取的点对象,Three.js坐标
|
|
2930
|
+
* @returns 点对象 THREE.THREE.Vector3
|
|
2931
|
+
*/
|
|
2932
|
+
value(): THREE.Vector3;
|
|
2933
|
+
/**
|
|
2934
|
+
* 得以获取的点对象,DWG图纸坐标.
|
|
2935
|
+
* @returns 点对象 DWG图纸坐标
|
|
2936
|
+
*/
|
|
2937
|
+
valueDocCoord(): THREE.Vector3;
|
|
2938
|
+
/**
|
|
2939
|
+
* 得到动态拖动的基点
|
|
2940
|
+
* @returns 基点 THREE.THREE.Vector3
|
|
2941
|
+
*/
|
|
2942
|
+
basePt(): THREE.Vector3;
|
|
2943
|
+
/**
|
|
2944
|
+
* 设置动态拖动的基点
|
|
2945
|
+
* @param basePt 基点 THREE.THREE.Vector3
|
|
2946
|
+
* @returns 点对象 DWG图纸坐标
|
|
2947
|
+
*/
|
|
2948
|
+
setBasePt(basePt: THREE.Vector3): void;
|
|
2949
|
+
/**
|
|
2950
|
+
* 设置使用动态拖动的基点
|
|
2951
|
+
* @param useIt 是否设置 默认为false
|
|
2952
|
+
* @returns void
|
|
2953
|
+
*/
|
|
2954
|
+
setUseBasePt(useIt: boolean): void;
|
|
2955
|
+
/**
|
|
2956
|
+
* 开始动态拖动
|
|
2957
|
+
* @param retcall 回调参数status {@link MrxDbgUiPrBaseReturn | 状态值}
|
|
2958
|
+
* @returns void
|
|
2959
|
+
*/
|
|
2960
|
+
go(retcall?: (status: MrxDbgUiPrBaseReturn) => void): Promise<THREE.Vector3 | null>;
|
|
2961
|
+
/**
|
|
2962
|
+
* 动态拖动,连续取点,直到ESC退出。
|
|
2963
|
+
* @param retcall 回调参数status {@link MrxDbgUiPrBaseReturn | 状态值}
|
|
2964
|
+
* @param exitcall 回调参数status {@link MrxDbgUiPrBaseReturn | 状态值}
|
|
2965
|
+
* @returns void
|
|
2966
|
+
*/
|
|
2967
|
+
goWhile(retcall: (status: MrxDbgUiPrBaseReturn) => any, exitcall?: (status: MrxDbgUiPrBaseReturn) => any): void;
|
|
2968
|
+
/**
|
|
2969
|
+
* 把动态绘制的对象,保留到图上。
|
|
2970
|
+
* @param callAddEntity 回调参数ent 类型:THREE.THREE.Object3D
|
|
2971
|
+
* @returns 点对象 DWG图纸坐标
|
|
2972
|
+
*/
|
|
2973
|
+
drawReserve(callAddEntity?: (ent: THREE.Object3D) => void): void;
|
|
2974
|
+
/**
|
|
2975
|
+
* 设置需要的Touche输入类型,默认值是 {@link MxType.InputToucheType.kGetBegan}
|
|
2976
|
+
*
|
|
2977
|
+
*/
|
|
2978
|
+
setInputToucheType(toucheType: number): void;
|
|
2979
|
+
/**
|
|
2980
|
+
* 返回需要的Touche输入类型
|
|
2981
|
+
*/
|
|
2982
|
+
getInputToucheType(): number;
|
|
2983
|
+
}
|
|
2984
|
+
|
|
2985
|
+
/** @module MxDbImage*/
|
|
2986
|
+
|
|
2987
|
+
/**
|
|
2988
|
+
* MxDbImage 图片对象.
|
|
2989
|
+
*/
|
|
2990
|
+
declare class MxDbImage extends MxDbEntity {
|
|
2991
|
+
private pt1;
|
|
2992
|
+
private pt2;
|
|
2993
|
+
private imagePath;
|
|
2994
|
+
private isLoadMaterialFromPath;
|
|
2995
|
+
private material;
|
|
2996
|
+
private angle;
|
|
2997
|
+
getTypeName(): string;
|
|
2998
|
+
/** 返回图片的旋转角度,相对图片中心点旋转.
|
|
2999
|
+
* @param
|
|
3000
|
+
* */
|
|
3001
|
+
getAngle(): number;
|
|
3002
|
+
/** 设置图片的旋转角度,相对图片中心点旋转.
|
|
3003
|
+
* @param
|
|
3004
|
+
* */
|
|
3005
|
+
setAngle(angle: number): void;
|
|
3006
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3007
|
+
/** 设置图片路径
|
|
3008
|
+
* @param sPath 路径
|
|
3009
|
+
* */
|
|
3010
|
+
setImagePath(sPath: string): void;
|
|
3011
|
+
/** 获取图片路径 */
|
|
3012
|
+
getImagePath(): string;
|
|
3013
|
+
/** 设置图片材质
|
|
3014
|
+
* @param material THREE.MeshLambertMaterial
|
|
3015
|
+
* */
|
|
3016
|
+
setMaterial(material: THREE.MeshLambertMaterial): void;
|
|
3017
|
+
/** 加载图片材质
|
|
3018
|
+
* */
|
|
3019
|
+
loadMaterial(imagePath?: string): void;
|
|
3020
|
+
/** 设置图片对角点1
|
|
3021
|
+
* @param pt1 THREE.Vector3坐标点
|
|
3022
|
+
* */
|
|
3023
|
+
setPoint1(pt1: THREE.Vector3): void;
|
|
3024
|
+
/** 获得图片对角点1 */
|
|
3025
|
+
getPoint1(): THREE.Vector3;
|
|
3026
|
+
/** 设置图片对角点2
|
|
3027
|
+
* @param pt2 THREE.Vector3坐标点
|
|
3028
|
+
* */
|
|
3029
|
+
setPoint2(pt2: THREE.Vector3): void;
|
|
3030
|
+
/** 获得图片对角点2 */
|
|
3031
|
+
getPoint2(): THREE.Vector3;
|
|
3032
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3033
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3034
|
+
dwgIn(obj: any): boolean;
|
|
3035
|
+
dwgOut(obj: any): object;
|
|
3036
|
+
create(): MxDbEntity;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/** @module MxDbSVG*/
|
|
3040
|
+
/**
|
|
3041
|
+
* MxDbSVGText 为SVG提供文字数据
|
|
3042
|
+
* */
|
|
3043
|
+
declare class MxDbSVGText {
|
|
3044
|
+
/** 文字的位置 */
|
|
3045
|
+
txtPos: THREE.Vector3;
|
|
3046
|
+
/** 文字内容 */
|
|
3047
|
+
txt: string;
|
|
3048
|
+
/** 文字高度 */
|
|
3049
|
+
txtHeight: number;
|
|
3050
|
+
/** 文字颜色 */
|
|
3051
|
+
color: number | string | THREE.Color | undefined;
|
|
3052
|
+
/** THREE.Sprite */
|
|
3053
|
+
_txtObject: THREE.Sprite | null;
|
|
3054
|
+
/** 比例 */
|
|
3055
|
+
_txtAspectRatio: number;
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
/** @module MxDbSVG*/
|
|
3059
|
+
|
|
3060
|
+
/**
|
|
3061
|
+
* MxDbSVG 绘制SVG图形.
|
|
3062
|
+
*/
|
|
3063
|
+
declare class MxDbSVG extends MxDbEntity {
|
|
3064
|
+
private svgPos;
|
|
3065
|
+
private svg;
|
|
3066
|
+
private svgPath;
|
|
3067
|
+
private svgSize;
|
|
3068
|
+
private svgAlignmentRatio;
|
|
3069
|
+
/** 延z轴旋转的数值 */
|
|
3070
|
+
svgRotate: number;
|
|
3071
|
+
/** 是否倒置SVG图形 */
|
|
3072
|
+
svgReverse: boolean;
|
|
3073
|
+
svgMirror: boolean;
|
|
3074
|
+
private svgChildColor;
|
|
3075
|
+
svgMargin: THREE.Vector2;
|
|
3076
|
+
private isSvgDirtyLocation;
|
|
3077
|
+
private isLoadFromPath;
|
|
3078
|
+
private aryText;
|
|
3079
|
+
private svgBoxSize;
|
|
3080
|
+
/** 固定尺寸,图片和文字大小,取屏幕像素绘图单位。 */
|
|
3081
|
+
fixedSize: boolean;
|
|
3082
|
+
/**使用svg的颜色 */
|
|
3083
|
+
useSvgColor: boolean;
|
|
3084
|
+
setSvgChildColor(aryColor: number[]): void;
|
|
3085
|
+
getSvgChildColor(): number[];
|
|
3086
|
+
private calcVewSize;
|
|
3087
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3088
|
+
/**
|
|
3089
|
+
* 设置SVG的路径
|
|
3090
|
+
* @param path 路径
|
|
3091
|
+
* @param preload 是否提前加载SVG
|
|
3092
|
+
* */
|
|
3093
|
+
setSvgPath(path: string, preload?: boolean): Promise<void>;
|
|
3094
|
+
/**
|
|
3095
|
+
* 获取SVG的路径
|
|
3096
|
+
* */
|
|
3097
|
+
getSvgPath(): string;
|
|
3098
|
+
/**
|
|
3099
|
+
* 设置SVG显示位置
|
|
3100
|
+
* @param pos THREE.Vector3
|
|
3101
|
+
* */
|
|
3102
|
+
setSvgPostion(pos: THREE.Vector3): void;
|
|
3103
|
+
/**
|
|
3104
|
+
* 获取SVG显示位置
|
|
3105
|
+
* */
|
|
3106
|
+
getSvgPostion(): THREE.Vector3;
|
|
3107
|
+
/**
|
|
3108
|
+
* 设置SVG大小
|
|
3109
|
+
* @param size THREE.Vector2 x表示宽度y表示高度
|
|
3110
|
+
* */
|
|
3111
|
+
setSvgSize(size: THREE.Vector2): void;
|
|
3112
|
+
getSvgSize(): THREE.Vector2;
|
|
3113
|
+
/** 设置SVG 的调整比例
|
|
3114
|
+
* @param alignmentRatio THREE.Vector2
|
|
3115
|
+
* */
|
|
3116
|
+
setSvgAlignmentRatio(alignmentRatio: THREE.Vector2): void;
|
|
3117
|
+
getSvgAlignmentRatio(): THREE.Vector2;
|
|
3118
|
+
/** 获取文字数组下标中的文字
|
|
3119
|
+
* @param index 数组下标
|
|
3120
|
+
* @return {@link MxDbSVGText}
|
|
3121
|
+
* */
|
|
3122
|
+
getText(index: number): MxDbSVGText | null;
|
|
3123
|
+
/** 添加文字
|
|
3124
|
+
* @param txt {@link MxDbSVGText}
|
|
3125
|
+
* */
|
|
3126
|
+
addText(txt: MxDbSVGText): void;
|
|
3127
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3128
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3129
|
+
private calcSvgPosition;
|
|
3130
|
+
dwgIn(obj: any): boolean;
|
|
3131
|
+
dwgOut(obj: any): object;
|
|
3132
|
+
create(): MxDbEntity;
|
|
3133
|
+
transformBy(mat: THREE.Matrix4): void;
|
|
3134
|
+
getTypeName(): string;
|
|
3135
|
+
/**
|
|
3136
|
+
* 设置颜色
|
|
3137
|
+
* @param color 颜色值
|
|
3138
|
+
* */
|
|
3139
|
+
setColor(color: number | string | THREE.Color): void;
|
|
3140
|
+
/**
|
|
3141
|
+
* 设置svg对象
|
|
3142
|
+
* */
|
|
3143
|
+
setSvg(svg: any): void;
|
|
3144
|
+
private calcSvgBoxSize;
|
|
3145
|
+
reComputeSVG(): void;
|
|
3146
|
+
protected onViewChange(): boolean;
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
/** @module MxDbPolyline*/
|
|
3150
|
+
|
|
3151
|
+
/**
|
|
3152
|
+
* MxDbPolyline 多义线对象(多个点构成的线段)
|
|
3153
|
+
*/
|
|
3154
|
+
declare class MxDbPolyline extends MxDbEntity {
|
|
3155
|
+
/** 顶点位置集合 */
|
|
3156
|
+
points: THREE.Vector3[];
|
|
3157
|
+
getTypeName(): string;
|
|
3158
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3159
|
+
getGripPoints(): THREE.Vector3[];
|
|
3160
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3161
|
+
create(): MxDbEntity;
|
|
3162
|
+
dwgIn(obj: any): boolean;
|
|
3163
|
+
dwgOut(obj: any): object;
|
|
3164
|
+
/** 添加顶点位置 */
|
|
3165
|
+
addVertexAt(pt: THREE.Vector3): void;
|
|
3166
|
+
/** 顶点数量 */
|
|
3167
|
+
numVerts(): number;
|
|
3168
|
+
getPointAt(index: number): THREE.Vector3 | null;
|
|
3169
|
+
/** 设置顶点
|
|
3170
|
+
* @param index 替换的顶点在当前points集合的下标位置
|
|
3171
|
+
* @param pt 要替换设置的顶点
|
|
3172
|
+
* */
|
|
3173
|
+
setPointAt(index: number, pt: THREE.Vector3): boolean;
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
/** @module MxDb2LineAngularDimension*/
|
|
3177
|
+
|
|
3178
|
+
/**
|
|
3179
|
+
* MxDb2LineAngularDimension
|
|
3180
|
+
* 显示角度测量的图形
|
|
3181
|
+
*/
|
|
3182
|
+
declare class MxDb2LineAngularDimension extends MxDbEntity {
|
|
3183
|
+
point1: THREE.Vector3;
|
|
3184
|
+
point2: THREE.Vector3;
|
|
3185
|
+
point3: THREE.Vector3;
|
|
3186
|
+
private calculateLineAngle;
|
|
3187
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3188
|
+
getGripPoints(): THREE.Vector3[];
|
|
3189
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3190
|
+
dwgIn(obj: any): boolean;
|
|
3191
|
+
dwgOut(obj: any): object;
|
|
3192
|
+
create(): MxDbEntity;
|
|
3193
|
+
transformBy(mat: THREE.Matrix4): void;
|
|
3194
|
+
getTypeName(): string;
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
/**
|
|
3198
|
+
* Mx3PointArc 对象.
|
|
3199
|
+
* 通过三个坐标点绘制一段圆弧
|
|
3200
|
+
*/
|
|
3201
|
+
declare class Mx3PointArc extends MxDbEntity {
|
|
3202
|
+
point1: three.Vector3;
|
|
3203
|
+
point2: three.Vector3;
|
|
3204
|
+
point3: three.Vector3;
|
|
3205
|
+
getTypeName(): string;
|
|
3206
|
+
create(): MxDbEntity;
|
|
3207
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3208
|
+
getGripPoints(): THREE.Vector3[];
|
|
3209
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3210
|
+
dwgIn(obj: any): boolean;
|
|
3211
|
+
dwgOut(obj: any): object;
|
|
3212
|
+
}
|
|
3213
|
+
|
|
3214
|
+
/** @module MxDbCoord*/
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* MxDbCoord 引线坐标测量
|
|
3218
|
+
*/
|
|
3219
|
+
declare class MxDbCoord extends MxDbEntity {
|
|
3220
|
+
/** 测量点位置 */
|
|
3221
|
+
point1: THREE.Vector3;
|
|
3222
|
+
/** 测量结果显示位置 */
|
|
3223
|
+
point2: THREE.Vector3;
|
|
3224
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3225
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3226
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3227
|
+
dwgIn(obj: any): boolean;
|
|
3228
|
+
dwgOut(obj: any): object;
|
|
3229
|
+
create(): MxDbEntity;
|
|
3230
|
+
transformBy(mat: THREE.Matrix4): void;
|
|
3231
|
+
getTypeName(): string;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
/** @module MxDbLine*/
|
|
3235
|
+
|
|
3236
|
+
/**
|
|
3237
|
+
* MxDbLine 直线对象.
|
|
3238
|
+
*/
|
|
3239
|
+
declare class MxDbLine extends MxDbEntity {
|
|
3240
|
+
/** 直线的开始点 */
|
|
3241
|
+
pt1: THREE.Vector3;
|
|
3242
|
+
/** 直线的结束点 */
|
|
3243
|
+
pt2: THREE.Vector3;
|
|
3244
|
+
getTypeName(): string;
|
|
3245
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3246
|
+
/** 设置的开始点 */
|
|
3247
|
+
setPoint1(pt1: THREE.Vector3): void;
|
|
3248
|
+
getPoint1(): THREE.Vector3;
|
|
3249
|
+
/** 设置的结束点 */
|
|
3250
|
+
setPoint2(pt2: THREE.Vector3): void;
|
|
3251
|
+
getPoint2(): THREE.Vector3;
|
|
3252
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3253
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3254
|
+
dwgIn(obj: any): boolean;
|
|
3255
|
+
dwgOut(obj: any): object;
|
|
3256
|
+
create(): MxDbEntity;
|
|
3257
|
+
getGeomExtents(): THREE.Box3 | null;
|
|
3258
|
+
/**
|
|
3259
|
+
* 返回曲线长度.
|
|
3260
|
+
* @returns number
|
|
3261
|
+
*/
|
|
3262
|
+
getGetLength(): number;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
/** 简单颜色滤镜矩阵 */
|
|
3266
|
+
interface ChannelParamTypes {
|
|
3267
|
+
r?: number;
|
|
3268
|
+
g?: number;
|
|
3269
|
+
b?: number;
|
|
3270
|
+
}
|
|
3271
|
+
declare class MxFilters {
|
|
3272
|
+
private uniformObj;
|
|
3273
|
+
private filtersStr;
|
|
3274
|
+
private filtersTypes;
|
|
3275
|
+
private VSHADER_SOURCE;
|
|
3276
|
+
private FSHADER_SOURCE;
|
|
3277
|
+
private _matrix;
|
|
3278
|
+
/**
|
|
3279
|
+
* 过滤或增强某个颜色通道
|
|
3280
|
+
* @param {ChannelParamTypes}
|
|
3281
|
+
* */
|
|
3282
|
+
channel({ r, g, b }: ChannelParamTypes): this;
|
|
3283
|
+
/**
|
|
3284
|
+
* 改变亮度
|
|
3285
|
+
* @param {number} p
|
|
3286
|
+
* p = 0 全暗,p > 0 且 p < 1 调暗,p = 1 原色, p > 1 调亮
|
|
3287
|
+
* */
|
|
3288
|
+
brightness(p: number): this;
|
|
3289
|
+
/**
|
|
3290
|
+
* 饱和度
|
|
3291
|
+
* @param {number} p
|
|
3292
|
+
* p = 0 完全灰度化,p = 1 原色,p > 1 增强饱和度
|
|
3293
|
+
* */
|
|
3294
|
+
saturate(p: number): this;
|
|
3295
|
+
/**
|
|
3296
|
+
* 对比度
|
|
3297
|
+
* @param {number} p
|
|
3298
|
+
* p = 1 原色, p < 1 减弱对比度,p > 1 增强对比度
|
|
3299
|
+
* */
|
|
3300
|
+
contrast(p: number): this;
|
|
3301
|
+
/**
|
|
3302
|
+
* 透明度
|
|
3303
|
+
* @param {number} p
|
|
3304
|
+
* p = 0 全透明,p = 1 原色
|
|
3305
|
+
* */
|
|
3306
|
+
opacity(p: number): this;
|
|
3307
|
+
/**
|
|
3308
|
+
* 反色
|
|
3309
|
+
* @param {number} p
|
|
3310
|
+
* p = 0 原色, p = 1 完全反色
|
|
3311
|
+
* */
|
|
3312
|
+
invert(p: number): this;
|
|
3313
|
+
/**
|
|
3314
|
+
* 灰度
|
|
3315
|
+
* @param {number} p 0~1
|
|
3316
|
+
* */
|
|
3317
|
+
grayscale(p?: number): this;
|
|
3318
|
+
/**
|
|
3319
|
+
* 深褐色
|
|
3320
|
+
* @param {number} p 0~1
|
|
3321
|
+
* */
|
|
3322
|
+
sepia(p?: number): this;
|
|
3323
|
+
/**
|
|
3324
|
+
* 色相旋转,将色调沿极坐标转过deg角度
|
|
3325
|
+
* @param {number} deg 0~360
|
|
3326
|
+
* */
|
|
3327
|
+
hueRotate(deg: number): this;
|
|
3328
|
+
/**
|
|
3329
|
+
* 色相旋转,将色调沿极坐标转过deg角度
|
|
3330
|
+
* @param {number} deg 0~360
|
|
3331
|
+
* */
|
|
3332
|
+
/**
|
|
3333
|
+
* 卷积
|
|
3334
|
+
* @param {Matrix3} cKernel 3*3的矩阵
|
|
3335
|
+
* @param {number} stStep 1 / 9
|
|
3336
|
+
* @param {number} scaleFactor 521
|
|
3337
|
+
* */
|
|
3338
|
+
convolution(cKernel: THREE.Matrix3, stStep?: number, scaleFactor?: number): this;
|
|
3339
|
+
/**
|
|
3340
|
+
* 重置所有滤镜效果
|
|
3341
|
+
* */
|
|
3342
|
+
reset(): this;
|
|
3343
|
+
_getFilterShaderData(texture: THREE.Texture): {
|
|
3344
|
+
uniforms: {
|
|
3345
|
+
e_Texture: {
|
|
3346
|
+
value: three.Texture;
|
|
3347
|
+
};
|
|
3348
|
+
colorMatrix: {
|
|
3349
|
+
value: three.Matrix4;
|
|
3350
|
+
};
|
|
3351
|
+
};
|
|
3352
|
+
vertexShader: string;
|
|
3353
|
+
fragmentShader: string;
|
|
3354
|
+
};
|
|
3355
|
+
_getFilterColor(color?: string | number | THREE.Color, opacity?: number): three.Color;
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
/**
|
|
3359
|
+
* MxRectEntity 矩形对象.
|
|
3360
|
+
*/
|
|
3361
|
+
declare class MxDbRect extends MxDbEntity {
|
|
3362
|
+
private cornerRadius;
|
|
3363
|
+
/**
|
|
3364
|
+
* pt1: 构成矩形的第一个点
|
|
3365
|
+
* */
|
|
3366
|
+
pt1: THREE.Vector3;
|
|
3367
|
+
/**
|
|
3368
|
+
* pt1: 构成矩形的第二个点(对角点)
|
|
3369
|
+
* */
|
|
3370
|
+
pt2: THREE.Vector3;
|
|
3371
|
+
/**
|
|
3372
|
+
* 是否需要颜色填充.
|
|
3373
|
+
* */
|
|
3374
|
+
isSolidColorFill: boolean;
|
|
3375
|
+
/**
|
|
3376
|
+
* fillImageParam 填充背景图片的参数设置(如果使用了滤镜则部分参数功能失效)
|
|
3377
|
+
* */
|
|
3378
|
+
private fillImageParam;
|
|
3379
|
+
/**
|
|
3380
|
+
* 设置滤镜对象{@link MxFilters} 默认为undefined | null 则不使用该滤镜效果
|
|
3381
|
+
* */
|
|
3382
|
+
private filter;
|
|
3383
|
+
/**
|
|
3384
|
+
* fillImageSrc(优先级低于fillColor属性) 填充背景图片的地址
|
|
3385
|
+
* */
|
|
3386
|
+
private fillImageSrc;
|
|
3387
|
+
private isLoadMaterialFromPath;
|
|
3388
|
+
private material;
|
|
3389
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3390
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3391
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3392
|
+
dwgIn(obj: any): boolean;
|
|
3393
|
+
dwgOut(obj: any): object;
|
|
3394
|
+
create(): MxDbRect;
|
|
3395
|
+
transformBy(mat: THREE.Matrix4): void;
|
|
3396
|
+
/**
|
|
3397
|
+
* setRadius 设置圆角 圆角的半径 如[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4
|
|
3398
|
+
* @param { number | number[] } radius 圆角半径 为数组时[3, 2, 1, 4]分别对应左上角圆角半径3 右上角2 右下角1 左下角4; 或者直接设置半径值 则四个角统一半径
|
|
3399
|
+
* */
|
|
3400
|
+
setRadius(radius: number | number[], isScreenCoord?: boolean): void;
|
|
3401
|
+
getTypeName(): string;
|
|
3402
|
+
/** 获取当前滤镜对象 {@link MxFilters} */
|
|
3403
|
+
getFilter(): MxFilters | undefined | null;
|
|
3404
|
+
/** 设置当前滤镜对象
|
|
3405
|
+
* @param filter {@link MxFilters}
|
|
3406
|
+
* */
|
|
3407
|
+
setFilter(filter: MxFilters | undefined | null): void;
|
|
3408
|
+
/** 设置填充的背景图片路径 */
|
|
3409
|
+
setFillImagePath(sPath: string | undefined): void;
|
|
3410
|
+
/** 获取填充的背景图片路径 */
|
|
3411
|
+
getFillImagePath(): string | undefined;
|
|
3412
|
+
}
|
|
3413
|
+
|
|
3414
|
+
/** @module MxDbAlignedDimension*/
|
|
3415
|
+
|
|
3416
|
+
/**
|
|
3417
|
+
* MxDbAlignedDimension 尺寸标注
|
|
3418
|
+
*/
|
|
3419
|
+
declare class MxDbAlignedDimension extends MxDbEntity {
|
|
3420
|
+
point1: THREE.Vector3;
|
|
3421
|
+
point2: THREE.Vector3;
|
|
3422
|
+
getTypeName(): string;
|
|
3423
|
+
private getDirection;
|
|
3424
|
+
getDimText(): string;
|
|
3425
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3426
|
+
/**
|
|
3427
|
+
* 设置测量的开始点
|
|
3428
|
+
* @parma pt1 three.js坐标点位
|
|
3429
|
+
* */
|
|
3430
|
+
setPoint1(pt1: THREE.Vector3): void;
|
|
3431
|
+
/**
|
|
3432
|
+
* 设置测量的结束点
|
|
3433
|
+
* @parma pt1 three.js坐标点位
|
|
3434
|
+
* */
|
|
3435
|
+
setPoint2(pt2: THREE.Vector3): void;
|
|
3436
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3437
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3438
|
+
dwgIn(obj: any): boolean;
|
|
3439
|
+
dwgOut(obj: any): object;
|
|
3440
|
+
create(): MxDbEntity;
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
/**
|
|
3444
|
+
* MxDbArea 任意不规则多边形
|
|
3445
|
+
* */
|
|
3446
|
+
declare class MxDbArea extends MxDbEntity {
|
|
3447
|
+
/** 构成多边形的顶点集合 */
|
|
3448
|
+
points: Array<THREE.Vector3>;
|
|
3449
|
+
isFill: boolean;
|
|
3450
|
+
fillColor: MxColorType;
|
|
3451
|
+
fillOpacity: number;
|
|
3452
|
+
getTypeName(): string;
|
|
3453
|
+
create(): MxDbEntity;
|
|
3454
|
+
/** 在worldDraw动态绘制时会计算当前顶点坐标集合的面积,并显示渲染计算后的计算结果
|
|
3455
|
+
* @returns 返回的计算后的面积结果
|
|
3456
|
+
* */
|
|
3457
|
+
getDimText(): string;
|
|
3458
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3459
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3460
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3461
|
+
dwgIn(obj: any): boolean;
|
|
3462
|
+
dwgOut(obj: any): object;
|
|
3463
|
+
/**
|
|
3464
|
+
* 添加构成多边形的点
|
|
3465
|
+
* @param pt 位置坐标
|
|
3466
|
+
* */
|
|
3467
|
+
addPoint(pt: THREE.Vector3): void;
|
|
3468
|
+
/**
|
|
3469
|
+
* 获取构成多边形的顶点集合
|
|
3470
|
+
* */
|
|
3471
|
+
getPoints(): Array<THREE.Vector3>;
|
|
3472
|
+
/**
|
|
3473
|
+
* 清空构成多边形的顶点集合
|
|
3474
|
+
* */
|
|
3475
|
+
clearPoint(): void;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
/**
|
|
3479
|
+
* MxDbLeadTag 引出标注
|
|
3480
|
+
* */
|
|
3481
|
+
declare class MxDbLeadTag extends MxDbEntity {
|
|
3482
|
+
point: three.Vector3;
|
|
3483
|
+
leadLen: number;
|
|
3484
|
+
text: string;
|
|
3485
|
+
textHeight: number;
|
|
3486
|
+
getTypeName(): string;
|
|
3487
|
+
private createDots;
|
|
3488
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3489
|
+
getGripPoints(): THREE.Vector3[];
|
|
3490
|
+
onViewChange(): boolean;
|
|
3491
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3492
|
+
dwgIn(obj: any): boolean;
|
|
3493
|
+
dwgOut(obj: any): any;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/** @module MxDbAnyLine*/
|
|
3497
|
+
|
|
3498
|
+
/**
|
|
3499
|
+
* MxDbAnyLine
|
|
3500
|
+
* 任意线段
|
|
3501
|
+
*/
|
|
3502
|
+
declare class MxDbAnyLine extends MxDbEntity {
|
|
3503
|
+
/** 构成线段的顶点坐标集合 */
|
|
3504
|
+
points: THREE.Vector3[];
|
|
3505
|
+
getTypeName(): string;
|
|
3506
|
+
create(): MxDbEntity;
|
|
3507
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3508
|
+
/** 获取线段的包围盒的中心点坐标 */
|
|
3509
|
+
getCenter(): THREE.Vector3;
|
|
3510
|
+
getGripPoints(): THREE.Vector3[];
|
|
3511
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3512
|
+
dwgIn(obj: any): boolean;
|
|
3513
|
+
dwgOut(obj: any): object;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
/**
|
|
3517
|
+
* MxDbCloudLine 对象. 绘制任意的云线
|
|
3518
|
+
*/
|
|
3519
|
+
declare class MxDbCloudLine extends MxDbEntity {
|
|
3520
|
+
private points;
|
|
3521
|
+
private radius;
|
|
3522
|
+
private drawGeometry;
|
|
3523
|
+
getTypeName(): string;
|
|
3524
|
+
create(): MxDbEntity;
|
|
3525
|
+
/** 设置构成云线的每个圆弧半径长度
|
|
3526
|
+
* @parma radius 圆弧半径
|
|
3527
|
+
* */
|
|
3528
|
+
setRadius(radius: number): void;
|
|
3529
|
+
/**
|
|
3530
|
+
* 获取云线的圆弧半径
|
|
3531
|
+
* */
|
|
3532
|
+
getRadius(): number;
|
|
3533
|
+
private clacNewArcDiameterPoint;
|
|
3534
|
+
private createCloudArcCurvePoints;
|
|
3535
|
+
/**
|
|
3536
|
+
* 添加云线的顶点坐标, 该顶点坐标会根据上一个构成云线的点计算出下一个云线的顶点位置
|
|
3537
|
+
* @param pt 坐标位置
|
|
3538
|
+
* @param isAddToDrawGeometry 如果为true 将立即添加顶点并绘制下一个圆弧
|
|
3539
|
+
* */
|
|
3540
|
+
addPoint(pt: THREE.Vector3, isAddToDrawGeometry?: boolean): void;
|
|
3541
|
+
/**
|
|
3542
|
+
* 绘制两点之间的云线(与addPoint不同的是它不是只绘制一个半圆弧,而是绘制两点之间相连接的所有半圆弧)
|
|
3543
|
+
* @param pt1 云线开始点
|
|
3544
|
+
* @param pt2 云线结束点
|
|
3545
|
+
* */
|
|
3546
|
+
addLine(pt1: THREE.Vector3, pt2: THREE.Vector3): three.Vector3;
|
|
3547
|
+
/** 重新计算云线的的所有顶点坐标, 如绘制完云线后 重新设置了圆弧半径, 在worldDraw动态绘制时会调用该方法 */
|
|
3548
|
+
reCalculateDrawGeometry(): void;
|
|
3549
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3550
|
+
/**
|
|
3551
|
+
* 获取云线包围盒的中心点
|
|
3552
|
+
* */
|
|
3553
|
+
getCenter(): THREE.Vector3;
|
|
3554
|
+
getGripPoints(): THREE.Vector3[];
|
|
3555
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3556
|
+
dwgIn(obj: any): boolean;
|
|
3557
|
+
dwgOut(obj: any): object;
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
/**
|
|
3561
|
+
* MxDbRegularPolygon 正多边形
|
|
3562
|
+
*/
|
|
3563
|
+
declare class MxDbRegularPolygon extends MxDbEntity {
|
|
3564
|
+
/** 正多边形的中心点位置 */
|
|
3565
|
+
centerPoint: three.Vector3;
|
|
3566
|
+
/** 正多边形两条边之间的交点位置 */
|
|
3567
|
+
otherPoint: three.Vector3;
|
|
3568
|
+
/** 正多边形边的数量 */
|
|
3569
|
+
sidesNumber: number;
|
|
3570
|
+
getTypeName(): string;
|
|
3571
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3572
|
+
getGripPoints(): THREE.Vector3[];
|
|
3573
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3574
|
+
create(): MxDbEntity;
|
|
3575
|
+
dwgIn(obj: any): boolean;
|
|
3576
|
+
dwgOut(obj: any): object;
|
|
3577
|
+
}
|
|
3578
|
+
|
|
3579
|
+
/** @module MxDbLeadComment*/
|
|
3580
|
+
|
|
3581
|
+
/**
|
|
3582
|
+
* MxDbLeadComment 引线文字标注
|
|
3583
|
+
* */
|
|
3584
|
+
declare class MxDbLeadComment extends MxDbEntity {
|
|
3585
|
+
/** 标注点 */
|
|
3586
|
+
point1: THREE.Vector3;
|
|
3587
|
+
/** 文字显示位置 */
|
|
3588
|
+
point2: THREE.Vector3;
|
|
3589
|
+
/** 文字内容 */
|
|
3590
|
+
text: string;
|
|
3591
|
+
/** 文字高度 */
|
|
3592
|
+
textHeight: number;
|
|
3593
|
+
textWidth: number;
|
|
3594
|
+
getTypeName(): string;
|
|
3595
|
+
create(): MxDbEntity;
|
|
3596
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3597
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3598
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3599
|
+
dwgIn(obj: any): boolean;
|
|
3600
|
+
dwgOut(obj: any): object;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3603
|
+
/**
|
|
3604
|
+
* MxDbRectBoxLeadComment 引线审图标注
|
|
3605
|
+
* */
|
|
3606
|
+
declare class MxDbRectBoxLeadComment extends MxDbEntity {
|
|
3607
|
+
/** 云线矩形的对角点1 */
|
|
3608
|
+
point1: THREE.Vector3;
|
|
3609
|
+
/** 云线矩形的对角点2 */
|
|
3610
|
+
point2: THREE.Vector3;
|
|
3611
|
+
/** 要标注的内容位置 */
|
|
3612
|
+
point3: THREE.Vector3;
|
|
3613
|
+
/** 要显示的文字内容*/
|
|
3614
|
+
text: string;
|
|
3615
|
+
/**文字高度*/
|
|
3616
|
+
textHeight: number;
|
|
3617
|
+
/** 云线的半圆弧半径 */
|
|
3618
|
+
radius: number;
|
|
3619
|
+
getTypeName(): string;
|
|
3620
|
+
create(): MxDbEntity;
|
|
3621
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3622
|
+
getGripPoints(): Array<THREE.Vector3>;
|
|
3623
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3624
|
+
dwgIn(obj: any): boolean;
|
|
3625
|
+
dwgOut(obj: any): object;
|
|
3626
|
+
}
|
|
3627
|
+
|
|
3628
|
+
/**
|
|
3629
|
+
* MxDbEllipse 通过矩形绘制的椭圆
|
|
3630
|
+
*/
|
|
3631
|
+
declare class MxDbEllipse extends MxDbEntity {
|
|
3632
|
+
/** 矩形的开始点 */
|
|
3633
|
+
point1: three.Vector3;
|
|
3634
|
+
/** 矩形的结束点 */
|
|
3635
|
+
point2: three.Vector3;
|
|
3636
|
+
getTypeName(): string;
|
|
3637
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3638
|
+
getGripPoints(): THREE.Vector3[];
|
|
3639
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3640
|
+
create(): MxDbEntity;
|
|
3641
|
+
dwgIn(obj: any): boolean;
|
|
3642
|
+
dwgOut(obj: any): object;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
/**
|
|
3646
|
+
* MxDbText 绘制文字
|
|
3647
|
+
*/
|
|
3648
|
+
declare class MxDbText extends MxDbEntity {
|
|
3649
|
+
/** 文字所在位置*/
|
|
3650
|
+
position: three.Vector3;
|
|
3651
|
+
/** 文字内容*/
|
|
3652
|
+
text: string;
|
|
3653
|
+
/** 文字高度*/
|
|
3654
|
+
height: number;
|
|
3655
|
+
/** 角度*/
|
|
3656
|
+
angle: number;
|
|
3657
|
+
getTypeName(): string;
|
|
3658
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3659
|
+
getGripPoints(): THREE.Vector3[];
|
|
3660
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3661
|
+
create(): MxDbEntity;
|
|
3662
|
+
dwgIn(obj: any): boolean;
|
|
3663
|
+
dwgOut(obj: any): object;
|
|
3664
|
+
getGeomExtents(): THREE.Box3 | null;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
/**
|
|
3668
|
+
* MxDbHatch 填充对象
|
|
3669
|
+
*/
|
|
3670
|
+
declare class MxDbHatch extends MxDbEntity {
|
|
3671
|
+
points: THREE.Vector3[];
|
|
3672
|
+
worldDraw(pWorldDraw: McGiWorldDraw): void;
|
|
3673
|
+
getTypeName(): string;
|
|
3674
|
+
moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
|
|
3675
|
+
/** 设置顶点坐标 */
|
|
3676
|
+
setPoints(points: THREE.Vector3[]): void;
|
|
3677
|
+
getGripPoints(): THREE.Vector3[];
|
|
3678
|
+
dwgIn(obj: any): boolean;
|
|
3679
|
+
dwgOut(obj: any): any;
|
|
3680
|
+
}
|
|
3681
|
+
|
|
3682
|
+
declare const Mx_loadCoreCode: typeof loadCoreCode;
|
|
3683
|
+
declare const Mx_useCanvasResizeListener: typeof useCanvasResizeListener;
|
|
3684
|
+
declare const Mx_store: typeof store;
|
|
3685
|
+
declare const Mx_MxFun: typeof MxFun;
|
|
3686
|
+
declare const Mx_MxThreeJS: typeof MxThreeJS;
|
|
3687
|
+
declare const Mx_MxType: typeof MxType;
|
|
3688
|
+
declare const Mx_Mxassembly: typeof Mxassembly;
|
|
3689
|
+
declare const Mx_McGeTool: typeof McGeTool;
|
|
3690
|
+
declare const Mx_MrxDbgUtils: typeof MrxDbgUtils;
|
|
3691
|
+
type Mx_MrxDbgUiPrPoint = MrxDbgUiPrPoint;
|
|
3692
|
+
declare const Mx_MrxDbgUiPrPoint: typeof MrxDbgUiPrPoint;
|
|
3693
|
+
type Mx_McEdGetPointWorldDrawObject = McEdGetPointWorldDrawObject;
|
|
3694
|
+
declare const Mx_McEdGetPointWorldDrawObject: typeof McEdGetPointWorldDrawObject;
|
|
3695
|
+
type Mx_MrxDbgUiPrBaseReturn = MrxDbgUiPrBaseReturn;
|
|
3696
|
+
declare const Mx_MrxDbgUiPrBaseReturn: typeof MrxDbgUiPrBaseReturn;
|
|
3697
|
+
type Mx_MxDbEntity = MxDbEntity;
|
|
3698
|
+
declare const Mx_MxDbEntity: typeof MxDbEntity;
|
|
3699
|
+
type Mx_MxDbImage = MxDbImage;
|
|
3700
|
+
declare const Mx_MxDbImage: typeof MxDbImage;
|
|
3701
|
+
type Mx_MxDbSVG = MxDbSVG;
|
|
3702
|
+
declare const Mx_MxDbSVG: typeof MxDbSVG;
|
|
3703
|
+
type Mx_MxDbSVGText = MxDbSVGText;
|
|
3704
|
+
declare const Mx_MxDbSVGText: typeof MxDbSVGText;
|
|
3705
|
+
type Mx_MxDbPolyline = MxDbPolyline;
|
|
3706
|
+
declare const Mx_MxDbPolyline: typeof MxDbPolyline;
|
|
3707
|
+
type Mx_MxDb2LineAngularDimension = MxDb2LineAngularDimension;
|
|
3708
|
+
declare const Mx_MxDb2LineAngularDimension: typeof MxDb2LineAngularDimension;
|
|
3709
|
+
type Mx_Mx3PointArc = Mx3PointArc;
|
|
3710
|
+
declare const Mx_Mx3PointArc: typeof Mx3PointArc;
|
|
3711
|
+
type Mx_MxDbCoord = MxDbCoord;
|
|
3712
|
+
declare const Mx_MxDbCoord: typeof MxDbCoord;
|
|
3713
|
+
type Mx_MxDbLine = MxDbLine;
|
|
3714
|
+
declare const Mx_MxDbLine: typeof MxDbLine;
|
|
3715
|
+
type Mx_MxDbRect = MxDbRect;
|
|
3716
|
+
declare const Mx_MxDbRect: typeof MxDbRect;
|
|
3717
|
+
type Mx_MxDbAlignedDimension = MxDbAlignedDimension;
|
|
3718
|
+
declare const Mx_MxDbAlignedDimension: typeof MxDbAlignedDimension;
|
|
3719
|
+
type Mx_MxFilters = MxFilters;
|
|
3720
|
+
declare const Mx_MxFilters: typeof MxFilters;
|
|
3721
|
+
type Mx_McGiWorldDraw = McGiWorldDraw;
|
|
3722
|
+
type Mx_McGiWorldDrawType = McGiWorldDrawType;
|
|
3723
|
+
declare const Mx_McGiWorldDrawType: typeof McGiWorldDrawType;
|
|
3724
|
+
type Mx_MxDbArea = MxDbArea;
|
|
3725
|
+
declare const Mx_MxDbArea: typeof MxDbArea;
|
|
3726
|
+
type Mx_MxDbLeadTag = MxDbLeadTag;
|
|
3727
|
+
declare const Mx_MxDbLeadTag: typeof MxDbLeadTag;
|
|
3728
|
+
type Mx_MxDbAnyLine = MxDbAnyLine;
|
|
3729
|
+
declare const Mx_MxDbAnyLine: typeof MxDbAnyLine;
|
|
3730
|
+
type Mx_MxDbCloudLine = MxDbCloudLine;
|
|
3731
|
+
declare const Mx_MxDbCloudLine: typeof MxDbCloudLine;
|
|
3732
|
+
type Mx_MxDbRegularPolygon = MxDbRegularPolygon;
|
|
3733
|
+
declare const Mx_MxDbRegularPolygon: typeof MxDbRegularPolygon;
|
|
3734
|
+
type Mx_McGePoint3d = McGePoint3d;
|
|
3735
|
+
type Mx_McGePoint3dArray = McGePoint3dArray;
|
|
3736
|
+
type Mx_MxDbLeadComment = MxDbLeadComment;
|
|
3737
|
+
declare const Mx_MxDbLeadComment: typeof MxDbLeadComment;
|
|
3738
|
+
type Mx_MxDbRectBoxLeadComment = MxDbRectBoxLeadComment;
|
|
3739
|
+
declare const Mx_MxDbRectBoxLeadComment: typeof MxDbRectBoxLeadComment;
|
|
3740
|
+
type Mx_MxDbEllipse = MxDbEllipse;
|
|
3741
|
+
declare const Mx_MxDbEllipse: typeof MxDbEllipse;
|
|
3742
|
+
type Mx_MxDbText = MxDbText;
|
|
3743
|
+
declare const Mx_MxDbText: typeof MxDbText;
|
|
3744
|
+
type Mx_MxDrawObject = MxDrawObject;
|
|
3745
|
+
declare const Mx_MxDrawObject: typeof MxDrawObject;
|
|
3746
|
+
type Mx_MxDbHatch = MxDbHatch;
|
|
3747
|
+
declare const Mx_MxDbHatch: typeof MxDbHatch;
|
|
3748
|
+
type Mx_MxDbLayerTableRecord = MxDbLayerTableRecord;
|
|
3749
|
+
type Mx_MxDbDatabase = MxDbDatabase;
|
|
3750
|
+
declare const Mx_MxDbDatabase: typeof MxDbDatabase;
|
|
3751
|
+
type Mx_MxCADObject = MxCADObject;
|
|
3752
|
+
declare const Mx_MxCADObject: typeof MxCADObject;
|
|
3753
|
+
type Mx_MxDbGroup = MxDbGroup;
|
|
3754
|
+
declare namespace Mx {
|
|
3755
|
+
export {
|
|
3756
|
+
Mx_loadCoreCode as loadCoreCode,
|
|
3757
|
+
Mx_useCanvasResizeListener as useCanvasResizeListener,
|
|
3758
|
+
Mx_store as store,
|
|
3759
|
+
Mx_MxFun as MxFun,
|
|
3760
|
+
Mx_MxThreeJS as MxThreeJS,
|
|
3761
|
+
Mx_MxType as MxType,
|
|
3762
|
+
Mx_Mxassembly as Mxassembly,
|
|
3763
|
+
Mx_McGeTool as McGeTool,
|
|
3764
|
+
Mx_MrxDbgUtils as MrxDbgUtils,
|
|
3765
|
+
Mx_MrxDbgUiPrPoint as MrxDbgUiPrPoint,
|
|
3766
|
+
Mx_McEdGetPointWorldDrawObject as McEdGetPointWorldDrawObject,
|
|
3767
|
+
Mx_MrxDbgUiPrBaseReturn as MrxDbgUiPrBaseReturn,
|
|
3768
|
+
Mx_MxDbEntity as MxDbEntity,
|
|
3769
|
+
Mx_MxDbImage as MxDbImage,
|
|
3770
|
+
Mx_MxDbSVG as MxDbSVG,
|
|
3771
|
+
Mx_MxDbSVGText as MxDbSVGText,
|
|
3772
|
+
Mx_MxDbPolyline as MxDbPolyline,
|
|
3773
|
+
Mx_MxDb2LineAngularDimension as MxDb2LineAngularDimension,
|
|
3774
|
+
Mx_Mx3PointArc as Mx3PointArc,
|
|
3775
|
+
Mx_MxDbCoord as MxDbCoord,
|
|
3776
|
+
Mx_MxDbLine as MxDbLine,
|
|
3777
|
+
Mx_MxDbRect as MxDbRect,
|
|
3778
|
+
Mx_MxDbAlignedDimension as MxDbAlignedDimension,
|
|
3779
|
+
Mx_MxFilters as MxFilters,
|
|
3780
|
+
Mx_McGiWorldDraw as McGiWorldDraw,
|
|
3781
|
+
Mx_McGiWorldDrawType as McGiWorldDrawType,
|
|
3782
|
+
Mx_MxDbArea as MxDbArea,
|
|
3783
|
+
Mx_MxDbLeadTag as MxDbLeadTag,
|
|
3784
|
+
Mx_MxDbAnyLine as MxDbAnyLine,
|
|
3785
|
+
Mx_MxDbCloudLine as MxDbCloudLine,
|
|
3786
|
+
Mx_MxDbRegularPolygon as MxDbRegularPolygon,
|
|
3787
|
+
Mx_McGePoint3d as McGePoint3d,
|
|
3788
|
+
Mx_McGePoint3dArray as McGePoint3dArray,
|
|
3789
|
+
Mx_MxDbLeadComment as MxDbLeadComment,
|
|
3790
|
+
Mx_MxDbRectBoxLeadComment as MxDbRectBoxLeadComment,
|
|
3791
|
+
Mx_MxDbEllipse as MxDbEllipse,
|
|
3792
|
+
Mx_MxDbText as MxDbText,
|
|
3793
|
+
Mx_MxDrawObject as MxDrawObject,
|
|
3794
|
+
Mx_MxDbHatch as MxDbHatch,
|
|
3795
|
+
Mx_MxDbLayerTableRecord as MxDbLayerTableRecord,
|
|
3796
|
+
Mx_MxDbDatabase as MxDbDatabase,
|
|
3797
|
+
Mx_MxCADObject as MxCADObject,
|
|
3798
|
+
Mx_MxDbGroup as MxDbGroup,
|
|
3799
|
+
};
|
|
3800
|
+
}
|
|
3801
|
+
|
|
3802
|
+
export { McEdGetPointWorldDrawObject, McGePoint3d, McGePoint3dArray, McGeTool, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MrxDbgUiPrPoint, MrxDbgUtils, Mx3PointArc, MxCADObject, MxDb2LineAngularDimension, MxDbAlignedDimension, MxDbAnyLine, MxDbArea, MxDbCloudLine, MxDbCoord, MxDbDatabase, MxDbEllipse, MxDbEntity, MxDbGroup, MxDbHatch, MxDbImage, MxDbLayerTableRecord, MxDbLeadComment, MxDbLeadTag, MxDbLine, MxDbPolyline, MxDbRect, MxDbRectBoxLeadComment, MxDbRegularPolygon, MxDbSVG, MxDbSVGText, MxDbText, MxDrawObject, MxFilters, MxFun, MxThreeJS, MxType, Mxassembly, Mx as default, loadCoreCode, store, useCanvasResizeListener };
|