Message Boards Message Boards

Exporting a data driven Surface to STL?

Posted 8 years ago

I'm very new to Mathematica, so I'm not sure what is going on here; my lack of knowledge or if it is a bug. But basically I am trying to export a data driven surface to STL to bring into Rhino.

ListPlot3D[{{2001, 2009, 824}, {2001, 2010, 1865}, {2001, 2011, 
       1912}, {2001, 2012, 2147}, {2001, 2013, 1443}, {2001, 2014, 
       1892}, {2001, 2015, 1992}, {2002, 2009, 823}, {2002, 2010, 
       1828}, {2002, 2011, 1718}, {2002, 2012, 1643}, {2002, 2013, 
       1121}, {2002, 2014, 1783}, {2002, 2015, 1594}}]
    Export["test.stl", %112, "STL"]

So I am able to get a result I like,

enter image description here

However the STL (attached) looks nothing like this, in any software I've tried. Solidworks, Rhino, Microsoft 3D Builder, ect. So I tried to re import it into Mathematica and I got the same result.

enter image description here

Please help, am I missing a code of did I stumble on a bug, I'm leaning towards the first option...

Attachments:
POSTED BY: Tomas Rojcik
3 Replies

try something like:

data = {{2001, 2009, 824}, {2001, 2010, 1865}, {2001, 2011, 
    1912}, {2001, 2012, 2147}, {2001, 2013, 1443}, {2001, 2014, 
    1892}, {2001, 2015, 1992}, {2002, 2009, 823}, {2002, 2010, 
    1828}, {2002, 2011, 1718}, {2002, 2012, 1643}, {2002, 2013, 
    1121}, {2002, 2014, 1783}, {2002, 2015, 1594}};
data = Transpose[Rescale /@ Transpose[data]];
ListPlot3D[data]
Export["test.stl", %, "STL"]

now it should be 'cubic'.

POSTED BY: Sander Huisman
Posted 8 years ago

Thank you that worked perfectly.

POSTED BY: Tomas Rojcik
Posted 8 years ago

Look at the box dimensions of the plot. The surface occupies a space of about 1x5x1000+. So the exported STL is needle thin. If you add the option BoxRatios->Automatic to ListPlot3D you will see this directly.

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract