From 06e621399bb620ba89bea72f72fc31002f9389bd Mon Sep 17 00:00:00 2001 From: Theophile Terraz <theophile.terraz@inrae.fr> Date: Mon, 2 Sep 2024 11:58:11 +0200 Subject: [PATCH] debug --- src/Meshing/Mage.py | 2 +- src/Model/Geometry/ProfileXYZ.py | 4 ++-- src/View/Geometry/Profile/Plot.py | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Meshing/Mage.py b/src/Meshing/Mage.py index f01e5b51..ce408ac0 100644 --- a/src/Meshing/Mage.py +++ b/src/Meshing/Mage.py @@ -411,7 +411,7 @@ class MeshingWithMageMailleurTT(AMeshingTool): str, [ st_file, m_file, - "update_rk", step, + "update_kp", step, limites[0], limites[1], directrices[0], directrices[1], orientation, lm, linear, origin, origin_value diff --git a/src/Model/Geometry/ProfileXYZ.py b/src/Model/Geometry/ProfileXYZ.py index 14187233..7936342a 100644 --- a/src/Model/Geometry/ProfileXYZ.py +++ b/src/Model/Geometry/ProfileXYZ.py @@ -651,8 +651,8 @@ class ProfileXYZ(Profile, SQLSubModel): Returns: Projection of the points of the profile on a plane. """ - if self.nb_points < 3: - return None + if self.nb_points < 2: + return [0.0] else: return self._get_station(self.points) diff --git a/src/View/Geometry/Profile/Plot.py b/src/View/Geometry/Profile/Plot.py index 136fcaf7..0eb1543f 100644 --- a/src/View/Geometry/Profile/Plot.py +++ b/src/View/Geometry/Profile/Plot.py @@ -313,10 +313,6 @@ class Plot(PamhyrPlot): x_carto = self.data.x() y_carto = self.data.y() - if (len(x_carto) < 3 or len(y_carto) < 3 or len(x) < 3): - # Noting to do in this case - return - self.profile_line2D, = self.canvas.axes.plot( x, y, color=self.color_plot, lw=1.5, markersize=7, marker='+', -- GitLab