简体   繁体   中英

Change size of cutplanes tool in Forge Viewer

I'm using ForgeViewer to display both IFC models and custom geometry (point clouds and meshes using THREE.js directly), and I'm using the Section tool to cut away parts of the model.

Is there anyway I can set the size of the planes in the UI. I want the arrows and planes to be centered around specific models making them easier to use. Also, it would be nice to be able to set the default size and position of the cutting box.

这里

这里

The size of the cutting plane/box as well as the position of the manipulating gizmo are estimated by the section tool based on the bounding box of all visible objects. There's no UI to change that behavior, but you might be able to reverse engineer the official Section tool and perhaps modify it to your needs.

Edit: alternatively, you could retrieve the THREE.js geometry representing the cutting plane after it's been created by the Section tool (and placed into viewer.impl.sceneAfter ) and customize it as needed.

Adding to Petr's answer...

  1. Use the 'box section' tool (see screenshot) and manually adjust the box size by clicking on each of the box faces to adjust. 在此处输入图片说明

  2. Then use Augusto's blog post (below) to programmatically capture (using viewer.getState(); ) and replay your box section ( viewer.setCutPlanes(planes); ).

https://forge.autodesk.com/blog/viewer-setcutplanes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM