Closed leefsmp closed 4 years ago
Hi Philippe :)
Regarding the first question, each model usually has the world bounds stored in its metadata:
One thing I'm not sure about is whether it's guaranteed to always be there, so computing the bounds yourself from the fragment list data might be a safer choice.
Regarding the second question, as you can see in the SvfReader implementation, the parseMeshes
function is used to process individual "geometry pack files" (0.pf, 1.pf, 2.pf, ...). The samples folder includes various usage examples. For example, you could take the remote-svf-to-gltf.js script and modify it by passing an existing token to the ModelDerivativeClient
class instead of passing in client ID/secret. Or you can simply use the command-line tool available in this repository which can already accept FORGE_ACCESS_TOKEN
as an env. variable.
Thanks.
Hi Petr! I would be interested in determining the bounding box of a given Forge model without loading it in the viewer.
So my first question is am I correct that I would need to iterate all the meshes of the model and compute the union bbox myself? Or there is a global bbox data available directly?
Then my second is would you be able to provide a slightly more detailed example of using
parseMeshes
. I am not sure how I should get thebuffer
passed as input ofparseMeshes
. I've got a URN and a token, what should be the workflow to parse meshes of the whole model? Would be fantastic.Thanks ;)