1

I can use the Viewer API to get the bounding box size of a model:

model.getBoundingBox()

But how can I accomplish it by using the Model Derivative API, So I can get the size of model on server side instead of client side?

Thank you!

Taufiq Rahman
  • 5,600
  • 2
  • 36
  • 44
Zheng Xing
  • 277
  • 2
  • 7
  • I don't think there is a way to accomplish that in the current state of the API, this is purely geometric approach. The bounding box is not stored as part of the data, it is computed as the model gets loaded in the viewer. If you want to perform server-side workflow, one suggestion would be to download the .obj export of the model, write some code that will parse that .obj and compute the bounding box. It should be possible to find libs for whatever programming language you use on your server that can deal with .obj ... – Felipe Nov 28 '16 at 08:04
  • Thank you @Philippe – Zheng Xing Nov 30 '16 at 05:58

1 Answers1

1

At the moment, the simplest solution may be to request and download an OBJ version of the model and analyse that to determine its bounding box.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17