Build and parse test cli.
subroutine cli_parse()
!< Build and parse test cli.
type(command_line_interface) :: cli !< Test command line interface.
real(R8P) :: axis_(3) !< Axis of rotation.
integer(I4P) :: error !< Error trapping flag.
call cli%init(progname='fossil_test_rotate', &
authors='S. Zaghi', &
help='Usage: ', &
examples=["fossil_test_rotate --stl src/tests/dragon.stl"], &
epilog=new_line('a')//"all done")
call cli%add(switch='--stl', &
help='STL (input) file name', &
required=.false., &
def='src/tests/cube.stl', &
act='store')
call cli%add(switch='--axis', &
help='axis of rotation', &
required=.false., &
nargs='+', &
def='1.0 0.0 0.0', &
act='store')
call cli%add(switch='--angle', &
help='angle of rotation', &
required=.false., &
def='1.57079633', &
act='store')
call cli%parse(error=error) ; if (error/=0) stop
call cli%get(switch='--stl', val=file_name_stl, error=error) ; if (error/=0) stop
call cli%get(switch='--axis', val=axis_, error=error) ; if (error/=0) stop
call cli%get(switch='--angle', val=angle, error=error) ; if (error/=0) stop
axis%x = axis_(1)
axis%y = axis_(2)
axis%z = axis_(3)
endsubroutine cli_parse