[英]How to get Autodesk Viewer LayerManager to RestoreState properly
[英]How to remove all cut planes when using restoreState in Forge Viewer
我正在使用 restoreState function 来设置切割平面,它工作得很好:
NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": [[0,0,0,0]]}'));
但是如何再次删除切割面? 显示所有对象都不起作用,也不起作用
NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": []}'));
或者
NOP_VIEWER.setCutPlanes();
一种方法是
NOP_VIEWER.restoreState(JSON.parse('{"cutplanes": null}'));
根据文档,您必须将一个空数组传递给 setCutPlanes()
https://forge.autodesk.com/en/docs/viewer/v7/reference/Viewing/Viewer3D/#setcutplanes-planes
传递一个空列表或 null 相当于设置零剖切面
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.