Skip to content

FOSSILFOrtran Stereo Litography parser

A pure Fortran 2003+ OOP library for reading, writing, and manipulating STL mesh files.

Quick start โ€‹

Load an STL file, print its statistics, and translate it:

fortran
use fossil
use penf, only: R8P
use vecfor, only: vector_R8P

type(file_stl_object)    :: file_stl
type(surface_stl_object) :: surface

! Load (ASCII or binary, auto-detected)
call file_stl%load_from_file(facet=surface%facet, file_name='cube.stl', guess_format=.true.)
call surface%analize

! Print statistics
print '(A)', file_stl%statistics()
print '(A)', surface%statistics()

! Translate and save
call surface%translate(x=1.0_R8P, y=2.0_R8P, z=0.5_R8P)
call file_stl%save_into_file(facet=surface%facet, file_name='cube-moved.stl')

Authors โ€‹

Contributions are welcome โ€” see the Contributing page.

Copyrights โ€‹

FOSSIL is distributed under a multi-licensing system:

Use caseLicense
FOSS projectsGPL v3
Closed source / commercialBSD 2-Clause
Closed source / commercialBSD 3-Clause
Closed source / commercialMIT

Anyone interested in using, developing, or contributing to FOSSIL is welcome โ€” pick the license that best fits your needs.