STL I/O
Load and save ASCII or binary STL files. Format is auto-detected โ no flags required.
A pure Fortran 2003+ OOP library for reading, writing, and manipulating STL mesh files.
Load an STL file, print its statistics, and translate it:
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')Contributions are welcome โ see the Contributing page.
FOSSIL is distributed under a multi-licensing system:
| Use case | License |
|---|---|
| FOSS projects | GPL v3 |
| Closed source / commercial | BSD 2-Clause |
| Closed source / commercial | BSD 3-Clause |
| Closed source / commercial | MIT |
Anyone interested in using, developing, or contributing to FOSSIL is welcome โ pick the license that best fits your needs.