Closed ffreality closed 2 years ago
Hi ffreality... The hierarchy is stored in a instance tree json file, a separate file. The hierarchy is a collection of branch nodes and leaf nodes, each containing a unique DBID.
Here's a branch node and it's unique DBID...
Meanwhile, the leaf node DBID, points to a single mesh object.
Here's an example of a leaf node (mesh object):
When we convert SVF to glTF, we only need to deal with leaf nodes. So we put the leaf's DBID (integer) into the node name (glTF string).
Use the instance tree json, to create a Tree View UI of the complete hierarchy, and use that UI to set visibility of the leaf nodes (ie. the glTF dbids).
Does that make sense?
Yep, the SVF file format stores all geometries in a flat list, and it then provides a logical hierarchy on top of these geometries in a separate data structure. When converting SVF files to the glTF format we keep the flat list but you are free to add the logical hierarchy to your application if you want to, for example, by retrieving the hierarchy from the GET {urn}/metadata/{guid} endpoint, and linking the dbIDs in the hierarchy to the dbIDs in the glTF (they're embedded into the node names).
Converted GLTF/GLB files don't preserve its mesh hierarchy and names. Example CAD convert workflow
IAM > SVF (Forge API) > GLB (Forge Convert Utils) but all assemblies gone. I just have numbered static mesh components.