Compute volume bounded by STL surface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
elemental subroutine compute_volume(self)
!< Compute volume bounded by STL surface.
class(file_stl_object), intent(inout) :: self !< File STL.
integer(I4P) :: f !< Counter.
if (self%facets_number>0) then
self%volume = 0._R8P
do f=1, self%facets_number
self%volume = self%volume + self%facet(f)%tetrahedron_volume(apex=self%facet(1)%vertex_1)
enddo
endif
endsubroutine compute_volume