dimension of imported STL file
5 次查看(过去 30 天)
显示 更早的评论
I have imported a STL file of a CAD model which is designed with dimensions in mm. will the model imported in pdetoolbox will have dimensions in mm or m? if it have dimension in m then how to convert it into mm?
2 个评论
dpb
2019-8-3
Well, one would presume the dimensions would come with the file...why don't you pdegplot it and see what you get? I (also presume) the axis scaling would match the model dimensions.
The answer to what is actually imported will, I expect, make the second question moot...
回答(1 个)
DGM
2025-4-2
编辑:DGM
2025-10-3,7:25
STL files contain no scale information. It's just a dimensionless shape. It's up to you to interpret what its units are supposed to be and scale it according to your expectations and needs. A 100x100 surface might be 100x100 mm, or it might be 100x100 km. Depends if it's a topological scan of a machined part or geographical data.
That said, there are sometimes nonstandard things crammed into STL files, so never say never. Some files may have units specified in the header text, but there is no standard regarding if or how they will be presented. That said, the built-in decoder does not return the header text, so you'd have to use something else if you want to find that information (if it exists). Automating its retrieval would take some foreknowledge of how it would be presented. I doubt any of the PDE toolbox tools attempt to look for such inconsistent, nonstandard information.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!