Scaling of imported .stl from Cheetah 3D

Support for UP Software. To report a bug, post with a title [BUG REPORT]. To request a feature, post with a title [FEATURE REQUEST]
Post Reply
ajohnsonlaird
Posts: 47
Joined: Sat Nov 23, 2013 6:35 am

Scaling of imported .stl from Cheetah 3D

Post by ajohnsonlaird » Sat Feb 22, 2014 7:15 am

I'm just testing the workflow for creating 3D models in Cheetah 3D, exporting an .STL files, and opening them in the UP software.

In Cheetah 3D, my test file is a 1.0 unit cube -- Cheetah 3D just works in arbitrary units but you can set the scaling of the 3D model as you do an export to .STL -- the default is 1.0.

When I open the .STL file, it comes into the UP software as a 25.4mm cube, so it looks like the UP software is assuming a metric conversion is required.

The .STL file is shown below and, off the cuff, doesn't look as though it has anything untoward in it -- but this is the first time I've bothered to inspect an .STL file, so what do I know? :)

What I'd like to achieve is that the .STL file be opened in the UP software so that the cube is 10 mm -- anyone happen to know how to tweak the units/scaling, please?

Thanks
Andy


solid Cheetah3Dfile
facet normal -0.0000 -1.0000 0.0000
outer loop
vertex 0.5000 -0.5000 0.5000
vertex -0.5000 -0.5000 0.5000
vertex -0.5000 -0.5000 -0.5000
endloop
endfacet
facet normal 0.0000 -1.0000 0.0000
outer loop
vertex -0.5000 -0.5000 -0.5000
vertex 0.5000 -0.5000 -0.5000
vertex 0.5000 -0.5000 0.5000
endloop
endfacet
facet normal -0.0000 1.0000 0.0000
outer loop
vertex -0.5000 0.5000 0.5000
vertex 0.5000 0.5000 0.5000
vertex 0.5000 0.5000 -0.5000
endloop
endfacet
facet normal 0.0000 1.0000 0.0000
outer loop
vertex 0.5000 0.5000 -0.5000
vertex -0.5000 0.5000 -0.5000
vertex -0.5000 0.5000 0.5000
endloop
endfacet
facet normal -1.0000 0.0000 0.0000
outer loop
vertex -0.5000 -0.5000 0.5000
vertex -0.5000 0.5000 0.5000
vertex -0.5000 0.5000 -0.5000
endloop
endfacet
facet normal -1.0000 0.0000 0.0000
outer loop
vertex -0.5000 0.5000 -0.5000
vertex -0.5000 -0.5000 -0.5000
vertex -0.5000 -0.5000 0.5000
endloop
endfacet
facet normal 1.0000 0.0000 0.0000
outer loop
vertex 0.5000 0.5000 0.5000
vertex 0.5000 -0.5000 0.5000
vertex 0.5000 -0.5000 -0.5000
endloop
endfacet
facet normal 1.0000 0.0000 0.0000
outer loop
vertex 0.5000 -0.5000 -0.5000
vertex 0.5000 0.5000 -0.5000
vertex 0.5000 0.5000 0.5000
endloop
endfacet
facet normal 0.0000 0.0000 1.0000
outer loop
vertex 0.5000 0.5000 0.5000
vertex -0.5000 0.5000 0.5000
vertex -0.5000 -0.5000 0.5000
endloop
endfacet
facet normal 0.0000 0.0000 1.0000
outer loop
vertex -0.5000 -0.5000 0.5000
vertex 0.5000 -0.5000 0.5000
vertex 0.5000 0.5000 0.5000
endloop
endfacet
facet normal 0.0000 0.0000 -1.0000
outer loop
vertex 0.5000 -0.5000 -0.5000
vertex -0.5000 -0.5000 -0.5000
vertex -0.5000 0.5000 -0.5000
endloop
endfacet
facet normal 0.0000 0.0000 -1.0000
outer loop
vertex -0.5000 0.5000 -0.5000
vertex 0.5000 0.5000 -0.5000
vertex 0.5000 -0.5000 -0.5000
endloop
endfacet
endsolid
-----
UpBox and UP Plus 2 : Forensic Software Analyst : Portland, Oregon, USA.

mr6k
Posts: 327
Joined: Tue Feb 14, 2012 11:47 am

Re: Scaling of imported .stl from Cheetah 3D

Post by mr6k » Sat Feb 22, 2014 10:41 am

