tem_stl_module Module

This module provides stl data type and routine to load all stl files and store them in stl_node_type

\author



Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: stl_ascii = 1
integer, private, parameter :: stl_bin = 2

Interfaces

public interface tem_stlHead_out

interface to write out stl filename in lua format to a file

  • private subroutine tem_stlHead_out_scal(me, conf)

    Write out a stlHead shape in lua format

    Arguments

    Type IntentOptional Attributes Name
    type(tem_stlHead_type), intent(in) :: me

    stlHead types to write out

    type(aot_out_type), intent(inout) :: conf

    Aotus type handling the output to the file in lua format

  • private subroutine tem_stlHead_out_vec(me, conf)

    Write out an array of stlHeads in lua format

    Arguments

    Type IntentOptional Attributes Name
    type(tem_stlHead_type), intent(in) :: me(:)

    stlHead types to write out

    type(aot_out_type), intent(inout) :: conf

    Aotus type handling the output to the file in lua format


Derived Types

type, public ::  tem_stlData_type

Triangle information for all the STLs

Components

Type Visibility Attributes Name Initial
type(tem_stlHead_type), public, allocatable :: head(:)

Header information loaded from stl and config file

real(kind=rk), public, allocatable :: nodes(:,:)

List off all the nodes listed in the STL files size: 1st dimension = 3 (x,y,z) , 2nd dimension = nNodes

integer, public, allocatable :: tri_node(:,:)

Pointers to node array for each triangle tri_node(1:3, iTris) has three nodes position of each triangle size: 1st dimension = 3 (3 nodes), 2nd dimension = nTris

integer, public :: nNodes

Number of nodes

integer, public :: nTris

Number of triangles

type, private ::  tem_stlHead_type

This type contains STL information read from the Lua configuration.

Components

Type Visibility Attributes Name Initial
character(len=PathLen), public :: filename
integer, public :: fileformat
integer, public :: nSolids
integer, public :: nTris
integer, public :: nTexts
integer, public :: nNodes
integer, public :: id

Functions

public function tem_stlCubeOverlap(stl_data, cube) result(overlaps)

Compute, if the triangles in stl intersects the cube.

Arguments

Type IntentOptional Attributes Name
type(tem_stlData_type), intent(in) :: stl_data
type(tem_cube_type), intent(in) :: cube

Return Value logical


Subroutines

public subroutine tem_load_stl(stl_data, transform, conf, thandle)

This routine loads STL files from config and reads the triangles from the files into the dynamic array of triangles.

Arguments

Type IntentOptional Attributes Name
type(tem_stlData_type), intent(out) :: stl_data

Array array of triangles in stlData

type(tem_transformation_type), intent(in) :: transform

transformation for spatial object

type(flu_State) :: conf

Lua state

integer, intent(in) :: thandle

private subroutine tem_load_stlHead(me, conf, thandle)

This routine loads stl_files table from configuration file Need to look for: * filename (mandatory) * fileformat (default binary)

Arguments

Type IntentOptional Attributes Name
type(tem_stlHead_type), intent(out), allocatable :: me(:)

contain stl files information from config file

type(flu_State) :: conf
integer, intent(in) :: thandle

private subroutine tem_load_stlHead_single(me, conf, thandle)

This routine load stl_files table from configuration file Need to look for: * filename (mandatory) * fileformat (default binary)

Arguments

Type IntentOptional Attributes Name
type(tem_stlHead_type), intent(inout) :: me

contain stl files information from config file

type(flu_State) :: conf
integer, intent(in) :: thandle

private subroutine tem_read_stlFiles(stl_data)

Read in all STL files from disk which are specified in the config file

Arguments

Type IntentOptional Attributes Name
type(tem_stlData_type), intent(inout) :: stl_data

stl data of current spatial object

private subroutine tem_stlHead_out_vec(me, conf)

Write out an array of stlHeads in lua format

Arguments

Type IntentOptional Attributes Name
type(tem_stlHead_type), intent(in) :: me(:)

stlHead types to write out

type(aot_out_type), intent(inout) :: conf

Aotus type handling the output to the file in lua format

private subroutine tem_stlHead_out_scal(me, conf)

Write out a stlHead shape in lua format

Arguments

Type IntentOptional Attributes Name
type(tem_stlHead_type), intent(in) :: me

stlHead types to write out

type(aot_out_type), intent(inout) :: conf

Aotus type handling the output to the file in lua format