3submodule(
fplot_core) fplot_tri_surface_plot_data
6 module function tspd_get_data_cmd(this) result(x)
8 class(tri_surface_plot_data),
intent(in) :: this
9 character(len = :),
allocatable :: x
13 type(string_builder) :: str
14 integer(int32) :: i, j, n
15 character :: delimiter, nl
19 n =
size(this%m_indices, 1)
29 j = this%m_indices(i, 1)
30 call str%append(to_string(this%m_x(j)))
31 call str%append(delimiter)
32 call str%append(to_string(this%m_y(j)))
33 call str%append(delimiter)
34 call str%append(to_string(this%m_z(j)))
38 j = this%m_indices(i, 2)
39 call str%append(to_string(this%m_x(j)))
40 call str%append(delimiter)
41 call str%append(to_string(this%m_y(j)))
42 call str%append(delimiter)
43 call str%append(to_string(this%m_z(j)))
49 j = this%m_indices(i, 2)
50 call str%append(to_string(this%m_x(j)))
51 call str%append(delimiter)
52 call str%append(to_string(this%m_y(j)))
53 call str%append(delimiter)
54 call str%append(to_string(this%m_z(j)))
59 j = this%m_indices(i, 3)
60 call str%append(to_string(this%m_x(j)))
61 call str%append(delimiter)
62 call str%append(to_string(this%m_y(j)))
63 call str%append(delimiter)
64 call str%append(to_string(this%m_z(j)))
70 j = this%m_indices(i, 3)
71 call str%append(to_string(this%m_x(j)))
72 call str%append(delimiter)
73 call str%append(to_string(this%m_y(j)))
74 call str%append(delimiter)
75 call str%append(to_string(this%m_z(j)))
79 j = this%m_indices(i, 1)
80 call str%append(to_string(this%m_x(j)))
81 call str%append(delimiter)
82 call str%append(to_string(this%m_y(j)))
83 call str%append(delimiter)
84 call str%append(to_string(this%m_z(j)))
95 x = char(str%to_string())
99 module function tspd_get_cmd(this) result(x)
101 class(tri_surface_plot_data),
intent(in) :: this
102 character(len = :),
allocatable :: x
105 type(string_builder) :: str
109 call str%initialize()
112 n = len_trim(this%get_name())
114 call str%append(
' "-" title "')
115 call str%append(this%get_name())
118 call str%append(
' "-" notitle')
122 if (this%get_use_wireframe())
then
123 call str%append(
" with lines")
125 call str%append(
" with pm3d")
129 x = char(str%to_string())
133 pure module function tspd_get_wireframe(this) result(rst)
134 class(tri_surface_plot_data),
intent(in) :: this
136 rst = this%m_wireframe
140 module subroutine tspd_set_wireframe(this, x)
141 class(tri_surface_plot_data),
intent(inout) :: this
142 logical,
intent(in) :: x
147 module subroutine tspd_define_data(this, tri)
149 class(tri_surface_plot_data),
intent(inout) :: this
150 class(delaunay_tri_surface),
intent(in) :: tri
153 if (
allocated(this%m_x))
deallocate(this%m_x)
154 if (
allocated(this%m_y))
deallocate(this%m_y)
155 if (
allocated(this%m_z))
deallocate(this%m_z)
156 if (
allocated(this%m_indices))
deallocate(this%m_indices)
158 this%m_x = tri%get_points_x()
159 this%m_y = tri%get_points_y()
160 this%m_z = tri%get_points_z()
161 this%m_indices = tri%get_indices()