save_into_file_stl Subroutine

private subroutine save_into_file_stl(self, base_file_name, is_ascii)

Save AABB tree boxes facets into files STL.

Arguments

Type IntentOptional AttributesName
class(aabb_tree_object), intent(in) :: self

AABB tree.

character(len=*), intent(in) :: base_file_name

File name.

logical, intent(in), optional :: is_ascii

Sentinel to check if file is ASCII.

Calls

proc~~save_into_file_stl~~CallsGraph proc~save_into_file_stl save_into_file_stl node node proc~save_into_file_stl->node str str proc~save_into_file_stl->str proc~first_node first_node proc~save_into_file_stl->proc~first_node proc~nodes_number_at_level nodes_number_at_level proc~save_into_file_stl->proc~nodes_number_at_level proc~nodes_number nodes_number proc~first_node->proc~nodes_number proc~nodes_number->proc~nodes_number_at_level
Help

Source Code


Source Code

   subroutine save_into_file_stl(self, base_file_name, is_ascii)
   !< Save  AABB tree boxes facets into files STL.
   class(aabb_tree_object), intent(in)           :: self           !< AABB tree.
   character(*),            intent(in)           :: base_file_name !< File name.
   logical,                 intent(in), optional :: is_ascii       !< Sentinel to check if file is ASCII.
   logical                                       :: is_ascii_      !< Sentinel to check if file is ASCII, local variable.
   integer(I4P)                                  :: level          !< Counter.
   integer(I4P)                                  :: b, bb, bbb     !< Counter.

   associate(node=>self%node)
      if (self%is_initialized) then
         is_ascii_ = .false. ; if (present(is_ascii)) is_ascii_ = is_ascii
         do level=0, self%refinement_levels
            b = first_node(level=level)
            do bb=1, nodes_number_at_level(level=level)
               bbb = b + bb - 1
               call node(bbb)%save_facets_into_file_stl(file_name=trim(adjustl(base_file_name))//       &
                                                                  'aabb-l_'//trim(str(level, .true.))// &
                                                                      '-b_'//trim(str(bbb, .true.))//'.stl', is_ascii=is_ascii_)
            enddo
         enddo
      endif
   endassociate
   endsubroutine save_into_file_stl


aabb_assign_aabb aabb_node_assign_aabb_node aabb_tree_assign_aabb_tree add_facets add_facets add_vertex_occurrence allocate_facets analize bmax bmin build_connectivity check_normal check_vertices_occurrencies cli_parse cli_parse cli_parse cli_parse cli_parse cli_parse close_file closest_point closest_point compute_bb_from_facets compute_metrix compute_metrix compute_normal compute_normals compute_octants compute_octants compute_volume create_aabb_tree destroy destroy destroy destroy destroy distance distance distance distance distance distance_from_facets distance_from_facets do_ray_intersect do_ray_intersect do_ray_intersect edge_connection_in_other_ref facet_assign_facet file_stl_assign_file_stl first_child_node first_node flip_edge has_facets has_facets initialize initialize initialize initialize initialize is_allocated is_inside is_point_inside_polyhedron_ri is_point_inside_polyhedron_sa load_facets_number_from_file load_from_file load_from_file_ascii load_from_file_binary load_header_from_file make_normal_consistent mirror_by_matrix mirror_by_matrix mirror_by_normal mirror_by_normal nodes_number nodes_number_at_level open_file parent_node ray_intersections_number ray_intersections_number ray_intersections_number resize resize reverse_normal reverse_normals rotate_by_axis_angle rotate_by_axis_angle rotate_by_matrix rotate_by_matrix sanitize_normals save_facets_into_file_stl save_facets_into_file_stl save_geometry_tecplot_ascii save_geometry_tecplot_ascii save_geometry_tecplot_ascii save_header_into_file save_into_file save_into_file_ascii save_into_file_binary save_into_file_stl save_trailer_into_file solid_angle statistics tetrahedron_volume translate translate update_connectivity update_extents update_extents vertex vertex_global_id