If a file has an object of apparently fairly small dimensions, it assumes the model was created in imperial units, rather than metric. It automatically scales it up by a factor of 25.4 to 1. You can scale it back down very easily. Look under the scaling pull down menu You will see a scaling factor of 0.0393 or similar (i am not at my machine at the moment) . Select that scale and then hit x, y, z. The model will shrink back to the original size.

cheers


Peter

User avatar
DrewPetitclerc
Posts: 581
Joined: Sat Feb 12, 2011 7:39 am
Location: Silicon Valley California
Contact:

Re: Scaling of imported .stl from Cheetah 3D

Post by DrewPetitclerc » Sat Feb 22, 2014 8:52 pm

It sounds like your software is saying 1 = 1 inch. :o
Can you change that behavior in your chosen 3D software? :lol:

If you want 1 centimeter and your software is saying 1 = 1 inch, you can understand what is at fault here. :geek:

The UP software works in millimeters (metric), it will try to interpret your intent and it assumes you know the build limits are 140mm x 140mm x 140mm, so when you import an STL file it assumes the part should fit somewhat within its build area, if it is grossly large or small it assumes a inch/metric conversion needs to be applied due to this misunderstanding, but you can easily change it back with the "scale" command also they have a handy metric scale along the left and back edge of the virtual build plate in the software to help with your decision to correct this(your) error. :geek:

Try making your part a unit of 0.3937007874015748 on a side and when it is translated into an STL file and loaded into the UP software you may find that you get a 10mm cube. :ugeek:

Either way I'm sure the software is screaming in its nightmare "I saw a 2!" :lol:
Happy "Inch-Metric-Inch-Metric" day to all! :D
Drew Petitclerc
Petitclerc Designs
Owner/Senior Principal Designer, prototype, tooling and test equipment design and 3D printing
http://flash-graphics.deviantart.com/
http://www.thingiverse.com/DrewPetitclerc

ajohnsonlaird
Posts: 47
Joined: Sat Nov 23, 2013 6:35 am

Re: Scaling of imported .stl from Cheetah 3D

Post by ajohnsonlaird » Sat Feb 22, 2014 10:09 pm

Thanks Mr6k and Drew.
I should confess to being a systems programmer of several decades of experience, so I was just being indolent and wondering whether there was an automated way of setting a "Use Metric Dammit" option that would maintain state across successive invocations of the UP software rather than having to do it every time (with the concomitant risk that I would screw it up out of sheer boredom).... :)

The irony is the Cheetah 3D is written by an extraordinarily talented programmer in Germany (and thus, if anything, would be in metric units), and the STL file is being opened by the UP software (which is in metric), but somewhere, something is converting it to Imperial....and I need to come out into the daylight with its hands, feet, and inches up in the air!

I don't see anything in the STL file that suggests Imperial units...but....

I've since realized that I can spoof the UP software by using a downscaling factor when I export to STL in Cheetah 3D so that the STL file will already be scaled down by 0.3937 etc. You gotta do what you gotta do, I suppose. Still seems a bit daft, though.... :)

Andy.
-----
UpBox and UP Plus 2 : Forensic Software Analyst : Portland, Oregon, USA.

mr6k
Posts: 327
Joined: Tue Feb 14, 2012 11:47 am

Re: Scaling of imported .stl from Cheetah 3D

Post by mr6k » Sat Feb 22, 2014 11:39 pm

Andy,

I confess to not knowing Cheetah, however assuming the dimensions in the file listing you provided have no other parameters described elsewhere inch , cm or mm, the fact that the UP always assumes dimensions are in mm, it would see your file as being an extremely tiny object having a largest dimension of a few mm at best, this is why it assumed the file was in inches as it would not expect to be sent or to print such a small object !

cheers
Peter

ajohnsonlaird
Posts: 47
Joined: Sat Nov 23, 2013 6:35 am

Re: Scaling of imported .stl from Cheetah 3D

Post by ajohnsonlaird » Sun Feb 23, 2014 1:00 am

Thanks, Peter.

I see what you're saying. The problem is that Cheetah 3D just works in device/world independent "units." So the mapping to real device/real world dimensions happens outside of Cheetah 3D (or when exporting), and I didn't see anything pertaining to scaling in the STL file either.

I didn't realize that the UP software would make assumptions about metric/imperial based on STL numerical magnitudes.... I'll experiment some more with tweaking Cheetah 3D's Export to STL scaling factor and see what the correct setting is to get the UP software to stay in metric.

