How can I save the stl file from Matlab?

25 ビュー (過去 30 日間)
Parmi Granmaye
Parmi Granmaye 2023 年 9 月 8 日
コメント済み: DGM 2025 年 7 月 14 日
Hi
I want to download the office.stl file from matlab. How can I do that?
Thanks

回答 (1 件)

Shubham
Shubham 2023 年 9 月 11 日
Hi Parmi,
I understand that you want to download the stl file from MATLAB.
To download the office.stl file from MATLAB, you can follow these steps:
  1. Open MATLAB and make sure you have the STL file loaded or generated in your workspace.
  2. Use the stlwrite function to save the STL file to your desired location. The function syntax is as follows:
stlwrite(filename, fv)
  • filename is the name of the STL file you want to save, including the file extension (e.g., 'office.stl').
  • fv is a structure representing the triangulated mesh of your office object. Make sure you have this structure defined before using the stlwrite function.
After calling the stlwrite function, the STL file will be saved to the specified location. You can then access it through your file explorer or any file management tool.
Here's an example of how you can use the stlwrite function to save the office.stl file:
% Assuming you have already defined the triangulated mesh of the office object as 'fv'
filename = 'office.stl';
stlwrite(filename, fv);
Make sure to replace 'fv' with the actual variable name representing the triangulated mesh of your office object.
Remember to adjust the code accordingly based on your specific scenario.
I hope this helps!
  4 件のコメント
Parmi Granmaye
Parmi Granmaye 2023 年 9 月 13 日
Hi Shubham,
Thank you so much for your helpful answer.
DGM
DGM 2025 年 7 月 14 日
This two examples confuse the syntax for stlwrite() and stlwrite(). They're different tools and don't accept the same types of inputs. MATLAB's built-in stlwrite() only accepts triangulation objects -- correctly as described in the second example. Sven's stlwrite() accepts various types of inputs including FV structs, as in the first example.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSTL (STereoLithography) についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by