@@ -9,14 +9,18 @@ The corner points are ordered as: LE1, TE1, TE2, LE2.
99This creates two triangles: (LE1, TE1, TE2) and (LE1, TE2, LE2).
1010"""
1111function Makie. plot! (ax, panel:: VortexStepMethod.Panel ; color= (:red , 0.2 ), R_b_w= nothing , T_b_w= nothing , kwargs... )
12+ plots = []
1213 points = [Point3f (panel. corner_points[:, i]) for i in 1 : 4 ]
1314 if ! isnothing (R_b_w) && ! isnothing (T_b_w)
1415 points = [Point3f (R_b_w * p + T_b_w) for p in points]
1516 end
1617 faces = [Makie. GLTriangleFace (1 , 2 , 3 ), Makie. GLTriangleFace (1 , 3 , 4 )]
17- mesh! (ax, points, faces; color, kwargs... )
18+ p = mesh! (ax, points, faces; color, kwargs... )
19+ push! (plots, p)
1820 border_points = [points... , points[1 ]]
19- lines! (ax, border_points; color= :black )
21+ p = lines! (ax, border_points; color= :black )
22+ push! (plots, p)
23+ return plots
2024end
2125
2226"""
2529Plot a `BodyAerodynamics` object by plotting each of its panels.
2630"""
2731function Makie. plot! (ax, body:: VortexStepMethod.BodyAerodynamics ; color= (:red , 0.2 ), R_b_w= nothing , T_b_w= nothing , kwargs... )
32+ plots = []
2833 for panel in body. panels
29- Makie. plot! (ax, panel; color, R_b_w, T_b_w, kwargs... )
34+ p = Makie. plot! (ax, panel; color, R_b_w, T_b_w, kwargs... )
35+ push! (plots, p)
3036 end
37+ return plots
3138end
3239
3340function Makie. plot (panel:: VortexStepMethod.Panel ; size = (1200 , 800 ), kwargs... )
0 commit comments