Units in a SketchUp model and faces with short edges



I was doing some work on the Rhino to SketchUp export plugin recently and I noticed a TODO I had made about setting the units in the SketchUp file if Rhino’s units were one of the SUModelUnits enums (setting a scale factor based on our units to inches otherwise). I see a SUModelGetUnits function in the SDK but no SUModelSetUnits, so unless the Rhino model was in inches I’m always scaling. How do you set the unit system on a SUModelRef? Just for grins I tried changing the unit system in SketchUp 2016 too but couldn’t figure that out either. Are you guys just inches now and SUModelGetUnits is for legacy files?

The reason I even started looking at the unit system again is I noticed that edges smaller than about .002 inches don’t get turned into faces right when I bring a model exported from Rhino into SketchUp. It’s fine to have a component with a scale transform that makes it smaller but not if the geometry itself has edges shorter than that. Is that supposed to happen? Is there a certain length, under which stuff doesn’t work right? I was going to pop up a message box to warn users when they have geometry that might not open right in SketchUp but I wanted to make sure I got it right.



Forgot to mention. Looks like the version of the SDK we’re using (based on the .dll version info) is 16.0.19912.0.