https://github.com/jacobwilliams/stl-fortran
Fortran STL File I/O
https://github.com/jacobwilliams/stl-fortran
3d-models fortran stereolithography stl stl-fortran
Last synced: 2 months ago
JSON representation
Fortran STL File I/O
- Host: GitHub
- URL: https://github.com/jacobwilliams/stl-fortran
- Owner: jacobwilliams
- License: other
- Created: 2020-01-12T19:35:14.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-21T18:33:17.000Z (4 months ago)
- Last Synced: 2024-12-30T13:57:01.564Z (4 months ago)
- Topics: 3d-models, fortran, stereolithography, stl, stl-fortran
- Language: Fortran
- Homepage:
- Size: 3.23 MB
- Stars: 22
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

============### Brief description
Fortran code for reading and writing STL (STereoLithography) files.
### Status
[](https://github.com/jacobwilliams/stl-fortran/releases/latest)
[](https://github.com/jacobwilliams/stl-fortran/actions)
[](https://codecov.io/gh/jacobwilliams/stl-fortran)
[](https://github.com/jacobwilliams/stl-fortran/commits/master)### Example
```fortran
program mainuse,intrinsic :: iso_fortran_env, only: wp => real64
use stl_moduleimplicit none
type(stl_file) :: model
integer :: istat !! status return code! add a sphere:
call model%add_sphere([0.0_wp, 0.0_wp, 0.0_wp], 1.0_wp, 20, 40)
call model%write_binary_stl_file('sphere.stl',istat)end program main
```### Compiling
A [Fortran Package Manager](https://github.com/fortran-lang/fpm) manifest file is included, so that the library and test cases can be compiled with FPM. For example:
```
fpm build --profile release
fpm test --profile release
```To use `stl-fortran` within your fpm project, add the following to your `fpm.toml` file:
```toml
[dependencies]
stl-fortran = { git="https://github.com/jacobwilliams/stl-fortran.git" }
```To generate the documentation using [FORD](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford stl-fortran.md```
### License
The stl-fortran source code and related files and documentation are distributed under a permissive free software [license](https://github.com/jacobwilliams/stl-fortran/blob/master/LICENSE.txt) (BSD-style).
### Documentation
The latest API documentation can be found [here](https://jacobwilliams.github.io/stl-fortran/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford).
### See also
* [FOSSIL, FOrtran Stereo (si) Lithography parser](https://github.com/szaghi/FOSSIL)
### Reference
* https://en.wikipedia.org/wiki/STL_(file_format)