Message Boards Message Boards

1
|
5160 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Error when exporting STL file?

Posted 3 years ago

The Wolfram Language Introductory Book, chapter 44 Importing and Exporting, gives an example of exporting 3D geometry in a format suitable for 3D printing. I copied the example to my notebook.

Export["spikey.stl",Entity["Polyhedron","RhombicHexecontahedron"]["Image"]]

But when I run it I get the error message Export: Image cannot be exported to the STL format.

If I change the file name to Spikey.pdf it exports OK to a pdf file.

I ran $ExportFormats and STL is listed as a format for my session.

I can view it OK by just using

Entity["Polyhedron","RhombicHexecontahedron"]["Image"]

and I tried exporting with and without the "Image" included.

I tried a simple object, a Tetrahedron, but same results. It seems odd it doesn't work straight out of the "official" introductory book.

My Mathematica is version 12.0 and is running on a Raspberry Pi Linux system.

Any suggestions ?

POSTED BY: Robert McLean
2 Replies
Posted 3 years ago

Thank you Sean, that solved my problem.

POSTED BY: Robert McLean
Posted 3 years ago

The documentation for STL says it uses the "MeshRegion" element to export by default. Looks like there's a "MeshRegion" property that exports ok for me:

In[30]:= Export["test.stl", Entity["Polyhedron", "RhombicHexecontahedron"]["MeshRegion"]]

Out[30]= "test.stl"
POSTED BY: Sean Cheren
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