Monday, November 11, 2013

Exporting an STL from Matlab

In this tutorial, you will learn a simple way to export a 3D image as an STL by using Matlab. The functions you'll need to make the STL file in Matlab can be found in the 1st and 2nd link below, while a more in depth tutorial can be found in the 3rd link.

LINKS:

Okay: so let's get to it.

1. Save the above two functions into Matlab.

2. Make a 3D surface plot in Matlab.
For example, type in:
    >>  [X,Y] = meshgrid(-8,0.1:8); 
    >>  R = sqrt(X.^2+Y.^2) + eps;
    >>  Z = sin(R)./R;                  
    >>  surf(X,Y,Z)                      

3. Use the surf2solid function which you downloaded earlier:
    >> VariableName = surf2solid(X,Y,Z);

4. Use the stlwrite function that you downloaded:
    >> stlwrite('FileName.stl',VariableName)  
*FileName is to be replaced with what you want to name your file

And there you have it, a nice simple way of exporting a 3D file from Matlab. 

27 comments:

  1. Hi,

    It showed an error stating Z should be a matrix not a vector/scalar quantity

    ReplyDelete
  2. Theres an error in code should be -
    >> [X,Y] = meshgrid(-8:0.1:8);
    >> R = sqrt(X.^2+Y.^2) + eps;
    >> Z = sin(R)./R;
    >> surf(X,Y,Z)

    ReplyDelete
  3. Very nice blog...
    Great information provided. We also provide Matlab Training in Noida. I appreciate your work.

    ReplyDelete
  4. Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
    Matlab Training in Chennai

    ReplyDelete
  5. Online mba in India
    DEIEDU is the best online Institute in the world with high class course outline and up to date learning materials. DEIEDU is providing the online mba in india, online mba in india, Distance learning mba courses in india, Correspondence mba in India Mba from distance in India, Online Executive Mba in India, distance Mba from India, Online distance mba in India. Distance learning mba degree in India.
    Address:
    401, fourth floor sg alpha tower
    Vashundhra (up)
    Phone: 9811210788
    Email: info@deiedu.in
    Website: http://www.deiedu.in/
    online mba in india

    ReplyDelete
  6. Global 3D Labs the best and safest to buy 3D printers in India. We manufacture a wide range of best-in-class 3D printers and 3D printing service providers in India

    ReplyDelete
  7. Anexas is the best institute for six sigma certification in Bangalore that offers an internationally-recognized six sigma green belt training and certification program. It is kpmg approved six sigma training coaching center in Bangalore. This lean six sigma green belt certification course in Bangalore is ideal for individuals and enterprises that are looking to gain an in-depth understanding and ensure that you clear lean six sigma green belt certification exam in your first attempt.

    https://www.anexas.net/six-sigma-training/six-sigma-certification-bangalore

    ReplyDelete
  8. I prefer to study this kind of material. Nicely written information in this post, the quality of content is fine and the conclusion is lovely. Things are very open and intensely clear explanation of issues
    Best software Training institute in Bangalore

    ReplyDelete
  9. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    rpa training in chennai
    rpa training in bangalore
    rpa course in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  10. Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.
    python course institute in bangalore
    python Course in bangalore
    python training institute in bangalore

    ReplyDelete
  11. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Online DevOps Certification Course - Gangboard
    Best Devops Training institute in Chennai

    ReplyDelete
  12. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
    Data Science course in rajaji nagar
    Data Science with Python course in chenni
    Data Science course in electronic city
    Data Science course in USA
    Data science course in pune | Data Science Training institute in Pune

    ReplyDelete
  13. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    best rpa training in chennai
    rpa training in chennai
    rpa interview questions and answers
    automation anywhere interview questions and answers
    blueprism interview questions and answers
    uipath interview questions and answers
    rpa training in bangalore

    ReplyDelete
  14. When I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Thanks.
    AWS Training in Bangalore | Amazon Web Services Training in Bangalore
    Advanced Amazon Web Services Training in Pune | Best AWS Training in Pune
    AWS Online Training | Best Online AWS Certification Course - Gangboard
    Best Top 110 plus AWS Interview Question and Answers 2019

    ReplyDelete