This routine loads stl_files table from configuration file Need to look for: * filename (mandatory) * fileformat (default binary)
Type | Intent | Optional | 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 |
subroutine tem_load_stlHead( me, conf, thandle ) ! --------------------------------------------------------------------------! !> contain stl files information from config file type(tem_stlHead_type), allocatable, intent(out) :: me(:) type(flu_State) :: conf !< lua state integer, intent(in) :: thandle !< stl object handle ! --------------------------------------------------------------------------! integer :: stl_handle, stl_subHandle integer :: nObjects, iObj ! --------------------------------------------------------------------------! call aot_table_open(L=conf, parent = thandle, thandle=stl_handle, & & key='object') call aot_table_open(L=conf, parent = stl_handle, thandle =stl_subHandle, & & pos = 1 ) if( stl_subHandle .eq. 0 ) then !object is a single table call aot_table_close(L=conf, thandle=stl_subHandle) allocate(me (1) ) call tem_load_stlHead_single( me = me(1), conf = conf, & & thandle = stl_handle ) else !object is a multiple table call aot_table_close(L=conf, thandle=stl_subHandle) nObjects = aot_table_length(L=conf, thandle=stl_handle) allocate(me (nObjects) ) do iObj = 1, nObjects call aot_table_open( L = conf, parent = stl_handle, & & thandle = stl_subhandle, pos = iObj ) call tem_load_stlHead_single( me = me(iObj), conf = conf, & & thandle = stl_subHandle ) call aot_table_close(L=conf, thandle=stl_subHandle) end do end if call aot_table_close(L=conf, thandle=stl_Handle) end subroutine tem_load_stlHead