Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(file_stl_object), | intent(in) | :: | rhs | Right hand side. |
pure subroutine file_stl_assign_file_stl(lhs, rhs)
!< Operator `=`.
class(file_stl_object), intent(inout) :: lhs !< Left hand side.
type(file_stl_object), intent(in) :: rhs !< Right hand side.
if (allocated(lhs%file_name)) deallocate(lhs%file_name)
if (allocated(rhs%file_name)) lhs%file_name = rhs%file_name
lhs%file_unit = rhs%file_unit
lhs%header = rhs%header
lhs%facets_number = rhs%facets_number
if (allocated(lhs%facet)) deallocate(lhs%facet)
if (allocated(rhs%facet)) allocate(lhs%facet(1:lhs%facets_number), source=rhs%facet)
lhs%aabb = rhs%aabb
lhs%bmin = rhs%bmin
lhs%bmax = rhs%bmax
lhs%is_ascii = rhs%is_ascii
lhs%is_open = rhs%is_open
endsubroutine file_stl_assign_file_stl