This module provides functionality for reading and writing stl files.
This subroutine reads the number of nodes and triangles from a given binary stl file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=PathLen), | intent(in) | :: | filename | name of the binary stl file |
||
integer, | intent(out) | :: | nNodes | number of nodes in the file |
||
integer, | intent(out) | :: | nTris | number of triangles in the file |
This routine actually reads the data (points, triangles, normals) from the binary file and stores them.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=PathLen), | intent(in) | :: | filename | name of the binary stl file |
||
integer, | intent(in) | :: | nNodesRead | Number of nodes read from the file header, to compare against the actual number of nodes read |
||
integer, | intent(in) | :: | nTrisRead | Number of triangles read from the file header, to compare against the actual number of triangles read |
||
real(kind=rk), | intent(out) | :: | nodes(:,:) | point coordinates read from the stl-file size: 3, nPoints_total |
||
integer, | intent(out) | :: | tri_node(:,:) | connectivity array for the triangles size: 3, nTriangles_total |
||
integer, | intent(out) | :: | iError | error while openeing the file, or if the number of nodes/trias do not match to the ones read from the header (if error -> iError > 0) |
This routine dumps a set of nodes and triangles to disc.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | outprefix | output prefix for the filename |
||
real(kind=rk), | intent(in) | :: | nodes(:) | nodes to be dumped (size: 3*nNodes) |
||
integer, | intent(in) | :: | triangles(:,:) | triangles to be dumped (size: 3, nTrias) |
||
type(tem_comm_env_type), | intent(in) | :: | proc | process description to use |
||
character(len=80), | intent(in), | optional | :: | header | optional header to be dumped |
|
real(kind=rk), | intent(in), | optional | :: | normals(:,:) | optional array of normals, if not passed normals will be calculated internally |
|
type(tem_time_type), | intent(in), | optional | :: | time | optional simulation time to be appended to the filename |