What is FOSSIL? | Main features | Copyrights | Documentation | A Taste of FOSSIL
FOSSIL is a pure Fortran (KISS) library for IO and manipulation of STL (Stereo Litography) files for modern (2003+) Fortran projects.
FOSSIL provides a simple API to IO STL files and also to manipulate the triangulated surface contained into the STL file.

the dragon STL test (src/tests/dragon.stl) is composed by 6588 triangular facets. The signed distance computation on a uniform grid of
64^3is accelerated by a factor of 7x using AABB algorithm with respect the simple brute force.
Go to Top
Any feature request is welcome.
Go to Top
FOSSIL is an open source project, it is distributed under a multi-licensing system:
Anyone is interest to use, to develop or to contribute to FOSSIL is welcome, feel free to select the license that best matches your soul!
More details can be found on wiki.
Go to Top
Besides this README file the FOSSIL documentation is contained into its own wiki. Detailed documentation of the API is contained into the GitHub Pages that can also be created locally by means of ford tool.
FOSSIL is an KISS library:
effortless load of file (with STL surface analysis)
use fossil type(file_stl_object) :: file_stl ! STL file handler. call file_stl%initialize(file_name='cube.stl') call file_stl%load_from_file(guess_format=.true.)
print main informations of STL
print '(A)', file_stl%statistics()
upon exection will print something like
Mesh_1 file name: src/tests/cube.stl file format: ascii X extents: [ 0.000000000000000E+000, +0.100000000000000E+001] Y extents: [ 0.000000000000000E+000, +0.100000000000000E+001] Z extents: [ 0.000000000000000E+000, +0.100000000000000E+001] volume: -0.100000000000000E+001 number of facets: +12
make normals consistent
call file_stl%sanitize_normals
simply manipulate geometry
call file_stl%resize(factor=3.4*ex + 2*ey + 0.5*ez) ! ex, ey, ez being axis versors call file_stl%resize(x=0.5, z=1.2) ! scale only x and z axis call file_stl%mirror(normal=ex) ! mirror respect yz-plane call file_stl%mirror(normal=ex+ey) ! mirror respect plane with normal ex+ey call file_stl%mirror(matrix=matrix) ! mirror by a given mirroring matrix call file_stl%rotate(axis=ex, angle=1.57) ! rotate around x axis by pi/2 call file_stl%rotate(matrix=matrix) ! rotati by a given rotating matrix call file_stl%translate(delta=3*ex + 2*ey + 0.5*ez) ! translate by a vectorial delta call file_stl%translate(x=0.5, z=1.2) ! translate by only x and z delta
Go to Top