@xtctwins/tctwins-industry-engine 0.1.3 → 0.1.4
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/README.md +198 -196
- package/dist/01.xtc +0 -0
- package/dist/02.xtc +0 -0
- package/dist/03.xtc +0 -0
- package/dist/{AnnotationTool-C7l6-OOY.mjs → AnnotationTool-B-tSv3tj.mjs} +3 -3
- package/dist/{CameraViewTool-D_EQ41Z1.mjs → CameraViewTool-BCeW5YQi.mjs} +2 -2
- package/dist/CommentTool-BiNZ0gP0.mjs +1573 -0
- package/dist/{HiddenTool-CIeAjgxq.mjs → HiddenTool-CQgqgQOI.mjs} +2 -2
- package/dist/Industry_Viewer_Lib.es.js +1 -1
- package/dist/Industry_Viewer_Lib.umd.js +107 -107
- package/dist/{InspectorTool-CZod-iTj.mjs → InspectorTool-DdeeIiy6.mjs} +4 -4
- package/dist/{MeasureTool-D4LogF0O.mjs → MeasureTool-BWxDlOrg.mjs} +7 -7
- package/dist/{MouseTool-zmgqeZnH.mjs → MouseTool-BaWo19sf.mjs} +1 -1
- package/dist/{NavigateTool-CS2EopuR.mjs → NavigateTool-P2CQZ5uL.mjs} +1 -1
- package/dist/{OperateTool-CG2aVzKk.mjs → OperateTool-CL4Z9vC6.mjs} +28 -31
- package/dist/{RoamTool-BFL8VDlB.mjs → RoamTool-D50ZahpY.mjs} +14 -14
- package/dist/{ScreenShotTool-Dz5RLoqN.mjs → ScreenShotTool-DX4tJ4c7.mjs} +2 -2
- package/dist/{SectionTool-IkA1bJ2y.mjs → SectionTool-CHOZY2Ae.mjs} +4 -4
- package/dist/{SettingTool-DCIDMjRW.mjs → SettingTool-DYHEMpSZ.mjs} +3 -3
- package/dist/{StructureTree-BT4rCLqe.mjs → StructureTree-ln-gqr_v.mjs} +4 -4
- package/dist/{alert-LKnose49.mjs → alert-BlGVPNN7.mjs} +13 -13
- package/dist/{index-BDeMc4ft.mjs → index-DCtqSY0Q.mjs} +11663 -11666
- package/dist/index.html +17 -0
- package/dist/{panel.vue_vue_type_style_index_0_lang-CCRmuixj.mjs → panel.vue_vue_type_style_index_0_lang-vbG2ciOc.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tallPanel-D4xjdoyB.mjs → tallPanel-C5ESC0HW.mjs} +6 -6
- package/package.json +85 -85
- package/types/components/BimViewerComponents/CommentTool.vue.d.ts +27 -0
- package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +14 -14
- package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +14 -14
- package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +3 -1
- package/types/components/BimViewerComponents/StructureTree.vue.d.ts +184 -184
- package/types/components/BimxViewerComp.vue.d.ts +25 -0
- package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +14 -14
- package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +14 -14
- package/types/components/utilsComponents/tallPanel.vue.d.ts +1 -1
- package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +1 -1
- package/types/pages/BimxViewerEntry.vue.d.ts +71 -0
- package/types/pages/IndustryViewerEntry.vue.d.ts +6 -1
- package/types/store/initConfigs.d.ts +1 -1
- package/dist/CommentTool-p6Un2NpR.mjs +0 -1528
package/README.md
CHANGED
|
@@ -1,196 +1,198 @@
|
|
|
1
|
-
## @xtctwins/tctwins-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<!--
|
|
55
|
-
<!-- :file-path
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
:
|
|
61
|
-
:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
import
|
|
74
|
-
import "@xtctwins/tctwins-industry-engine
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
//
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
1
|
+
## @xtctwins/tctwins-industry-engine
|
|
2
|
+
|
|
3
|
+
> 当前源码的项目介绍与模块定位见 [AI 分层导航](docs/ai/README.md)。下方包含历史接入样例;包名、公开导出和参数以当前源码及包配置为准。
|
|
4
|
+
|
|
5
|
+
# xtc 三维文件查看器
|
|
6
|
+
|
|
7
|
+
## 安装相关依赖
|
|
8
|
+
|
|
9
|
+
## UI element-plus
|
|
10
|
+
|
|
11
|
+
<https://www.npmjs.com/package/element-plus>
|
|
12
|
+
|
|
13
|
+
```ssh
|
|
14
|
+
npm i element-plus
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 事件总线 mitt
|
|
18
|
+
|
|
19
|
+
<https://www.npmjs.com/package/mitt>
|
|
20
|
+
|
|
21
|
+
```ssh
|
|
22
|
+
npm i mitt
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 状态管理 pinia
|
|
26
|
+
|
|
27
|
+
<https://www.npmjs.com/package/pinia>
|
|
28
|
+
|
|
29
|
+
```ssh
|
|
30
|
+
npm i pinia
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 文件获取 ali-oss
|
|
34
|
+
|
|
35
|
+
<https://www.npmjs.com/package/ali-oss>
|
|
36
|
+
|
|
37
|
+
```ssh
|
|
38
|
+
npm i ali-oss
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
# 安装依赖
|
|
42
|
+
|
|
43
|
+
```ssh
|
|
44
|
+
// 安装依赖
|
|
45
|
+
npm i @xtctwins/tctwins-bimx-engine
|
|
46
|
+
// 引入样式
|
|
47
|
+
import "@xtctwins/tctwins-bimx-engine/dist/style.css";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
# Example
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
<template>
|
|
54
|
+
<!-- 一个模型 -->
|
|
55
|
+
<!-- :model-buffer 和 :file-path 选一个使用即可-->
|
|
56
|
+
<!-- :model-buffer 是直接传入模型buffer数据-->
|
|
57
|
+
<!-- :file-path 是传入文件下载路径-->
|
|
58
|
+
<IndustryViewer
|
|
59
|
+
v-if="initialzed"
|
|
60
|
+
:load-meta="true"
|
|
61
|
+
:file-path="filePath"
|
|
62
|
+
:nav-cube-size="120"
|
|
63
|
+
:background-color="'#d0d0d0'"
|
|
64
|
+
@emit-handler="EmitHandler" />
|
|
65
|
+
|
|
66
|
+
<!-- 集成模型 -->
|
|
67
|
+
<!-- 请使用-->
|
|
68
|
+
<!--:file-paths="filePaths"-->
|
|
69
|
+
<!--:multi-model="true"-->
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<script lang="ts" setup>
|
|
73
|
+
import { onMounted, ref } from "vue";
|
|
74
|
+
import { IndustryViewer } from "@xtctwins/tctwins-industry-engine";
|
|
75
|
+
import type { EventContent } from "@xtctwins/tctwins-industry-engine";
|
|
76
|
+
import "@xtctwins/tctwins-industry-engine/dist/style.css";
|
|
77
|
+
|
|
78
|
+
const initialzed = ref(false);
|
|
79
|
+
const filePath = ref(`https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
|
|
80
|
+
const filePaths = [
|
|
81
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
|
|
82
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
|
|
83
|
+
"https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170731500203.xtc"
|
|
84
|
+
];
|
|
85
|
+
const modelBuffer = ref<ArrayBuffer>();
|
|
86
|
+
|
|
87
|
+
onMounted(() => {
|
|
88
|
+
//如果选择直接传入模型modelBuffer,请在获取到buffer后再初始化IndustryViewer
|
|
89
|
+
// getModel(() => {
|
|
90
|
+
// initialzed.value = true;
|
|
91
|
+
// });
|
|
92
|
+
|
|
93
|
+
//如果使用filePath或者filePaths则直接初始化IndustryViewer即可
|
|
94
|
+
initialzed.value = true;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
//监听引擎传出的事件
|
|
98
|
+
const EmitHandler = (content: EventContent) => {
|
|
99
|
+
console.log(content);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
//xtc模型数据
|
|
103
|
+
const getModel = (callback: () => void) => {
|
|
104
|
+
// 自行填写获取模型文件的内容
|
|
105
|
+
// ...
|
|
106
|
+
// modelBuffer.value = ...
|
|
107
|
+
callback();
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style>
|
|
112
|
+
#app {
|
|
113
|
+
position: absolute;
|
|
114
|
+
left: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
top: 0;
|
|
117
|
+
bottom: 0;
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 100%;
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 其他参数解释
|
|
126
|
+
|
|
127
|
+
### 基础设置
|
|
128
|
+
|
|
129
|
+
是否载入构件属性信息(xts文件),
|
|
130
|
+
如果要载入,在模型xtc文件相同路径下必须有同名xts文件
|
|
131
|
+
|
|
132
|
+
```ssh
|
|
133
|
+
:load-meta="true"
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
是否显示导航盒
|
|
137
|
+
|
|
138
|
+
```ssh
|
|
139
|
+
:showNavCube="true"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
导航盒尺寸
|
|
143
|
+
|
|
144
|
+
```ssh
|
|
145
|
+
:nav-cube-size="120"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
背景颜色
|
|
149
|
+
|
|
150
|
+
```ssh
|
|
151
|
+
:background-color="#d0d0d0"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 功能
|
|
155
|
+
|
|
156
|
+
添加需要的即可
|
|
157
|
+
|
|
158
|
+
```ssh
|
|
159
|
+
inspector
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
inspector - 构建属性面板开启 (需要开启loadMeta)
|
|
163
|
+
|
|
164
|
+
```ssh
|
|
165
|
+
reseta
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
reseta - 重置模型视角
|
|
169
|
+
|
|
170
|
+
## 事件
|
|
171
|
+
|
|
172
|
+
```ssh
|
|
173
|
+
//监听引擎传出的事件
|
|
174
|
+
const EmitHandler = (content: EventContent) => {
|
|
175
|
+
console.log(content);
|
|
176
|
+
};
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
//事件内容
|
|
181
|
+
type EventContent = {
|
|
182
|
+
isTool: boolean;
|
|
183
|
+
event_target: ComponentName | "IndustryViewer" | "ToolBar";
|
|
184
|
+
event_name: string;
|
|
185
|
+
content: {};
|
|
186
|
+
};
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
事件内容包括:
|
|
190
|
+
|
|
191
|
+
```ssh
|
|
192
|
+
"pickedEntity" - 点击构件
|
|
193
|
+
"pickedNothing" - 点击空白处
|
|
194
|
+
...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
##### 测试
|
package/dist/01.xtc
ADDED
|
Binary file
|
package/dist/02.xtc
ADDED
|
Binary file
|
package/dist/03.xtc
ADDED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as D } from "./alert-
|
|
1
|
+
import { _ as D } from "./alert-BlGVPNN7.mjs";
|
|
2
2
|
import { defineComponent as H, ref as p, watch as O, onMounted as q, onBeforeUnmount as F, openBlock as i, createElementBlock as a, unref as n, createCommentVNode as b, createElementVNode as r, normalizeClass as f, Fragment as B, renderList as C, toDisplayString as R, withDirectives as U, createVNode as z, vShow as G } from "vue";
|
|
3
|
-
import { F as j, G as J, H as o, I as v, al as l, P as c, M as K } from "./index-
|
|
3
|
+
import { F as j, G as J, H as o, I as v, al as l, P as c, M as K } from "./index-DCtqSY0Q.mjs";
|
|
4
4
|
const Q = { class: "annotation_component" }, Y = {
|
|
5
5
|
key: 0,
|
|
6
6
|
id: "annotation_toolbar",
|
|
@@ -160,7 +160,7 @@ const Q = { class: "annotation_component" }, Y = {
|
|
|
160
160
|
]);
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
}), ge = /* @__PURE__ */ K(de, [["__scopeId", "data-v-
|
|
163
|
+
}), ge = /* @__PURE__ */ K(de, [["__scopeId", "data-v-0df82279"]]);
|
|
164
164
|
export {
|
|
165
165
|
ge as default
|
|
166
166
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as X, H as Y, I as x, W as z, P as y, M as A } from "./index-
|
|
1
|
+
import { G as X, H as Y, I as x, W as z, P as y, M as A } from "./index-DCtqSY0Q.mjs";
|
|
2
2
|
import { defineComponent as G, ref as l, watch as k, onMounted as O, onBeforeUnmount as j, openBlock as u, createElementBlock as g, normalizeClass as T, createElementVNode as t, createBlock as q, withCtx as F, unref as B, withDirectives as I, vModelText as N, createCommentVNode as J } from "vue";
|
|
3
3
|
const K = { class: "cameraView_tool_btn" }, Q = ["src"], Z = {
|
|
4
4
|
key: 1,
|
|
@@ -158,7 +158,7 @@ const K = { class: "cameraView_tool_btn" }, Q = ["src"], Z = {
|
|
|
158
158
|
], 2);
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
}), ue = /* @__PURE__ */ A(ce, [["__scopeId", "data-v-
|
|
161
|
+
}), ue = /* @__PURE__ */ A(ce, [["__scopeId", "data-v-d67e4755"]]);
|
|
162
162
|
export {
|
|
163
163
|
ue as default
|
|
164
164
|
};
|