I’m visualizing Revit models in a custom Three.js viewer. I’ve collected both Revit DataObjects (metadata) and mesh geometry objects through the GraphQL API, but all meshes appear stacked at the same location. So far, I’ve found that some elements appear as Instances with transforms under Objects.Other.InstanceProxy, connected to definitions via definitionId, and these give valid transform matrices. However, meshes still appear stacked at the same location in the viewer.
My question is: how can I reliably link each Revit element to its corresponding mesh and obtain the correct transformation matrix for proper placement in 3D space?
Is there a reason you want to visualise Speckle data outside the Speckle Viewer package, which already handles all the transformations, loading, and applications you are seeking?
I’m studying the possibility of using Revit data from Speckle in a custom web app later on. If I use the Speckle Viewer package, do I still have full control over the element data (e.g. geometry, materials) for custom logic or interactions?
If you don’t want to use it, you can look into the source code for inspiration. I don’t have the capacity to properly help you otherwise on a custom solution viewer.
That said, speckle community is pretty giving maybe someone else does