Extract information from .stl file

15 ビュー (過去 30 日間)
Antonio Caforio
Antonio Caforio 2022 年 8 月 25 日
回答済み: Vidip Jain 2023 年 8 月 31 日
Hello everyone.
I'm trying to extract some information from a generic .stl file, what I'm trying to obtain is the volume of the "outbox" of the part (the volume of the box that contains the part). I'm having a bit of problem with finding these information with some matlab plugins.
Thank you in advance.

回答 (1 件)

Vidip Jain
Vidip Jain 2023 年 8 月 31 日
I understand you want to extract information from a generic STL (Stereolithography) file and calculate the volume of the "outbox" of a part (bounding box)
You can follow these general steps using MATLAB:
  • Load the STL File: Use a suitable STL file reading function in MATLAB to import the geometry. MATLAB's “stlread” function is commonly used for this purpose.
  • Compute Bounding Box: Calculate the minimum and maximum values along each dimension (x, y, z) of the vertices. These values define the bounding box that contains the part.
  • Calculate Volume: With the dimensions of the bounding box, you can calculate its volume using the formula for a rectangular box.
Refer to this documentation for more information: https://www.mathworks.com/help/matlab/ref/stlread.html

カテゴリ

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