Appearance
fossil_file_stl_object
FOSSIL, STL file class definition.
Source: src/lib/fossil_file_stl_object.f90
Dependencies
Contents
- file_stl_object
- close_file
- destroy
- initialize
- load_from_file
- open_file
- save_aabb_into_file
- save_into_file
- file_stl_assign_file_stl
- load_facets_number_from_file
- load_header_from_file
- save_header_into_file
- save_trailer_into_file
- statistics
Derived Types
file_stl_object
FOSSIL STL file class.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
file_name | character(len=:) | allocatable | File name |
file_unit | integer(kind=I4P) | File unit. | |
header | character(len=FRLEN) | File header. | |
is_ascii | logical | Sentinel to check if file is ASCII. | |
is_open | logical | Sentinel to check if file is open. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
close_file | pass(self) | Close file. |
destroy | pass(self) | Destroy file. |
initialize | pass(self) | Initialize file. |
load_from_file | pass(self) | Load from file. |
open_file | pass(self) | Open file, once initialized. |
save_aabb_into_file | pass(self) | Save AABB into file. |
save_into_file | pass(self) | Save into file. |
statistics | pass(self) | Return STL statistics. |
assignment(=) | Overload =. | |
file_stl_assign_file_stl | pass(lhs) | Operator =. |
load_facets_number_from_file | pass(self) | Load facets number from file. |
load_header_from_file | pass(self) | Load header from file. |
save_header_into_file | pass(self) | Save header into file. |
save_trailer_into_file | pass(self) | Save trailer into file. |
Subroutines
close_file
Close file.
fortran
subroutine close_file(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. |
Call graph
destroy
Destroy file.
Attributes: elemental
fortran
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. |
Call graph
initialize
Initialize file.
Attributes: elemental
fortran
subroutine initialize(self, skip_destroy, file_name, is_ascii)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
skip_destroy | logical | in | optional | Flag to skip destroy file. |
file_name | character(len=*) | in | optional | File name. |
is_ascii | logical | in | optional | Sentinel to check if file is ASCII. |
Call graph
load_from_file
Load from file.
fortran
subroutine load_from_file(self, facet, file_name, is_ascii, guess_format, clip_min, clip_max)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
facet | type(facet_object) | out | allocatable | Surface facets. |
file_name | character(len=*) | in | optional | File name. |
is_ascii | logical | in | optional | Sentinel to check if file is ASCII. |
guess_format | logical | in | optional | Try to guess format directly from file. |
clip_min | type(vector_R8P) | in | optional | Clip bounding box extents. |
clip_max | type(vector_R8P) | in | optional | Clip bounding box extents. |
Call graph
open_file
Open file, once initialized.
fortran
subroutine open_file(self, file_action, guess_format)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
file_action | character(len=*) | in | File action, "read" or "write". | |
guess_format | logical | in | optional | Sentinel to try to guess format directly from file. |
Call graph
save_aabb_into_file
Save AABB into file.
fortran
subroutine save_aabb_into_file(self, surface, base_file_name, is_ascii)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
surface | type(surface_stl_object) | in | Surface STL. | |
base_file_name | character(len=*) | in | optional | Base file name. |
is_ascii | logical | in | optional | Sentinel to check if file is ASCII. |
Call graph
save_into_file
Save into file.
fortran
subroutine save_into_file(self, facet, file_name, is_ascii)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
facet | type(facet_object) | in | Surface facets. | |
file_name | character(len=*) | in | optional | File name. |
is_ascii | logical | in | optional | Sentinel to check if file is ASCII. |
Call graph
file_stl_assign_file_stl
Operator =.
Attributes: pure
fortran
subroutine file_stl_assign_file_stl(lhs, rhs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lhs | class(file_stl_object) | inout | Left hand side. | |
rhs | type(file_stl_object) | in | Right hand side. |
load_facets_number_from_file
Load facets number from file.
@note File is rewinded.
fortran
subroutine load_facets_number_from_file(self, facets_number)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
facets_number | integer(kind=I4P) | out | Facets number. |
Call graph
load_header_from_file
Load header from file.
fortran
subroutine load_header_from_file(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. |
Call graph
save_header_into_file
Save header into file.
fortran
subroutine save_header_into_file(self, facets_number)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. | |
facets_number | integer(kind=I4P) | in | Facets number. |
Call graph
save_trailer_into_file
Save trailer into file.
fortran
subroutine save_trailer_into_file(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | inout | File STL. |
Call graph
Functions
statistics
Return STL statistics.
Attributes: pure
Returns: character(len=:)
fortran
function statistics(self, prefix) result(stats)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(file_stl_object) | in | File STL. | |
prefix | character(len=*) | in | optional | Lines prefix. |