Skip to content
Snippets Groups Projects
Commit 4d6b3c1a authored by heappy's avatar heappy
Browse files

stop create plots if plotOn = false

parent 7fdfbb04
No related branches found
No related tags found
5 merge requests!263Apply 1 suggestion(s) to 1 file(s),!261Reintruduced automatic flight condition selection,!245Apply 1 suggestion(s) to 1 file(s),!233Initial open source version,!16stop create plots if plotOn = false
......@@ -110,6 +110,10 @@ fs::path Conventional::plot_stabilizer_planform(
const geom2::MultisectionSurface<geom2::AirfoilSection>& surface,
const std::vector<geom2::MultisectionSurface<geom2::PolygonSection>>& spars,
const std::vector<geom2::MultisectionSurface<geom2::PolygonSection>>& devices) {
/* Plot active */
if (!rtIO->plotOn) {
return "";
}
auto coordinates_xy = geom2::transform::outline_2d(surface, geom2::Direction_3(0, 0, 1));
std::deque<double> spanwise;
std::deque<double> chordwise;
......@@ -185,7 +189,7 @@ fs::path Conventional::plot_stabilizer_planform(
ax->xlabel("y [m]");
ax->ylabel("x [m]");
}
ax->limits_mode(matplot::manual);
ax->axis(matplot::equal);
if (is_vertical) {
......@@ -208,6 +212,10 @@ fs::path Conventional::plot_stabilizer_planform(
fs::path Conventional::plot_thickness_and_twist_distribution(
const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) {
/* Plot active */
if (rtIO->plotOn) {
return "";
}
std::vector<double> eta;
std::vector<double> thickness_to_chord_ratio;
std::vector<double> twist;
......@@ -250,6 +258,10 @@ fs::path Conventional::plot_thickness_and_twist_distribution(
* \return fs::path
*/
std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) {
/* Plot active */
if (!rtIO->plotOn) {
return {""};
}
std::map<std::string, std::vector<geom2::Point_2>> airfoils_data{};
std::vector<fs::path> airfoil_plots_path;
......@@ -295,4 +307,4 @@ std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurfa
}
} // namespace low
} // namespace taw
\ No newline at end of file
} // namespace taw
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment