【发布时间】:2021-12-31 22:02:56
【问题描述】:
How to get bounding box info of intersection box in forge viewer? 我想恢复要恢复的部分扩展框边界值。对于下面的方法,我得到框值。 getSelectionbox
现在我想将其恢复到查看器/将保存的值设置为查看器,因为有什么方法可用吗?
我使用了 setSectionBox(box),但它不适合我。
谢谢
这里是代码示例:
viewer.restoreState(currentState, null, false);
viewer.hide(Object.values(val.hiddenNodes));
if(Object.values(val.isolateNodes).length > 0){
viewer.isolate(Object.values(val.isolateNodes));
}
if(val.cutPlanes.length !== 0){
viewer.loadExtension("Autodesk.Section").then(function(sectionTool){
sectionTool.activate(val.sectionStyle);
var sectionTool = markupsExt.tool.getSectionBoxValues();
const sectionbboxmin = new THREE.Vector3(val.sectionBox[0], val.sectionBox[1], val.sectionBox[2]);
const sectionbboxmax = new THREE.Vector3(val.sectionBox[3], val.sectionBox[4], val.sectionBox[5]);
const box = new THREE.Box3(sectionbboxmin,sectionbboxmax);
box.transform = val.sectionBoxTransform;
sectionTool.setSectionBox(box);
});
}
【问题讨论】:
标签: autodesk-forge forge