zyf-model-engine 0.0.2 → 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.
Files changed (111) hide show
  1. package/index.cjs +293 -0
  2. package/index.d.mts +1 -0
  3. package/index.d.ts +1 -0
  4. package/index.mjs +21645 -0
  5. package/package.json +33 -12
  6. package/style.css +1 -1
  7. package/types/components/CSvgIcon/components/SvgPathIcon.vue.d.ts +9 -0
  8. package/types/components/CSvgIcon/defaultIcons.d.ts +23 -0
  9. package/types/components/CSvgIcon/index.vue.d.ts +30 -0
  10. package/types/components/Empty/index.vue.d.ts +16 -0
  11. package/types/components/Overflow/index.vue.d.ts +11 -0
  12. package/types/components/UtilsMenu/components/BaseInfo/index.vue.d.ts +122 -0
  13. package/types/components/UtilsMenu/components/Card/index.vue.d.ts +42 -0
  14. package/types/components/UtilsMenu/components/ComInfo/index.vue.d.ts +128 -0
  15. package/types/components/UtilsMenu/components/Config/index.vue.d.ts +8 -0
  16. package/types/components/UtilsMenu/components/Cutting/clipping.d.ts +56 -0
  17. package/types/components/UtilsMenu/components/Cutting/index.vue.d.ts +128 -0
  18. package/types/components/UtilsMenu/components/Measure/index.vue.d.ts +122 -0
  19. package/types/components/UtilsMenu/components/Measure/interface/index.d.ts +5 -0
  20. package/types/components/UtilsMenu/components/Measure/measure.d.ts +106 -0
  21. package/types/components/UtilsMenu/components/ModelTree/index.vue.d.ts +875 -0
  22. package/types/components/UtilsMenu/components/ModelTree/interface/index.d.ts +19 -0
  23. package/types/components/UtilsMenu/components/ModelTree/utils/index.d.ts +13 -0
  24. package/types/components/UtilsMenu/components/Roam/index.vue.d.ts +125 -0
  25. package/types/components/UtilsMenu/components/SubMenu/index.vue.d.ts +18 -0
  26. package/types/components/UtilsMenu/index.vue.d.ts +15 -0
  27. package/types/components/UtilsMenu/interface/index.d.ts +129 -0
  28. package/types/index-dxf.vue.d.ts +15 -0
  29. package/types/index.d.ts +209 -0
  30. package/types/index.vue.d.ts +18 -0
  31. package/types/libs/CFace.d.ts +16 -0
  32. package/types/libs/CLabel.d.ts +13 -0
  33. package/types/libs/CLine.d.ts +49 -0
  34. package/types/libs/CText.d.ts +17 -0
  35. package/types/libs/MathUtils.d.ts +26 -0
  36. package/types/libs/ViewCube.d.ts +21 -0
  37. package/types/libs/materials.d.ts +4 -0
  38. package/types/libs/svg.d.ts +26 -0
  39. package/types/libs/types.d.ts +177 -0
  40. package/types/main.d.ts +22 -0
  41. package/types/manager/highLightMeshManager.d.ts +31 -0
  42. package/types/manager/lightManager.d.ts +35 -0
  43. package/types/manager/rayCasterManager.d.ts +18 -0
  44. package/types/tools/Events.d.ts +15 -0
  45. package/types/tools/math.d.ts +13 -0
  46. package/types/vendor/DXFPaser/BatchingKey.d.ts +25 -0
  47. package/types/vendor/DXFPaser/DxfFetcher.d.ts +6 -0
  48. package/types/vendor/DXFPaser/DxfScene.d.ts +95 -0
  49. package/types/vendor/DXFPaser/DxfWorker.d.ts +44 -0
  50. package/types/vendor/DXFPaser/DynamicBuffer.d.ts +30 -0
  51. package/types/vendor/DXFPaser/Entity.d.ts +18 -0
  52. package/types/vendor/DXFPaser/MTextFormatParser.d.ts +15 -0
  53. package/types/vendor/DXFPaser/MaterialKey.d.ts +8 -0
  54. package/types/vendor/DXFPaser/RBTree.d.ts +5 -0
  55. package/types/vendor/DXFPaser/TextRenderer.d.ts +43 -0
  56. package/types/vendor/DXFPaser/index.d.ts +26 -0
  57. package/types/vendor/controls/BaseArrow.d.ts +20 -0
  58. package/types/vendor/controls/FirstPersonControls.d.ts +32 -0
  59. package/types/vendor/controls/FlyControls.d.ts +18 -0
  60. package/types/vendor/controls/OrbitControls.d.ts +75 -0
  61. package/types/vendor/controls/TransformControls.d.ts +41 -0
  62. package/types/vendor/controls/directionControls.d.ts +26 -0
  63. package/types/vendor/loaders/GLTFLoader.d.ts +71 -0
  64. package/types/workbench/DxfViewer.d.ts +16 -0
  65. package/types/workbench/clickInfo.d.ts +24 -0
  66. package/types/workbench/clipping.d.ts +62 -0
  67. package/types/workbench/dxfMeasure.d.ts +92 -0
  68. package/types/workbench/dxfTools.d.ts +78 -0
  69. package/types/workbench/functionalComponent.d.ts +127 -0
  70. package/types/workbench/modelTree.d.ts +89 -0
  71. package/build/getEnv.d.ts +0 -13
  72. package/build/plugins.d.ts +0 -7
  73. package/build/proxy.d.ts +0 -11
  74. package/index.html +0 -7
  75. package/logo.png +0 -0
  76. package/manifest.webmanifest +0 -1
  77. package/registerSW.js +0 -1
  78. package/src/api/config/servicePort.d.ts +0 -2
  79. package/src/api/enums/httpEnum.d.ts +0 -29
  80. package/src/api/helper/axiosCancel.d.ts +0 -21
  81. package/src/api/helper/axiosFileCancel.d.ts +0 -27
  82. package/src/api/helper/checkStatus.d.ts +0 -6
  83. package/src/api/index.d.ts +0 -26
  84. package/src/api/interface/index.d.ts +0 -18
  85. package/src/components/CTree/interface/index.d.ts +0 -6
  86. package/src/components/Grid/interface/index.d.ts +0 -5
  87. package/src/components/ProTable/interface/index.d.ts +0 -66
  88. package/src/config/index.d.ts +0 -5
  89. package/src/config/nprogress.d.ts +0 -3
  90. package/src/config/piniaPersist.d.ts +0 -10
  91. package/src/config/serviceLoading.d.ts +0 -5
  92. package/src/enums/httpEnum.d.ts +0 -19
  93. package/src/hooks/interface/index.d.ts +0 -30
  94. package/src/hooks/useOnline.d.ts +0 -6
  95. package/src/hooks/useTable.d.ts +0 -47
  96. package/src/main.d.ts +0 -1
  97. package/src/stores/commonStore.d.ts +0 -2
  98. package/src/stores/index.d.ts +0 -2
  99. package/src/stores/interface/index.d.ts +0 -1
  100. package/src/utils/color.d.ts +0 -28
  101. package/src/utils/commonUtils.d.ts +0 -63
  102. package/src/utils/errorHandler.d.ts +0 -5
  103. package/src/utils/is.d.ts +0 -82
  104. package/src/utils/layoutUtils.d.ts +0 -44
  105. package/src/utils/localUtils.d.ts +0 -24
  106. package/src/utils/serviceDict.d.ts +0 -7
  107. package/sw.js +0 -1
  108. package/vite.config.d.ts +0 -2
  109. package/workbox-3e911b1d.js +0 -1
  110. package/zyf-model-engine.mjs +0 -45118
  111. package/zyf-model-engine.umd.js +0 -81
@@ -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,5 @@
1
+ import { CardProp } from '../../../interface/index';
2
+ import { default as Viewer } from '../../../../..';
3
+ export interface MeasureProps extends CardProp {
4
+ viewer?: Viewer;
5
+ }
@@ -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
+ }