08-Jan-2022 10:05:11 stla_io_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test stla_io(). stla_io_test01 STLA_CHECK makes some simple checks on a file. The file "cube.stl" seems to be a legal ASCII STL file. stla_io_test02 STLA_SIZE determines the size of various objects in an ASCII STL file. Object sizes for STLA file "cube.stl": Solids = 1 Nodes (may be repeated) = 36 Faces (triangular only) = 12 Number of lines of text = 86 stla_io_test03 STLA_READ reads an object in an ASCII STL file. Object sizes for STLA file "cube.stl": Solids = 1 Nodes (may be repeated) = 36 Faces (triangular only) = 12 Number of lines of text = 86 Face Nodes 1 1 2 3 2 4 5 6 3 7 8 9 4 10 11 12 5 13 14 15 6 16 17 18 7 19 20 21 8 22 23 24 9 25 26 27 10 28 29 30 11 31 32 33 12 34 35 36 Face Normal Vectors face_num = 12 1 0.000000 0.000000 1.000000 Node Coordinates 1 -0.500000 -0.500000 1.000000 2 0.500000 -0.500000 1.000000 3 0.500000 0.500000 1.000000 4 -0.500000 0.500000 1.000000 5 -0.500000 -0.500000 1.000000 6 0.500000 -0.500000 1.000000 7 0.500000 -0.500000 0.000000 8 -0.500000 -0.500000 0.000000 9 -0.500000 0.500000 0.000000 10 0.500000 0.500000 0.000000 11 0.500000 -0.500000 0.000000 12 -0.500000 -0.500000 0.000000 13 -0.500000 -0.500000 0.000000 14 -0.500000 -0.500000 1.000000 15 -0.500000 0.500000 1.000000 16 -0.500000 0.500000 0.000000 17 -0.500000 -0.500000 0.000000 18 -0.500000 -0.500000 1.000000 19 0.500000 -0.500000 1.000000 20 0.500000 -0.500000 0.000000 21 0.500000 0.500000 0.000000 22 0.500000 0.500000 1.000000 23 0.500000 -0.500000 1.000000 24 0.500000 -0.500000 0.000000 25 -0.500000 -0.500000 0.000000 26 0.500000 -0.500000 0.000000 27 0.500000 -0.500000 1.000000 28 -0.500000 -0.500000 1.000000 29 -0.500000 -0.500000 0.000000 30 0.500000 -0.500000 0.000000 31 -0.500000 0.500000 1.000000 32 0.500000 0.500000 1.000000 33 0.500000 0.500000 0.000000 34 -0.500000 0.500000 0.000000 35 -0.500000 0.500000 1.000000 36 0.500000 0.500000 1.000000 stla_io_test04 STLA_WRITE writes an ASCII STL file. Graphics data was written to the STLA file "cube_new.stl". stla_io_test05 STLA_FACE_NORMAL_COMPUTE computes the face normal vectors for an STLA file. We have an STLA solid, and its exact normals. We now call STLA_FACE_NORMAL_COMPUTE to recompute the normals. We print out the maximum error, defined as |1 - dot ( n1, n2 )| where n1 and n2 are the exact and computed normals. Maximum error = 0.000000 stla_io_test06 The MATLAB routine TRIMESH will plot a triangulated surface. It can be used to display the object described by an ASCII STL file. Graphics saved as "stla_io_test06.png" stla_io_test07 Compare two routines with the same functionality. One is designed to run faster than the other, especially on large problems with thousands of faces. STLA_SIZE determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST scanned the file in 0.056704 seconds. STLA_SIZE scanned the file in 0.004158 seconds. Object sizes for STLA file "cube.stl": Solids = 1 Nodes (may be repeated) = 36 Faces (triangular only) = 12 Number of lines of text = 86 stla_io_test07 Compare two routines with the same functionality. One is designed to run faster than the other, especially on large problems with thousands of faces. STLA_SIZE determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST scanned the file in 0.035744 seconds. STLA_SIZE scanned the file in 0.088655 seconds. Object sizes for STLA file "sphere.stl": Solids = 1 Nodes (may be repeated) = 684 Faces (triangular only) = 228 Number of lines of text = 1598 stla_io_test07 Compare two routines with the same functionality. One is designed to run faster than the other, especially on large problems with thousands of faces. STLA_SIZE determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST determines the size of various objects in an ASCII STL file. STLA_SIZE_FAST scanned the file in 0.269571 seconds. STLA_SIZE scanned the file in 0.722194 seconds. Object sizes for STLA file "teapot.stl": Solids = 1 Nodes (may be repeated) = 6048 Faces (triangular only) = 2016 Number of lines of text = 14114 stla_io_test08 Compare two routines with the same functionality. One is designed to run faster than the other, especially on large problems with thousands of faces. STLA_READ reads various data from an ASCII STL file. STLA_READ_FAST reads data from an ASCII STL file. STLA_READ_FAST read the file in 0.044323 seconds. STLA_READ read the file in 0.093116 seconds. Object sizes for STLA file "sphere.stl": Solids = 1 Nodes (may be repeated) = 684 Faces (triangular only) = 228 Number of lines of text = 1598 stla_io_test(): Normal end of execution. 08-Jan-2022 10:05:22