Turning triangulation data into 3D spatial matrix
显示 更早的评论
Hello all,
I am trying to import an STL file (or some similar 3D model file format) and turn the information into a 3D matrix specifying 'presence' of the object.
For example, if considering the solid geometry as in the attached image, each plane (1-4 etc) would represent a 2D logical matrix, with '1' specifying the presence of the surface within that plane. These planes will eventually represent equally-spaced, planar locations in the out-of-plane direction.
I have successfully imported the geometry as a triangulation, and am able to see the surface in 3-D space when plotting with trisurf(), but am wondering if anyone has thoughts on how to convert/consider the triangulation data as a solid object to work with it in the aforementioned manner?
The actual geometries that will be considered are much more complex than the one mentioned here (with holes etc), but I thought the block would be a good place to start.
*Note: I know this is a weird problem, and any thoughts are greatly appreciated. :)
**Note: I tried to upload the .stl, but the format is unsupported. I would be happy to supply if requested.
Thanks in advance!
filename = [path '/TestGeom.stl'];
>> stlread(filename)
ans =
triangulation with properties:
Points: [10×3 double]
ConnectivityList: [16×3 double]
>> trisurf(ans)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 STL (STereoLithography) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!