Skip to content
Snippets Groups Projects
Commit 2bdafd00 authored by Florian Schültke's avatar Florian Schültke
Browse files

Merge branch 'fix/stop_create_plots_if_plotOn_is_false' into 'develop'

stop create plots if plotOn = false

See merge request !16
parents d766ec11 4d6b3c1a
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( ...@@ -110,6 +110,10 @@ fs::path Conventional::plot_stabilizer_planform(
const geom2::MultisectionSurface<geom2::AirfoilSection>& surface, const geom2::MultisectionSurface<geom2::AirfoilSection>& surface,
const std::vector<geom2::MultisectionSurface<geom2::PolygonSection>>& spars, const std::vector<geom2::MultisectionSurface<geom2::PolygonSection>>& spars,
const std::vector<geom2::MultisectionSurface<geom2::PolygonSection>>& devices) { 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)); auto coordinates_xy = geom2::transform::outline_2d(surface, geom2::Direction_3(0, 0, 1));
std::deque<double> spanwise; std::deque<double> spanwise;
std::deque<double> chordwise; std::deque<double> chordwise;
...@@ -185,7 +189,7 @@ fs::path Conventional::plot_stabilizer_planform( ...@@ -185,7 +189,7 @@ fs::path Conventional::plot_stabilizer_planform(
ax->xlabel("y [m]"); ax->xlabel("y [m]");
ax->ylabel("x [m]"); ax->ylabel("x [m]");
} }
ax->limits_mode(matplot::manual); ax->limits_mode(matplot::manual);
ax->axis(matplot::equal); ax->axis(matplot::equal);
if (is_vertical) { if (is_vertical) {
...@@ -208,6 +212,10 @@ fs::path Conventional::plot_stabilizer_planform( ...@@ -208,6 +212,10 @@ fs::path Conventional::plot_stabilizer_planform(
fs::path Conventional::plot_thickness_and_twist_distribution( fs::path Conventional::plot_thickness_and_twist_distribution(
const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) { const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) {
/* Plot active */
if (rtIO->plotOn) {
return "";
}
std::vector<double> eta; std::vector<double> eta;
std::vector<double> thickness_to_chord_ratio; std::vector<double> thickness_to_chord_ratio;
std::vector<double> twist; std::vector<double> twist;
...@@ -250,6 +258,10 @@ fs::path Conventional::plot_thickness_and_twist_distribution( ...@@ -250,6 +258,10 @@ fs::path Conventional::plot_thickness_and_twist_distribution(
* \return fs::path * \return fs::path
*/ */
std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurface<geom2::AirfoilSection>& surface) { 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::map<std::string, std::vector<geom2::Point_2>> airfoils_data{};
std::vector<fs::path> airfoil_plots_path; std::vector<fs::path> airfoil_plots_path;
...@@ -295,4 +307,4 @@ std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurfa ...@@ -295,4 +307,4 @@ std::vector<fs::path> Conventional::plot_airfoils(const geom2::MultisectionSurfa
} }
} // namespace low } // namespace low
} // namespace taw } // namespace taw
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment