zyf-model-engine 0.0.1 → 0.1.0
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/index.cjs +293 -0
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.mjs +21645 -0
- package/package.json +29 -99
- package/style.css +1 -0
- package/types/components/CSvgIcon/components/SvgPathIcon.vue.d.ts +9 -0
- package/types/components/CSvgIcon/defaultIcons.d.ts +23 -0
- package/types/components/CSvgIcon/index.vue.d.ts +30 -0
- package/types/components/Empty/index.vue.d.ts +16 -0
- package/types/components/Overflow/index.vue.d.ts +11 -0
- package/types/components/UtilsMenu/components/BaseInfo/index.vue.d.ts +122 -0
- package/types/components/UtilsMenu/components/Card/index.vue.d.ts +42 -0
- package/types/components/UtilsMenu/components/ComInfo/index.vue.d.ts +128 -0
- package/types/components/UtilsMenu/components/Config/index.vue.d.ts +8 -0
- package/types/components/UtilsMenu/components/Cutting/clipping.d.ts +56 -0
- package/types/components/UtilsMenu/components/Cutting/index.vue.d.ts +128 -0
- package/types/components/UtilsMenu/components/Measure/index.vue.d.ts +122 -0
- package/types/components/UtilsMenu/components/Measure/interface/index.d.ts +5 -0
- package/types/components/UtilsMenu/components/Measure/measure.d.ts +106 -0
- package/types/components/UtilsMenu/components/ModelTree/index.vue.d.ts +875 -0
- package/types/components/UtilsMenu/components/ModelTree/interface/index.d.ts +19 -0
- package/types/components/UtilsMenu/components/ModelTree/utils/index.d.ts +13 -0
- package/types/components/UtilsMenu/components/Roam/index.vue.d.ts +125 -0
- package/types/components/UtilsMenu/components/SubMenu/index.vue.d.ts +18 -0
- package/types/components/UtilsMenu/index.vue.d.ts +15 -0
- package/types/components/UtilsMenu/interface/index.d.ts +129 -0
- package/types/index-dxf.vue.d.ts +15 -0
- package/types/index.d.ts +209 -0
- package/types/index.vue.d.ts +18 -0
- package/types/libs/CFace.d.ts +16 -0
- package/types/libs/CLabel.d.ts +13 -0
- package/types/libs/CLine.d.ts +49 -0
- package/types/libs/CText.d.ts +17 -0
- package/types/libs/MathUtils.d.ts +26 -0
- package/types/libs/ViewCube.d.ts +21 -0
- package/types/libs/materials.d.ts +4 -0
- package/types/libs/svg.d.ts +26 -0
- package/types/libs/types.d.ts +177 -0
- package/types/main.d.ts +22 -0
- package/types/manager/highLightMeshManager.d.ts +31 -0
- package/types/manager/lightManager.d.ts +35 -0
- package/types/manager/rayCasterManager.d.ts +18 -0
- package/types/tools/Events.d.ts +15 -0
- package/types/tools/math.d.ts +13 -0
- package/types/vendor/DXFPaser/BatchingKey.d.ts +25 -0
- package/types/vendor/DXFPaser/DxfFetcher.d.ts +6 -0
- package/types/vendor/DXFPaser/DxfScene.d.ts +95 -0
- package/types/vendor/DXFPaser/DxfWorker.d.ts +44 -0
- package/types/vendor/DXFPaser/DynamicBuffer.d.ts +30 -0
- package/types/vendor/DXFPaser/Entity.d.ts +18 -0
- package/types/vendor/DXFPaser/MTextFormatParser.d.ts +15 -0
- package/types/vendor/DXFPaser/MaterialKey.d.ts +8 -0
- package/types/vendor/DXFPaser/RBTree.d.ts +5 -0
- package/types/vendor/DXFPaser/TextRenderer.d.ts +43 -0
- package/types/vendor/DXFPaser/index.d.ts +26 -0
- package/types/vendor/controls/BaseArrow.d.ts +20 -0
- package/types/vendor/controls/FirstPersonControls.d.ts +32 -0
- package/types/vendor/controls/FlyControls.d.ts +18 -0
- package/types/vendor/controls/OrbitControls.d.ts +75 -0
- package/types/vendor/controls/TransformControls.d.ts +41 -0
- package/types/vendor/controls/directionControls.d.ts +26 -0
- package/types/vendor/loaders/GLTFLoader.d.ts +71 -0
- package/types/workbench/DxfViewer.d.ts +16 -0
- package/types/workbench/clickInfo.d.ts +24 -0
- package/types/workbench/clipping.d.ts +62 -0
- package/types/workbench/dxfMeasure.d.ts +92 -0
- package/types/workbench/dxfTools.d.ts +78 -0
- package/types/workbench/functionalComponent.d.ts +127 -0
- package/types/workbench/modelTree.d.ts +89 -0
- package/.editorconfig +0 -15
- package/.env +0 -13
- package/.env.development +0 -20
- package/.env.production +0 -25
- package/.env.test +0 -25
- package/.eslintignore +0 -15
- package/.eslintrc-auto-import.json +0 -65
- package/.eslintrc.cjs +0 -66
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -5
- package/.prettierignore +0 -9
- package/.prettierrc.cjs +0 -41
- package/.stylelintignore +0 -4
- package/.stylelintrc.cjs +0 -40
- package/.vscode/extensions.json +0 -14
- package/.vscode/settings.json +0 -92
- package/CHANGELOG.md +0 -246
- package/LICENSE +0 -21
- package/README.md +0 -205
- package/auto-imports.d.ts +0 -132
- package/build/getEnv.ts +0 -46
- package/build/plugins.ts +0 -138
- package/build/proxy.ts +0 -28
- package/commitlint.config.cjs +0 -84
- package/components.d.ts +0 -28
- package/index.html +0 -105
- package/lint-staged.config.cjs +0 -8
- package/postcss.config.cjs +0 -5
- package/public/logo.png +0 -0
- package/src/App.vue +0 -16
- package/src/api/config/servicePort.ts +0 -3
- package/src/api/enums/httpEnum.ts +0 -35
- package/src/api/helper/axiosCancel.ts +0 -50
- package/src/api/helper/axiosFileCancel.ts +0 -62
- package/src/api/helper/checkStatus.ts +0 -97
- package/src/api/index.ts +0 -142
- package/src/api/interface/index.ts +0 -27
- package/src/assets/global-icons/icon-demo.svg +0 -1
- package/src/assets/iconfont/iconfont.scss +0 -44
- package/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/assets/images/empty-img.png +0 -0
- package/src/assets/option-icons/add.svg +0 -1
- package/src/assets/option-icons/check.svg +0 -1
- package/src/assets/option-icons/config.svg +0 -1
- package/src/assets/option-icons/del.svg +0 -1
- package/src/assets/option-icons/detail.svg +0 -1
- package/src/assets/option-icons/edit.svg +0 -2
- package/src/assets/option-icons/export.svg +0 -1
- package/src/assets/option-icons/folder.svg +0 -1
- package/src/assets/option-icons/full-screen.svg +0 -1
- package/src/assets/option-icons/more.svg +0 -1
- package/src/assets/option-icons/return.svg +0 -1
- package/src/assets/option-icons/search.svg +0 -1
- package/src/components/CSvgIcon/index.scss +0 -23
- package/src/components/CSvgIcon/index.vue +0 -74
- package/src/components/CTree/index.scss +0 -48
- package/src/components/CTree/index.vue +0 -176
- package/src/components/CTree/interface/index.ts +0 -6
- package/src/components/Dialog/index.scss +0 -74
- package/src/components/Dialog/index.vue +0 -87
- package/src/components/Empty/index.scss +0 -16
- package/src/components/Empty/index.vue +0 -43
- package/src/components/Grid/components/GridItem.vue +0 -68
- package/src/components/Grid/index.vue +0 -167
- package/src/components/Grid/interface/index.ts +0 -6
- package/src/components/Loading/index.scss +0 -67
- package/src/components/Loading/index.vue +0 -13
- package/src/components/Overflow/index.vue +0 -76
- package/src/components/ProTable/components/ColSetting.vue +0 -45
- package/src/components/ProTable/components/Pagination.vue +0 -29
- package/src/components/ProTable/components/SearchForm/components/SearchFormItem.vue +0 -93
- package/src/components/ProTable/components/SearchForm/index.scss +0 -12
- package/src/components/ProTable/components/SearchForm/index.vue +0 -91
- package/src/components/ProTable/components/TableColumn.vue +0 -56
- package/src/components/ProTable/index.scss +0 -14
- package/src/components/ProTable/index.vue +0 -274
- package/src/components/ProTable/interface/index.ts +0 -86
- package/src/components/ScrollBox/index.vue +0 -44
- package/src/components/SvgIcon/index.vue +0 -20
- package/src/components/Tabs/index.vue +0 -142
- package/src/config/index.ts +0 -12
- package/src/config/nprogress.ts +0 -12
- package/src/config/piniaPersist.ts +0 -19
- package/src/config/serviceLoading.ts +0 -45
- package/src/enums/httpEnum.ts +0 -24
- package/src/hooks/interface/index.ts +0 -32
- package/src/hooks/useOnline.ts +0 -27
- package/src/hooks/useTable.ts +0 -167
- package/src/main.ts +0 -35
- package/src/plugins/button/button.vue +0 -56
- package/src/plugins/index.js +0 -26
- package/src/plugins/index.vue +0 -24
- package/src/plugins/msg/msg.vue +0 -56
- package/src/stores/commonStore.ts +0 -9
- package/src/stores/index.ts +0 -8
- package/src/stores/interface/index.ts +0 -1
- package/src/styles/common.scss +0 -87
- package/src/styles/element.scss +0 -233
- package/src/styles/reset.scss +0 -20
- package/src/styles/var.scss +0 -2
- package/src/typings/global.d.ts +0 -37
- package/src/typings/window.d.ts +0 -8
- package/src/utils/color.ts +0 -59
- package/src/utils/commonUtils.ts +0 -175
- package/src/utils/errorHandler.ts +0 -28
- package/src/utils/is.ts +0 -147
- package/src/utils/layoutUtils.ts +0 -83
- package/src/utils/localUtils.ts +0 -42
- package/src/utils/serviceDict.ts +0 -9
- package/src/vite-env.d.ts +0 -6
- package/tsconfig.json +0 -50
- package/vite.config.ts +0 -76
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ComInfo as ComInfoProp } from '../../interface/index';
|
|
2
|
+
import { Mesh, LineSegments } from 'three';
|
|
3
|
+
declare function setComGroup(group: (Mesh | LineSegments)[]): Promise<void>;
|
|
4
|
+
declare function setComInfo(data: any): Promise<void>;
|
|
5
|
+
declare const _default: import('vue').DefineComponent<ComInfoProp, {
|
|
6
|
+
getCardDOMRect: () => any;
|
|
7
|
+
comInfo: any;
|
|
8
|
+
setComInfo: typeof setComInfo;
|
|
9
|
+
setComGroup: typeof setComGroup;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ComInfoProp> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
CardRef: {
|
|
12
|
+
$: import('vue').ComponentInternalInstance;
|
|
13
|
+
$data: {};
|
|
14
|
+
$props: Partial<{
|
|
15
|
+
size: {
|
|
16
|
+
width?: string;
|
|
17
|
+
height?: string;
|
|
18
|
+
};
|
|
19
|
+
close: boolean;
|
|
20
|
+
drag: boolean;
|
|
21
|
+
resize: boolean;
|
|
22
|
+
position: {
|
|
23
|
+
left?: string;
|
|
24
|
+
right?: string;
|
|
25
|
+
top?: string;
|
|
26
|
+
bottom?: string;
|
|
27
|
+
};
|
|
28
|
+
z: number;
|
|
29
|
+
}> & Omit<{
|
|
30
|
+
readonly title?: string;
|
|
31
|
+
readonly render?: import('vue').Component;
|
|
32
|
+
readonly z?: number;
|
|
33
|
+
readonly size?: {
|
|
34
|
+
width?: string;
|
|
35
|
+
height?: string;
|
|
36
|
+
};
|
|
37
|
+
readonly position?: {
|
|
38
|
+
left?: string;
|
|
39
|
+
right?: string;
|
|
40
|
+
top?: string;
|
|
41
|
+
bottom?: string;
|
|
42
|
+
};
|
|
43
|
+
readonly resize?: boolean;
|
|
44
|
+
readonly resizeCallback?: (rect: DOMRect) => void;
|
|
45
|
+
readonly drag?: boolean;
|
|
46
|
+
readonly dragCallback?: (rect: DOMRect) => void;
|
|
47
|
+
readonly close?: boolean;
|
|
48
|
+
readonly closeCallback?: (rect?: DOMRect | undefined) => void;
|
|
49
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "size" | "close" | "drag" | "resize" | "position" | "z">;
|
|
50
|
+
$attrs: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
$refs: {
|
|
54
|
+
[x: string]: unknown;
|
|
55
|
+
} & {
|
|
56
|
+
basePanel: HTMLDivElement;
|
|
57
|
+
};
|
|
58
|
+
$slots: Readonly<{
|
|
59
|
+
[name: string]: import('vue').Slot<any>;
|
|
60
|
+
}>;
|
|
61
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
62
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
63
|
+
$host: Element | null;
|
|
64
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
65
|
+
$el: HTMLDivElement;
|
|
66
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../../interface/index').CardProp> & Readonly<{}>, {
|
|
67
|
+
getBoundingClientRect: () => DOMRect;
|
|
68
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
69
|
+
size: {
|
|
70
|
+
width?: string;
|
|
71
|
+
height?: string;
|
|
72
|
+
};
|
|
73
|
+
close: boolean;
|
|
74
|
+
drag: boolean;
|
|
75
|
+
resize: boolean;
|
|
76
|
+
position: {
|
|
77
|
+
left?: string;
|
|
78
|
+
right?: string;
|
|
79
|
+
top?: string;
|
|
80
|
+
bottom?: string;
|
|
81
|
+
};
|
|
82
|
+
z: number;
|
|
83
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
84
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
85
|
+
created?: (() => void) | (() => void)[];
|
|
86
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
87
|
+
mounted?: (() => void) | (() => void)[];
|
|
88
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
89
|
+
updated?: (() => void) | (() => void)[];
|
|
90
|
+
activated?: (() => void) | (() => void)[];
|
|
91
|
+
deactivated?: (() => void) | (() => void)[];
|
|
92
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
93
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
94
|
+
destroyed?: (() => void) | (() => void)[];
|
|
95
|
+
unmounted?: (() => void) | (() => void)[];
|
|
96
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
97
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
98
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
99
|
+
};
|
|
100
|
+
$forceUpdate: () => void;
|
|
101
|
+
$nextTick: typeof import('vue').nextTick;
|
|
102
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
103
|
+
} & Readonly<{
|
|
104
|
+
size: {
|
|
105
|
+
width?: string;
|
|
106
|
+
height?: string;
|
|
107
|
+
};
|
|
108
|
+
close: boolean;
|
|
109
|
+
drag: boolean;
|
|
110
|
+
resize: boolean;
|
|
111
|
+
position: {
|
|
112
|
+
left?: string;
|
|
113
|
+
right?: string;
|
|
114
|
+
top?: string;
|
|
115
|
+
bottom?: string;
|
|
116
|
+
};
|
|
117
|
+
z: number;
|
|
118
|
+
}> & Omit<Readonly<import('../../interface/index').CardProp> & Readonly<{}>, "getBoundingClientRect" | ("size" | "close" | "drag" | "resize" | "position" | "z")> & import('vue').ShallowUnwrapRef<{
|
|
119
|
+
getBoundingClientRect: () => DOMRect;
|
|
120
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
121
|
+
$slots: {
|
|
122
|
+
header?(_: {}): any;
|
|
123
|
+
default?(_: {}): any;
|
|
124
|
+
footer?(_: {}): any;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}, HTMLDivElement>;
|
|
128
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Config as ConfigProp } from '../../interface/index';
|
|
2
|
+
declare function setShow(flag: boolean): void;
|
|
3
|
+
declare const _default: import('vue').DefineComponent<ConfigProp, {
|
|
4
|
+
show: any;
|
|
5
|
+
setShow: typeof setShow;
|
|
6
|
+
close: typeof close;
|
|
7
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ConfigProp> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Group } from 'three';
|
|
2
|
+
import { DirectionControls } from '../../../../vendor/controls/directionControls';
|
|
3
|
+
import { blankMethod } from '../../../../libs/types';
|
|
4
|
+
import { TransformControls } from '../../../../vendor/controls/TransformControls';
|
|
5
|
+
import { default as Viewer } from '../../../..';
|
|
6
|
+
export declare class Clipping {
|
|
7
|
+
private renderer;
|
|
8
|
+
private element;
|
|
9
|
+
private camera;
|
|
10
|
+
private globalPlanes;
|
|
11
|
+
private localPlanes;
|
|
12
|
+
private boxVertices;
|
|
13
|
+
private planes;
|
|
14
|
+
private boxMeshs;
|
|
15
|
+
private localMesh;
|
|
16
|
+
private meshs;
|
|
17
|
+
private objects;
|
|
18
|
+
control: any;
|
|
19
|
+
group: Group;
|
|
20
|
+
dragControl: DirectionControls;
|
|
21
|
+
transControl: TransformControls;
|
|
22
|
+
clippingType: "global" | "local" | "";
|
|
23
|
+
callBack?: blankMethod;
|
|
24
|
+
setParam?: blankMethod;
|
|
25
|
+
constructor(base: Viewer, params: {
|
|
26
|
+
callBackFun?: blankMethod;
|
|
27
|
+
set?: blankMethod;
|
|
28
|
+
});
|
|
29
|
+
setClippingType(type: "global" | "local" | ""): void;
|
|
30
|
+
private setLocalClipping;
|
|
31
|
+
/**
|
|
32
|
+
* 盒剖切
|
|
33
|
+
*/
|
|
34
|
+
private computedClippingPlane;
|
|
35
|
+
private setGlobalMesh;
|
|
36
|
+
private createMesh;
|
|
37
|
+
private createLine;
|
|
38
|
+
private injectMeshsAndLine;
|
|
39
|
+
private updateMeshsAndLine;
|
|
40
|
+
changeBoxCutting(param: {
|
|
41
|
+
x: number[];
|
|
42
|
+
y: number[];
|
|
43
|
+
z: number[];
|
|
44
|
+
}, type: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* 初始化controls控件 并且注册好事件 dragstart 开始拖拽 dragend 拖拽结束 drag 拖拽过程中
|
|
47
|
+
* 初始化 transformControl 处理事件
|
|
48
|
+
*/
|
|
49
|
+
private initEvents;
|
|
50
|
+
/**
|
|
51
|
+
* 重置所有的材质透明度
|
|
52
|
+
*/
|
|
53
|
+
private resetMaterial;
|
|
54
|
+
private updateLocalPlane;
|
|
55
|
+
detory(): void;
|
|
56
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { default as Viewer } from '../../../../index';
|
|
2
|
+
import { CardProp, BaseProp } from '../../interface/index';
|
|
3
|
+
interface ClippingProp {
|
|
4
|
+
viewer: Viewer;
|
|
5
|
+
cardConfig: CardProp;
|
|
6
|
+
currentActive?: Record<string, BaseProp | undefined>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<ClippingProp, {
|
|
9
|
+
setCurrentType: (type: "global" | "local" | "") => void;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ClippingProp> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
11
|
+
CardRef: {
|
|
12
|
+
$: import('vue').ComponentInternalInstance;
|
|
13
|
+
$data: {};
|
|
14
|
+
$props: Partial<{
|
|
15
|
+
size: {
|
|
16
|
+
width?: string;
|
|
17
|
+
height?: string;
|
|
18
|
+
};
|
|
19
|
+
close: boolean;
|
|
20
|
+
drag: boolean;
|
|
21
|
+
resize: boolean;
|
|
22
|
+
position: {
|
|
23
|
+
left?: string;
|
|
24
|
+
right?: string;
|
|
25
|
+
top?: string;
|
|
26
|
+
bottom?: string;
|
|
27
|
+
};
|
|
28
|
+
z: number;
|
|
29
|
+
}> & Omit<{
|
|
30
|
+
readonly title?: string;
|
|
31
|
+
readonly render?: import('vue').Component;
|
|
32
|
+
readonly z?: number;
|
|
33
|
+
readonly size?: {
|
|
34
|
+
width?: string;
|
|
35
|
+
height?: string;
|
|
36
|
+
};
|
|
37
|
+
readonly position?: {
|
|
38
|
+
left?: string;
|
|
39
|
+
right?: string;
|
|
40
|
+
top?: string;
|
|
41
|
+
bottom?: string;
|
|
42
|
+
};
|
|
43
|
+
readonly resize?: boolean;
|
|
44
|
+
readonly resizeCallback?: (rect: DOMRect) => void;
|
|
45
|
+
readonly drag?: boolean;
|
|
46
|
+
readonly dragCallback?: (rect: DOMRect) => void;
|
|
47
|
+
readonly close?: boolean;
|
|
48
|
+
readonly closeCallback?: (rect?: DOMRect | undefined) => void;
|
|
49
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "size" | "close" | "drag" | "resize" | "position" | "z">;
|
|
50
|
+
$attrs: {
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
};
|
|
53
|
+
$refs: {
|
|
54
|
+
[x: string]: unknown;
|
|
55
|
+
} & {
|
|
56
|
+
basePanel: HTMLDivElement;
|
|
57
|
+
};
|
|
58
|
+
$slots: Readonly<{
|
|
59
|
+
[name: string]: import('vue').Slot<any>;
|
|
60
|
+
}>;
|
|
61
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
62
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
63
|
+
$host: Element | null;
|
|
64
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
65
|
+
$el: HTMLDivElement;
|
|
66
|
+
$options: import('vue').ComponentOptionsBase<Readonly<CardProp> & Readonly<{}>, {
|
|
67
|
+
getBoundingClientRect: () => DOMRect;
|
|
68
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
69
|
+
size: {
|
|
70
|
+
width?: string;
|
|
71
|
+
height?: string;
|
|
72
|
+
};
|
|
73
|
+
close: boolean;
|
|
74
|
+
drag: boolean;
|
|
75
|
+
resize: boolean;
|
|
76
|
+
position: {
|
|
77
|
+
left?: string;
|
|
78
|
+
right?: string;
|
|
79
|
+
top?: string;
|
|
80
|
+
bottom?: string;
|
|
81
|
+
};
|
|
82
|
+
z: number;
|
|
83
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
84
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
85
|
+
created?: (() => void) | (() => void)[];
|
|
86
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
87
|
+
mounted?: (() => void) | (() => void)[];
|
|
88
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
89
|
+
updated?: (() => void) | (() => void)[];
|
|
90
|
+
activated?: (() => void) | (() => void)[];
|
|
91
|
+
deactivated?: (() => void) | (() => void)[];
|
|
92
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
93
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
94
|
+
destroyed?: (() => void) | (() => void)[];
|
|
95
|
+
unmounted?: (() => void) | (() => void)[];
|
|
96
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
97
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
98
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
99
|
+
};
|
|
100
|
+
$forceUpdate: () => void;
|
|
101
|
+
$nextTick: typeof import('vue').nextTick;
|
|
102
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
103
|
+
} & Readonly<{
|
|
104
|
+
size: {
|
|
105
|
+
width?: string;
|
|
106
|
+
height?: string;
|
|
107
|
+
};
|
|
108
|
+
close: boolean;
|
|
109
|
+
drag: boolean;
|
|
110
|
+
resize: boolean;
|
|
111
|
+
position: {
|
|
112
|
+
left?: string;
|
|
113
|
+
right?: string;
|
|
114
|
+
top?: string;
|
|
115
|
+
bottom?: string;
|
|
116
|
+
};
|
|
117
|
+
z: number;
|
|
118
|
+
}> & Omit<Readonly<CardProp> & Readonly<{}>, "getBoundingClientRect" | ("size" | "close" | "drag" | "resize" | "position" | "z")> & import('vue').ShallowUnwrapRef<{
|
|
119
|
+
getBoundingClientRect: () => DOMRect;
|
|
120
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
121
|
+
$slots: {
|
|
122
|
+
header?(_: {}): any;
|
|
123
|
+
default?(_: {}): any;
|
|
124
|
+
footer?(_: {}): any;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}, any>;
|
|
128
|
+
export default _default;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { Measure as MeasureProp } from '../../interface/index';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<MeasureProp, {
|
|
3
|
+
getCardDOMRect: () => any;
|
|
4
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MeasureProp> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
5
|
+
CardRef: {
|
|
6
|
+
$: import('vue').ComponentInternalInstance;
|
|
7
|
+
$data: {};
|
|
8
|
+
$props: Partial<{
|
|
9
|
+
size: {
|
|
10
|
+
width?: string;
|
|
11
|
+
height?: string;
|
|
12
|
+
};
|
|
13
|
+
close: boolean;
|
|
14
|
+
drag: boolean;
|
|
15
|
+
resize: boolean;
|
|
16
|
+
position: {
|
|
17
|
+
left?: string;
|
|
18
|
+
right?: string;
|
|
19
|
+
top?: string;
|
|
20
|
+
bottom?: string;
|
|
21
|
+
};
|
|
22
|
+
z: number;
|
|
23
|
+
}> & Omit<{
|
|
24
|
+
readonly title?: string;
|
|
25
|
+
readonly render?: import('vue').Component;
|
|
26
|
+
readonly z?: number;
|
|
27
|
+
readonly size?: {
|
|
28
|
+
width?: string;
|
|
29
|
+
height?: string;
|
|
30
|
+
};
|
|
31
|
+
readonly position?: {
|
|
32
|
+
left?: string;
|
|
33
|
+
right?: string;
|
|
34
|
+
top?: string;
|
|
35
|
+
bottom?: string;
|
|
36
|
+
};
|
|
37
|
+
readonly resize?: boolean;
|
|
38
|
+
readonly resizeCallback?: (rect: DOMRect) => void;
|
|
39
|
+
readonly drag?: boolean;
|
|
40
|
+
readonly dragCallback?: (rect: DOMRect) => void;
|
|
41
|
+
readonly close?: boolean;
|
|
42
|
+
readonly closeCallback?: (rect?: DOMRect | undefined) => void;
|
|
43
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "size" | "close" | "drag" | "resize" | "position" | "z">;
|
|
44
|
+
$attrs: {
|
|
45
|
+
[x: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
$refs: {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
} & {
|
|
50
|
+
basePanel: HTMLDivElement;
|
|
51
|
+
};
|
|
52
|
+
$slots: Readonly<{
|
|
53
|
+
[name: string]: import('vue').Slot<any>;
|
|
54
|
+
}>;
|
|
55
|
+
$root: import('vue').ComponentPublicInstance | null;
|
|
56
|
+
$parent: import('vue').ComponentPublicInstance | null;
|
|
57
|
+
$host: Element | null;
|
|
58
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
59
|
+
$el: HTMLDivElement;
|
|
60
|
+
$options: import('vue').ComponentOptionsBase<Readonly<import('../../interface/index').CardProp> & Readonly<{}>, {
|
|
61
|
+
getBoundingClientRect: () => DOMRect;
|
|
62
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
63
|
+
size: {
|
|
64
|
+
width?: string;
|
|
65
|
+
height?: string;
|
|
66
|
+
};
|
|
67
|
+
close: boolean;
|
|
68
|
+
drag: boolean;
|
|
69
|
+
resize: boolean;
|
|
70
|
+
position: {
|
|
71
|
+
left?: string;
|
|
72
|
+
right?: string;
|
|
73
|
+
top?: string;
|
|
74
|
+
bottom?: string;
|
|
75
|
+
};
|
|
76
|
+
z: number;
|
|
77
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
78
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
79
|
+
created?: (() => void) | (() => void)[];
|
|
80
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
81
|
+
mounted?: (() => void) | (() => void)[];
|
|
82
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
83
|
+
updated?: (() => void) | (() => void)[];
|
|
84
|
+
activated?: (() => void) | (() => void)[];
|
|
85
|
+
deactivated?: (() => void) | (() => void)[];
|
|
86
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
87
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
88
|
+
destroyed?: (() => void) | (() => void)[];
|
|
89
|
+
unmounted?: (() => void) | (() => void)[];
|
|
90
|
+
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
91
|
+
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
92
|
+
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
93
|
+
};
|
|
94
|
+
$forceUpdate: () => void;
|
|
95
|
+
$nextTick: typeof import('vue').nextTick;
|
|
96
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
97
|
+
} & Readonly<{
|
|
98
|
+
size: {
|
|
99
|
+
width?: string;
|
|
100
|
+
height?: string;
|
|
101
|
+
};
|
|
102
|
+
close: boolean;
|
|
103
|
+
drag: boolean;
|
|
104
|
+
resize: boolean;
|
|
105
|
+
position: {
|
|
106
|
+
left?: string;
|
|
107
|
+
right?: string;
|
|
108
|
+
top?: string;
|
|
109
|
+
bottom?: string;
|
|
110
|
+
};
|
|
111
|
+
z: number;
|
|
112
|
+
}> & Omit<Readonly<import('../../interface/index').CardProp> & Readonly<{}>, "getBoundingClientRect" | ("size" | "close" | "drag" | "resize" | "position" | "z")> & import('vue').ShallowUnwrapRef<{
|
|
113
|
+
getBoundingClientRect: () => DOMRect;
|
|
114
|
+
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
115
|
+
$slots: {
|
|
116
|
+
header?(_: {}): any;
|
|
117
|
+
default?(_: {}): any;
|
|
118
|
+
footer?(_: {}): any;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}, HTMLDivElement>;
|
|
122
|
+
export default _default;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { default as Viewer } from '../../../..';
|
|
2
|
+
/**
|
|
3
|
+
* @description 模型预览测量核心类(区别于 DXF 的 DXFMeasure):基于 Raycaster 的射线拾取
|
|
4
|
+
* 实现距离 / 角度 / 标高三种测量模式,左键持续加点、距离/角度自动完成,完成后创建
|
|
5
|
+
* 测量线条 + CLine + CText 标签并挂到 viewer 的 scene
|
|
6
|
+
*/
|
|
7
|
+
export declare class Measure {
|
|
8
|
+
private rays;
|
|
9
|
+
private step;
|
|
10
|
+
private state;
|
|
11
|
+
private element;
|
|
12
|
+
private raycaster;
|
|
13
|
+
private camera;
|
|
14
|
+
private point;
|
|
15
|
+
private currentObj;
|
|
16
|
+
private group;
|
|
17
|
+
private points;
|
|
18
|
+
private curr_line;
|
|
19
|
+
private down;
|
|
20
|
+
private pointMesh;
|
|
21
|
+
private callback?;
|
|
22
|
+
private viewer;
|
|
23
|
+
private start;
|
|
24
|
+
private end;
|
|
25
|
+
private events;
|
|
26
|
+
UNIT: {
|
|
27
|
+
unit: string;
|
|
28
|
+
precision: string;
|
|
29
|
+
};
|
|
30
|
+
constructor(viewer: Viewer, params: {
|
|
31
|
+
callback?: (param: any) => void;
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* 初始化所有的点击 移动事件
|
|
35
|
+
*/
|
|
36
|
+
private initEvents;
|
|
37
|
+
/**
|
|
38
|
+
* move事件
|
|
39
|
+
* @param event MouseEvent
|
|
40
|
+
*/
|
|
41
|
+
private mouseMoveEvent;
|
|
42
|
+
/**
|
|
43
|
+
* 鼠标抬起事件
|
|
44
|
+
* @param event MouseEvent
|
|
45
|
+
* @returns Undefind
|
|
46
|
+
*/
|
|
47
|
+
private upEvent;
|
|
48
|
+
/**
|
|
49
|
+
* 鼠标按下事件
|
|
50
|
+
*/
|
|
51
|
+
private downEvent;
|
|
52
|
+
/**
|
|
53
|
+
* 创建距离测量线
|
|
54
|
+
* @param points 点的数组
|
|
55
|
+
* @returnsVector3
|
|
56
|
+
*/
|
|
57
|
+
private createDistanceLine;
|
|
58
|
+
/**
|
|
59
|
+
* 创建角度测量线
|
|
60
|
+
* @param points 点的数组
|
|
61
|
+
* @returns
|
|
62
|
+
*/
|
|
63
|
+
private createAngleLine;
|
|
64
|
+
/**
|
|
65
|
+
* 创建面积测量
|
|
66
|
+
* @param points 点的数组
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
private createAreaLine;
|
|
70
|
+
/**
|
|
71
|
+
* 创建标高测量线
|
|
72
|
+
* @param points 点的数组
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
private createElevationLine;
|
|
76
|
+
/**
|
|
77
|
+
* 创建标高测量
|
|
78
|
+
* @param points 点的数组
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
private createHeight;
|
|
82
|
+
/**
|
|
83
|
+
* 计算当前三角面的边缘点
|
|
84
|
+
* @param matrix 当前实体的变换矩阵
|
|
85
|
+
* @param geometry 当前实体的顶点数据
|
|
86
|
+
* @param face face数据
|
|
87
|
+
* @param point 点位置
|
|
88
|
+
* @returns 点 Vector3
|
|
89
|
+
*/
|
|
90
|
+
private computedEdegPoint;
|
|
91
|
+
adjustSetting(param: {
|
|
92
|
+
unit: string;
|
|
93
|
+
precision: string;
|
|
94
|
+
}): void;
|
|
95
|
+
/**
|
|
96
|
+
* 测距单位设置
|
|
97
|
+
* @param unit 单位
|
|
98
|
+
* @param height 距离
|
|
99
|
+
* @param precision 精度
|
|
100
|
+
* @returns 点 Vector3
|
|
101
|
+
*/
|
|
102
|
+
judeUnit(unit: string, height: number, precision: number): string;
|
|
103
|
+
setType(type: "distance" | "angle" | "elevation" | ""): void;
|
|
104
|
+
clearAll(): void;
|
|
105
|
+
destory(): void;
|
|
106
|
+
}
|