2

If I first load a model into the viewer with units meter and then loads a model with units millimeter, the last loaded model is scaled wrong. It's location is way off and it is 1000 times too big. It looks like the viewer thinks the second model is in meters as well. (Same thing happens with all models that has different units).

Is there something I can do to prevent this? I rather not scale all the geometry after it's loaded.

FrodeTo
  • 83
  • 1
  • 10

1 Answers1

1

If you want to override the units of the second model, this config might help while calling the Viewer3D#loadModel.

const modelOpts = {
    applyScaling: 'm'
};

viewer.loadModel( modelURN, modelOpts );

It supports the following units:

  • meter, meters or m
  • feet and inches
  • foot, feet or ft
  • inch, inches or in
  • centimeter, centimeters or cm
  • millimeter, millimeters or mm

Hope it helps!

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
  • BTW! Is there a list of all the "hidden" model options that we can set? – FrodeTo Mar 28 '19 at 14:38
  • I'm sorry to say that the answer is unfortunately no... :( However, our engineering team is working on improving the viewer documentation as I know. Before release, please contact us for model options. – Eason Kang Mar 29 '19 at 07:55