File Exchange Pick of the Week

June 5th, 2009

Writing to STL files

Jiro's pick this week is surf2stl by Bill McDonald.

About a month ago, at a seminar I gave at a university, a graduate student came up to me and asked whether there was a function for writing out 3D model files. Specifically, he was referring to STL files (stereolithography files). It was a topical question because it came soon after I talked about some of the exporting capabilities in MATLAB for graphical file formats.

I knew that we didn't have any built in, but I promptly suggested checking out the File Exchange. I've seen a few functions for reading from STL files, so I figured there would be counterparts. Sure enough, there were a few. Here's a list of entries with a tag of "stl".

From the list, I am highlighting Bill's surf2stl. It has nice help, clean code, good reviews, and has even inspired another entry.

Download and give it a try!

Comments?


Get the MATLAB code

Published with MATLAB® 7.8

2 Responses to “Writing to STL files”

  1. Yousif m. ali replied on :

    I have the following question and hope that you may shed some light on it. Thanks in advance
    I am working on image, how to recover scale, rotation, shear from projective t-matrix?
    For example:
    1.6971 1.838 0
    -1.314 0.989 0
    0 0 1

  2. jiro replied on :

    Yousif, I’m not sure I understand your question. It’s probably better to post your question on the newsgroup

    http://www.mathworks.com/matlabcentral/newsreader/

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • oleg: The author has implemented skewness, kurtosis and checks answering appropriately to the critic.
  • Ashok: how to store 10 or more random number in a loop a loop for i = 1:n mean(i) = input(’enter the mean value...
  • Ben: Doug, Thanks for the very helpful videos! Uitables seem like a convenient way to make a customized property...
  • oleg: Allstats has no checks, no comments and could also be improved (talking about prctile implementatio). Not to...
  • Todd: Additional information and a link to download free MATLAB and Simulink LEGO MINDSTORMS NXT code can be found at...
  • Doug: @Leo, Here is the “English version” of that code. “vec = []” makes an empty variable...
  • leo: Dear Doug I have a question in your code ‘October 9th, 2009 at 13:53′ vec = []; vec = [vec val]; I...
  • Shanker Keshavdas: You sir, are a gentleman and a scholar… No really, helped me out a lot. As to what is...
  • Quan Zheng: how can I get a copy of stepspecs.m?
  • Doug: @Lucy I think this is what you seek to move a line with the mouse in MATLAB. http://blogs.math...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.