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 个)

产品


版本

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by