SketchUp/sketchup-stl

Seems to export files rotated 90º when previewed

jsejcksn opened this issue · 5 comments

I'm previewing files with the built-in Quick Look in macOS 10.12.2.

When I export STL files from SketchUp in the default axis orientation, it looks like this:

zup

z-up axis orientation

stl-zup

Quick Look preview

That is also how output from Fusion 360 appears. I think it looks really odd that the model starts out on its side like that.

However, when I orient the y-axis upward in Fusion 360, it exports my STL like so:

yup

y-up axis orientation

stl-zup

Quick Look preview

But doing the same thing in SketchUp doesn't change the orientation in the preview. This is a more true representation of my model as I see it in the software.

My SketchUp model is attached for reference.

e.skp.zip

This is a result of different applications using different axes for Up. SketchUp uses Z, sounds like Fusion 360 by default also use Z as Up. While Quick Look in OS-X uses Y.

When working with STL files most files I've used is Z up. Don't think I have many that is Y up.

Windows' preview window will display Z up:

image

I didn't find any options for Z or Y up though. Do Quick Look have some options for that?

Another issue here is that the API until recently didn't provide access of the model's working axis. Which is why changing the axes in SU didn't work for the export. Taking that into account would be good.

Though for this particular Z/Y issues I think the better solution is to have an Export option. Though I wonder if Quick View is the odd one out here, with Y up for STL files. I'd like to compare a few files from Thingyverse etc.

Hi @thomthom:

In a new install of Fusion 360, y-up is the default axis orientation.

QuickLook does not have any preferences because it is just a universal file preview tool. It is activated in macOS by pressing the spacebar when a file is selected and will give a visual preview of the contents if possible.

3D models (including STL files) can be opened natively in macOS in the Preview app. It also does not have any preferences related to up axis, although the Inspector (Info window) does display up axis if that information is embedded in a 3d model. I'm not sure if that's part of the STL spec or not—none of the STL files exported from SketchUp or Fusion 360 display information in that field in Preview, although the models exported from Fusion 360 are oriented differently depending on up axis. I have included a .zip of the STL files (I modeled an F this time so there's no symmetry/ambiguity) and here's a screenshot of the Inspector window of Preview:

inspector

stl-f-export-test.zip

STL format doesn't specify a standard for "up" as far as I can tell. Best is probably to add an import/export option for what axis is up.

Checking in on this after >1 yr. What's the status—is it fixed, in the backlog, etc.? (I haven't tested since raising the issue.)

SketchUp 2018 shipped with native STL importer/exporter. Both importer and exporter have options for Z/Y being up.

image