Mirror facets given normal of mirroring plane.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
||
| type(vector_R8P), | intent(in) | :: | normal | Normal of mirroring plane. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
elemental subroutine mirror_by_normal(self, normal, recompute_metrix)
!< Mirror facets given normal of mirroring plane.
class(file_stl_object), intent(inout) :: self !< File STL.
type(vector_R8P), intent(in) :: normal !< Normal of mirroring plane.
logical, intent(in), optional :: recompute_metrix !< Sentinel to activate metrix recomputation.
real(R8P) :: matrix(3,3) !< Mirroring matrix.
integer(I4P) :: f !< Counter.
if (self%facets_number>0) then
matrix = mirror_matrix_R8P(normal=normal)
do f=1, self%facets_number
call self%facet(f)%mirror(matrix=matrix, recompute_metrix=recompute_metrix)
enddo
endif
endsubroutine mirror_by_normal