Version 0.2.0004Source file and achievable STLView.zip (388 KB)
Version 0.1.0002Source file and achievable of the version pick-stl (see comments at the end of the page): Pick-STL.zip (302 KB)
You will find 4 functions in the program
Charger File of point: Allows to load and to post a file of points 3d, that is to say with a posting of the glVertex3f type or then to have larger points a posting using the function gluSphere.
You can parameterize the ray of posting of the spheres via the field Rayon sphere.
To open ASCII STL: Reading and posting of an ASCII file STL, features hidden or edges only.
To open Binary STL: Reading and posting of a Binary file STL.
To save STL: Safeguard the grid visualized in the form of STL Ascii Triangulation: Allows to calculate a triangulation
starting from a algo 2d to obtain a grid.For graphic handling:
Double click in the zone of posting: STRONG CURRENT of orientaions and zoom of Bouton posting of left of the mouse:
Translation Button of right-hand side of the mouse: Zoom Button of left + touches Shift:
Rotation XY Bouton of right-hand side + touches Shift: Rotation ZAttention this version is a first test it remains much to be done. In particular on the level of the triangulation. It is a base of work which will evolve/move according to my future availabilities.
I in the future think of adding functions of postings
Posting of the edges not "connected"
Of repair of grid
Removal of the triangles "dish"
Correction of the bad orientations of normals
And a more advanced algo of triangulation
Version 0.2Addition of the function for the posting of the normals and second reading of the binary STL.
Version 0.2.4Use of the lists (glNewlist and glCalllist) to post the elements. This method is much more radide on the level of posting because there does not need to recreate each time returned OpenGL.
Version Pick STL
The version pick STL is a version with selection of the triangles. It
allows if you move with the cursor on visualization STL to put in blue
the pointed triangle.
Attention it is a version with only the ASCII second reading and without the treatment of the points.
You can find an old version of this code on the site of www.vbfrance.com (code 18820)