22 December 2011 11:14:39 AM STLA_IO_PRB: C++ version Test the STLA_IO library. TEST01 STLA_CHECK makes some simple checks on a file. The file "cube.stla" seems to be a legal ASCII STL file. TEST02 STLA_SIZE determines the size of various objects in an ASCII STL file. Sizes for STLA object "cube.stla". Solids = 1 Nodes (may be repeated) = 36 Faces (triangular only) = 12 The index offset value = 0 Number of lines of text = 86 TEST03 STLA_READ reads an object in an ASCII STL file. Sizes for STLA object "cube.stla". Solids = 1 Nodes (may be repeated) = 36 Faces (triangular only) = 12 The index offset value = 0 Number of lines of text = 86 Face Nodes 0 0 1 2 1 3 4 5 2 6 7 8 3 9 10 11 4 12 13 14 5 15 16 17 6 18 19 20 7 21 22 23 8 24 25 26 9 27 28 29 10 30 31 32 11 33 34 35 Face Normal Vectors 0 0 0 1 1 0 0 1 2 0 0 -1 3 0 0 -1 4 -1 0 0 5 -1 0 0 6 1 0 0 7 1 0 0 8 0 -1 0 9 0 -1 0 10 0 1 0 11 0 1 0 Node Coordinates 0 -0.5 -0.5 1 1 0.5 -0.5 1 2 0.5 0.5 1 3 -0.5 0.5 1 4 -0.5 -0.5 1 5 0.5 -0.5 1 6 0.5 -0.5 0 7 -0.5 -0.5 0 8 -0.5 0.5 0 9 0.5 0.5 0 10 0.5 -0.5 0 11 -0.5 -0.5 0 12 -0.5 -0.5 0 13 -0.5 -0.5 1 14 -0.5 0.5 1 15 -0.5 0.5 0 16 -0.5 -0.5 0 17 -0.5 -0.5 1 18 0.5 -0.5 1 19 0.5 -0.5 0 20 0.5 0.5 0 21 0.5 0.5 1 22 0.5 -0.5 1 23 0.5 -0.5 0 24 -0.5 -0.5 0 25 0.5 -0.5 0 26 0.5 -0.5 1 27 -0.5 -0.5 1 28 -0.5 -0.5 0 29 0.5 -0.5 0 30 -0.5 0.5 1 31 0.5 0.5 1 32 0.5 0.5 0 33 -0.5 0.5 0 34 -0.5 0.5 1 35 0.5 0.5 1 TEST04 STLA_WRITE writes an ASCII STL file. Graphics data was written to the STLA file "cube_new.stla". 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 STLA_IO_PRB Normal end of execution. 22 December 2011 11:14:39 AM