Thanks
Andy.
-----
UpBox and UP Plus 2 : Forensic Software Analyst : Portland, Oregon, USA.

ajohnsonlaird
Posts: 47
Joined: Sat Nov 23, 2013 6:35 am

Re: Scaling of imported .stl from Cheetah 3D

Post by ajohnsonlaird » Sun Feb 23, 2014 1:55 am

Just in case anyone reads this thread later and happens to be using Cheetah3D, the solution was to go to Preferences and change the STL Export value from 1.0 to 0.3937 -- this value is the recip of 2.54.

With it, a one unit cube in Cheetah 3D is imported into the UP software as 10 mm, basically remapping Cheetah 3Ds units to centimeters.

This is the resulting STL file:


solid Cheetah3Dfile
facet normal -0.0000 -1.0000 0.0000
outer loop
vertex 0.1969 -0.1969 0.1969
vertex -0.1969 -0.1969 0.1969
vertex -0.1969 -0.1969 -0.1969
endloop
endfacet
facet normal 0.0000 -1.0000 0.0000
outer loop
vertex -0.1969 -0.1969 -0.1969
vertex 0.1969 -0.1969 -0.1969
vertex 0.1969 -0.1969 0.1969
endloop
endfacet
facet normal -0.0000 1.0000 0.0000
outer loop
vertex -0.1969 0.1969 0.1969
vertex 0.1969 0.1969 0.1969
vertex 0.1969 0.1969 -0.1969
endloop
endfacet
facet normal 0.0000 1.0000 0.0000
outer loop
vertex 0.1969 0.1969 -0.1969
vertex -0.1969 0.1969 -0.1969
vertex -0.1969 0.1969 0.1969
endloop
endfacet
facet normal -1.0000 0.0000 0.0000
outer loop
vertex -0.1969 -0.1969 0.1969
vertex -0.1969 0.1969 0.1969
vertex -0.1969 0.1969 -0.1969
endloop
endfacet
facet normal -1.0000 0.0000 0.0000
outer loop
vertex -0.1969 0.1969 -0.1969
vertex -0.1969 -0.1969 -0.1969
vertex -0.1969 -0.1969 0.1969
endloop
endfacet
facet normal 1.0000 0.0000 0.0000
outer loop
vertex 0.1969 0.1969 0.1969
vertex 0.1969 -0.1969 0.1969
vertex 0.1969 -0.1969 -0.1969
endloop
endfacet
facet normal 1.0000 0.0000 0.0000
outer loop
vertex 0.1969 -0.1969 -0.1969
vertex 0.1969 0.1969 -0.1969
vertex 0.1969 0.1969 0.1969
endloop
endfacet
facet normal 0.0000 0.0000 1.0000
outer loop
vertex 0.1969 0.1969 0.1969
vertex -0.1969 0.1969 0.1969
vertex -0.1969 -0.1969 0.1969
endloop
endfacet
facet normal 0.0000 0.0000 1.0000
outer loop
vertex -0.1969 -0.1969 0.1969
vertex 0.1969 -0.1969 0.1969
vertex 0.1969 0.1969 0.1969
endloop
endfacet
facet normal 0.0000 0.0000 -1.0000
outer loop
vertex 0.1969 -0.1969 -0.1969
vertex -0.1969 -0.1969 -0.1969
vertex -0.1969 0.1969 -0.1969
endloop
endfacet
facet normal 0.0000 0.0000 -1.0000
outer loop
vertex -0.1969 0.1969 -0.1969
vertex 0.1969 0.1969 -0.1969
vertex 0.1969 -0.1969 -0.1969
endloop
endfacet
endsolid
-----
UpBox and UP Plus 2 : Forensic Software Analyst : Portland, Oregon, USA.

nilloc
Posts: 1
Joined: Sun Feb 24, 2013 5:16 am

Re: Scaling of imported .stl from Cheetah 3D

Post by nilloc » Sun Jun 14, 2015 12:59 am

I know it's kinda late for most people here but a better solution for Cheetah3D -> UP.app importing:

Set Export Scale for STL files to 10.0 in Cheetah

1 Cheatah unit does indeed appear as 1mm in UP, so it's automatically assuming it's an inch and converts it (thanks @mr6k)
Setting the scale to 10 make 1 Cheetah unit = 10 STL Units, which correctly imports to 10mm (1cm) in UP.app

Thanks Mr6k, that was the solution!

Post Reply