Add an arrow to an STL file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(stl_file), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in), | dimension(3) | :: | origin |
coordinates of the origin of the axes |
|
real(kind=wp), | intent(in), | dimension(3) | :: | v |
vector |
|
real(kind=wp), | intent(in) | :: | radius |
radius of the cylinder |
||
integer, | intent(in) | :: | num_points |
number of point on the circle (>=3) |
||
real(kind=wp), | intent(in) | :: | arrowhead_radius_factor |
arrowhead cone radius factor (multiple of cylinder radius) |
||
real(kind=wp), | intent(in) | :: | arrowhead_length_factor |
arrowhead tip length factor (multiple of vector length) |
subroutine add_arrow(me,origin,v,radius,num_points,& arrowhead_radius_factor,arrowhead_length_factor) implicit none class(stl_file),intent(inout) :: me real(wp),dimension(3),intent(in) :: origin !! coordinates of the origin of the axes real(wp),dimension(3),intent(in) :: v !! vector real(wp),intent(in) :: radius !! radius of the cylinder integer,intent(in) :: num_points !! number of point on the circle (>=3) real(wp),intent(in) :: arrowhead_radius_factor !! arrowhead cone radius factor !! (multiple of cylinder radius) real(wp),intent(in) :: arrowhead_length_factor !! arrowhead tip length factor !! (multiple of vector length) call me%add_cylinder(origin,v,radius,num_points,& initial_cap=.true.,final_cap=.true.) call me%add_cone(v,v+arrowhead_length_factor*v,& arrowhead_radius_factor*radius,num_points,initial_cap=.true.) end subroutine add_arrow