Write an STL (ASCII) File in MATLAB || TUTORIAL

Prot04m
Prot04m
3.6 هزار بار بازدید - 3 سال پیش - *CORRECTIONS* Line 28 & 47:
*CORRECTIONS* Line 28 & 47: unit_norm should be unit_normal. ** Hopefully the video was clear. This should work for all structured 3D objects (NO point clouds). If you are a little more proficient with programming, you can save computing time and space with a more efficient FOR loop and removing the repeated nodes. The STL file also allows you to store color and material data, which is something I am currently investigating. I didn't go into detail as to why the STL file is structured the way it is, but basically, you need to list the vertices of each facet in counter-clockwise direction so that the normal is in the outward direction; this is important when calculating volumes and certain CFD codes. All the geometries were exported using the code in this video. If you want to learn how to generate 3D objects, check my playlist linked below. Playlist: Structured 3D OBJECTS in MATLAB    • MATLAB: Structured 3D Geometries   Playlist: FILE FORMATS in MATLAB    • MATLAB: File Formats   fprintf() documentation: www.mathworks.com/help/matlab/ref/fprintf.html fopen() documentation: www.mathworks.com/help/matlab/ref/fopen.html fclose() documentation: www.mathworks.com/help/matlab/ref/fclose.html Software: MATLAB 2020b
3 سال پیش در تاریخ 1400/09/17 منتشر شده است.
3,634 بـار بازدید شده
... بیشتر