Salome HOME
Conflict with matplotlib and eficas if using Python call for checkboundaries revert...
authorYOANN AUDOUIN <B61570@dsp0919998.atlas.edf.fr>
Fri, 11 Dec 2020 13:52:42 +0000 (14:52 +0100)
committerYOANN AUDOUIN <B61570@dsp0919998.atlas.edf.fr>
Fri, 11 Dec 2020 13:52:42 +0000 (14:52 +0100)
src/salome_hydro/checkBoundariesDialog.py

index b0cb84f935daaecaf2d6373d18cf56fa842d260d..8d4fe2cf32800847ba40700bc55229273e4576a1 100644 (file)
@@ -120,17 +120,15 @@ class checkBoundariesDialog(QDialog):
             msgBox.setText( "Boundary condition file does not exist" )
             msgBox.exec_()
             return
-        bnd = True
-        liq_bnd = False
+        option = "--bnd"
         if self.liqbcd:
-            bnd = False
-            liq_bnd = True
-        from postel.plot_actions import plot_mesh2d
-        from data_manip.extraction.telemac_file import TelemacFile
-
-        res = TelemacFile(medFile, bnd_file=bcdFile)
-        plot_mesh2d(res, display_bnd=bnd, display_liq_bnd=liq_bnd)
-        res.close()
+            option = "--liq-bnd"
+        cmd = ["plot.py", "mesh2d", medFile, "-b", bcdFile, option]
+        try:
+            proc = subprocess.Popen(cmd)
+        except OSError:
+            print("invalid command")
+            QMessageBox.critical(self, "command error", "%s is not found" % cmd[0])
         self.accept()
 
     def on_reject(self):