Message Boards Message Boards

is it possible to export this to .stl format?

I am working with cutting thin glass miirrors in a NC controlled femtosecond laser ( from Newport ). The laser guiding software is a bit awkward, but it can import .stl files, and not much else. So I have tried to generate 3D cutting lines in Mathematica and exporting them to .stl files. The code below will generate my cutting lines and plot them:

dxy = .1; h = 2; linn = Table[{Line[{{0, 31.3 + d, h}, {3.2, 31.3 + d, h}}], Line[{{31.3 + d, 0, h}, {31.3 + d, 3.2, h}}]}, {d, 0, .5, dxy}, {h, 0, h, 0.5}];

circles1 = ParametricPlot3D[Table[{7.4 + (2.9 + s) Cos[u], 5.9 + (2.9 + s) Sin[u], h}, {s, 0, 0.5, dxy}, {h, 0, h, 0.5}], {u, 0, 2 [Pi]}, PlotStyle -> {Black,Thin}]; startarcs = ParametricPlot3D[Table[{{2 + (2 - v) Cos[u], 2 + (2 - v) Sin[u], h}, {31.4 + (28.2 - v) Cos[u], 31.4 + (28.2 - v) Sin[u], h}}, {v, 0, 0.5, dxy},{h, 0, h, 0.5}], {u, [Pi], 3 [Pi]/2}, PlotStyle -> {Black, Thin}];

stlexporttest = Show[{startarcs, circles1, Graphics3D[linn]}, PlotRange -> All]

The cut lines are bundles of lines since the laser ablation volume since is very tiny.

Anyway, Export["stlexporttest1.stl", stlexporttest] gives an error : ""Graphics3D contains no data that can be exported to the \ \!(\"STL\") format. ""

not so strange maybe since the line bundles have no volume,

the question is: if there is some export switch that allows lines to be exported to .stl or some other way to set up the stl file so it can be read by the Newport laser guiding software?

POSTED BY: peter weijnitz
2 Replies
POSTED BY: peter weijnitz
Posted 10 years ago

Hi Peter,

I am not familiar with the the Newport laser. I wonder why it wants an STL. Does it want to cut away the material defined by the STL? Or is the STL describing the material that remains?

Generally, STL files define a solid as a surface which is approximated by triangles. So I would expect to need to define the lines as volumes.If the volumes. Perhaps like this:

In[1]:= SetDirectory[NotebookDirectory[]]

Out[1]= "C:\\Users\\David\\Documents\\Mathematica Files"

In[2]:= line = Cuboid[{{0, 0, 0}, {1, .1, .1}}] // Graphics3D;

In[3]:= Export["line.stl", line]

Out[3]= "line.stl"

In[4]:= Import["line.stl"]

enter image description here

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