Message Boards Message Boards

Download a .stl file from a 3DPlot using Mathematica online Student?

GROUPS:

Is it possible to download a .stl file from a 3DPlot.

model = Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2},PlotTheme->"ThickSurface"]

Printout3D[model,"model.stl"]

I can not change Directory on the Mathematica on-line Student version.

POSTED BY: Tom Mendoza
Answer
3 months ago

[I am not sure for Student edition of Mathematica, but this reply may anyways be useful to you]

Doing Printout3D[model] should yield something like this:

enter image description here

where, Printout3DPreviewer option, might be interesting to you.

If you want to "download" (Export) the model, the thing you should do is:

Export["test.stl",  model]
(* ==> "test.stl" *)

You can see more info on .stl here.

Printout3D prints to some service (modifiable):

enter image description here

but, if you have a 3D printer connected to your machine, you can directly print to it.

POSTED BY: Mikayel Egibyan
Answer
3 months ago

what i find interesting is the directory is wolframcloud/usrfiles which i can't find and is not on my system

enter image description here enter image description here

POSTED BY: Tom Mendoza
Answer
3 months ago

In what environment are you evaluating the code? Desktop or Cloud?

What is the output of the following evaluation for you?

FindFile[Normal[Printout3D[model, "model.stl"]]["FileName"]]
POSTED BY: Mikayel Egibyan
Answer
3 months ago

Cloud /wolframcloud/userfiles/ba9/ba9a1691-48ac-417b-964f-1a1467d3d5a6/model.stl was the output

POSTED BY: Tom Mendoza
Answer
3 months ago

Try this:

CopyFile[
    "/wolframcloud/userfiles/ba9/ba9a1691-48ac-417b-964f-1a1467d3d5a6/model.stl",
    CloudObject["model.stl"]
]

I also strongly suspect that the value of $HomeDirectory for you is "/wolframcloud/userfiles/ba9/ba9a1691-48ac-417b-964f-1a1467d3d5a6/", correct?

That means that the file is in your home, but is not a CloudObject, however it should still be visible in your home (without doing the operation above).

POSTED BY: Carlo Barbieri
Answer
3 months ago

Wow! that worked the files are available in my cloud now

enter image description here

POSTED BY: Tom Mendoza
Answer
3 months ago

They were always available, just not visible as CloudObjects.

POSTED BY: Carlo Barbieri
Answer
3 months ago

Sorry the operation seems to work but the file has zero bytes

enter image description here

POSTED BY: Tom Mendoza
Answer
3 months ago

Group Abstract Group Abstract