MATLAB Answers

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

조회 수: 8(최근 30일)
Gayathri  VL
Gayathri VL 6 Apr 2020
댓글: Rik 6 Apr 2020
%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.

  댓글 수: 0

로그인 to comment.

채택된 답변

Rik
Rik 6 Apr 2020
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 6 Apr 2020
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 6 Apr 2020
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.

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by