修改BIM管理

dev_xd
haha 2025-07-25 23:01:15 +08:00
parent e1891fbfa0
commit 1873d9fe7d
1 changed files with 13 additions and 4 deletions

View File

@ -912,7 +912,7 @@ export default {
if (api.m_model.size > 0) { if (api.m_model.size > 0) {
setTimeout(() => { setTimeout(() => {
this.initModelPosition() this.initModelPosition()
}, 10000) }, 1000)
} else { } else {
setTimeout(fnInit, 1000); setTimeout(fnInit, 1000);
} }
@ -967,6 +967,7 @@ export default {
let z = cfg?.z || 0; let z = cfg?.z || 0;
let rotateZ = cfg?.rotateZ || 0; let rotateZ = cfg?.rotateZ || 0;
if (x * 1 + y * 1 + z * 1 != 0) { if (x * 1 + y * 1 + z * 1 != 0) {
console.log("移动模型", modelId, x, y, z)
api.Model.moveToPosition([x, y, z], 0, modelId) api.Model.moveToPosition([x, y, z], 0, modelId)
} }
if (rotateZ * 1 != 0) { if (rotateZ * 1 != 0) {
@ -977,7 +978,15 @@ export default {
this.hideParts.push(it); this.hideParts.push(it);
}) })
} }
setTimeout(() => {
api.Model.location(modelId); api.Model.location(modelId);
this.resetScene();
if (x * 1 + y * 1 + z * 1 != 0) {
setTimeout(() => {
api.Camera.lookAt({ position: [x, y, z], distance: 20000, heading: 90, pitch: -45 })
}, 1000);
}
}, 1000);
} }
this.initHideParts() this.initHideParts()
}); });
@ -987,7 +996,7 @@ export default {
let hideCnt = 0; let hideCnt = 0;
let hideFn = () => { let hideFn = () => {
hideCnt++; hideCnt++;
if (hideCnt > 30) { if (hideCnt > 20) {
return; return;
} }
setTimeout(() => { setTimeout(() => {