Translate facets x or y or z or vectorial delta increments.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
||
| real(kind=R8P), | intent(in), | optional | :: | x | Increment along x axis. |
|
| real(kind=R8P), | intent(in), | optional | :: | y | Increment along y axis. |
|
| real(kind=R8P), | intent(in), | optional | :: | z | Increment along z axis. |
|
| type(vector_R8P), | intent(in), | optional | :: | delta | Vectorial increment. |
|
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
elemental subroutine translate(self, x, y, z, delta, recompute_metrix)
!< Translate facets x or y or z or vectorial delta increments.
class(file_stl_object), intent(inout) :: self !< File STL.
real(R8P), intent(in), optional :: x !< Increment along x axis.
real(R8P), intent(in), optional :: y !< Increment along y axis.
real(R8P), intent(in), optional :: z !< Increment along z axis.
type(vector_R8P), intent(in), optional :: delta !< Vectorial increment.
logical, intent(in), optional :: recompute_metrix !< Sentinel to activate metrix recomputation.
type(vector_R8P) :: delta_ !< Vectorial increment, local variable.
if (self%facets_number>0) then
delta_ = 0._R8P
if (present(delta)) then
delta_ = delta
else
if (present(x)) delta_%x = x
if (present(y)) delta_%y = y
if (present(z)) delta_%z = z
endif
call self%facet%translate(delta=delta_, recompute_metrix=recompute_metrix)
endif
endsubroutine translate