From b913d76972d10be18af7046a5cf80bc025e516fd Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Wed, 7 Feb 2024 16:56:18 +0100
Subject: [PATCH] Meshing: Mage: Change API of mailleurTT for the next mage
 version.

---
 src/Meshing/Mage.py | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/src/Meshing/Mage.py b/src/Meshing/Mage.py
index bd60ed1c..e306bc9f 100644
--- a/src/Meshing/Mage.py
+++ b/src/Meshing/Mage.py
@@ -282,7 +282,13 @@ class MeshingWithMageMailleurTT(AMeshingTool):
     # Meshing #
     ###########
 
-    def meshing(self, reach, step: float = 50):
+    def meshing(self, reach,
+                step: float = 50,
+                limites=[-1, -1],
+                directrices=['un', 'np'],
+                lplan: bool = False,
+                lm: int = 3,
+                lineaire: bool = False):
         if reach is None or len(reach.profiles) == 0:
             return reach
 
@@ -294,9 +300,27 @@ class MeshingWithMageMailleurTT(AMeshingTool):
             proc = QProcess()
             proc.setWorkingDirectory(tmp)
 
-            logger.info(f"! mailleurTT {st_file} {m_file} {str(step)}")
+            lplan = 1 if lplan else 0
+            lineaire = 1 if lineaire else 0
+
+            logger.info(
+                f"! mailleurTT {st_file} {m_file} " +
+                f"{str(step)} " +
+                f"{limites[0]} {limites[1]} " +
+                f"{directrices[0]} {directrices[1]} " +
+                f"{lplan} {lm} {lineaire}"
+            )
             proc.start(
-                self._exe_path(), [st_file, m_file, str(step)]
+                self._exe_path(),
+                list(map(
+                    str,
+                    [
+                        st_file, m_file, step,
+                        limites[0], limites[1],
+                        directrices[0], directrices[1],
+                        lplan, lm, lineaire
+                    ]
+                ))
             )
             proc.waitForFinished()
 
-- 
GitLab