简体   繁体   中英

Web-ifc-three: How to get the geometry by expressId only, without picking?

I have a question, please. How to get the geometry by expressId only, without picking? Having an expressId(s) I need to know the geometry, ie the corresponding threejs object(s). I tried createSubset, but this method returns (as I found) not the mesh of the subset, but the mesh of the whole model. let subset =...createSubset({ modelID: ..., ids: [id], material: ... scene: ..., removePrevious: true }); Thank you in advance!

For performance sake, IFC.js combines all the items of the model in a single mesh. Having each item as a single mesh would result in the browser not being able to handle medium sized models due to the draw calls.

Subsets are not exactly the whole model. Each subset shares the same position , normal , and expressID buffers with the whole model to save memory, but each subset has its own index array. Notice that both the whole model and the subset are indexed BufferGeometries.

If you want to reconstruct an individual Three.js Mesh from a subset, you can do it like I explained in this other answer . Please note that there is a reason behind this decision, and Mesh reconstruction should only be used for export purposes.

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