where is the origin of the coordinate system when I use the stlread function to get the coordinates of an stl file?

조회 수: 33 (최근 30일)
%I want to write a code to find out the surface roughness of a rectangular stl surface with a thickness. But if I directly use the z-coordinates from the function, i might be taking into account the thickness of the file. I can just subtract the thickness from all the points if the position of the origin is known.

채택된 답변

Rik
Rik 2020년 4월 6일
In general an stl reader function will use the origin that is encoded in the file itself. If you open the file file with a plain text editor you can check if the z coordinates in the file match those that your function returns.
  댓글 수: 2
Gayathri VL
Gayathri VL 2020년 4월 6일
편집: Gayathri VL 2020년 4월 6일
Thanks a lot. I opened the stl file in notepad and I see some similar values. Could you also tell me if the stlread function in matlab returns the coordinates in the form (x,y,z)?
Rik
Rik 2020년 4월 6일
Isn't that trivial for you to check? If you are using this stlread function from the FEX it looks like that is the syntax it returns.
An important note to be aware of: since R2018b there is a built-in function stlread, so be careful with your assumptions if you run this code on another system.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by