Resize (scale) facets by x or y or z or vectorial factors.
The name scale has not been used, it been a Fortran built-in.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(file_stl_object), | intent(inout) | :: | self | File STL. |
||
| real(kind=R8P), | intent(in), | optional | :: | x | Factor along x axis. |
|
| real(kind=R8P), | intent(in), | optional | :: | y | Factor along y axis. |
|
| real(kind=R8P), | intent(in), | optional | :: | z | Factor along z axis. |
|
| type(vector_R8P), | intent(in), | optional | :: | factor | Vectorial factor. |
|
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
elemental subroutine resize(self, x, y, z, factor, recompute_metrix)
!< Resize (scale) facets by x or y or z or vectorial factors.
!<
!< @note The name `scale` has not been used, it been a Fortran built-in.
class(file_stl_object), intent(inout) :: self !< File STL.
real(R8P), intent(in), optional :: x !< Factor along x axis.
real(R8P), intent(in), optional :: y !< Factor along y axis.
real(R8P), intent(in), optional :: z !< Factor along z axis.
type(vector_R8P), intent(in), optional :: factor !< Vectorial factor.
logical, intent(in), optional :: recompute_metrix !< Sentinel to activate metrix recomputation.
type(vector_R8P) :: factor_ !< Vectorial factor, local variable.
if (self%facets_number>0) then
factor_ = 1._R8P
if (present(factor)) then
factor_ = factor
else
if (present(x)) factor_%x = x
if (present(y)) factor_%y = y
if (present(z)) factor_%z = z
endif
call self%facet%resize(factor=factor_, recompute_metrix=recompute_metrix)
endif
endsubroutine resize