]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
t_shape available in salome.geom Pythonpath, test as a function
authorPaul RASCLE <paul.rascle@edf.fr>
Sun, 10 Jan 2016 17:23:44 +0000 (18:23 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 13 Jan 2016 14:00:50 +0000 (15:00 +0100)
src/Tools/geom_plugins.py
src/Tools/t_shape/CMakeLists.txt
src/Tools/t_shape/t_shape_builder.py

index a1f6ab394ef7f56a32558dd202cb92b03a3c3077..d9ed81f41aa37257060ddb34090c58924b9bf7ae 100644 (file)
@@ -22,8 +22,8 @@
 import salome_pluginsmanager
 
 def t_shape_fluid(context):
-    from t_shape import t_shape_builder
-    from t_shape import t_shape_dialog
+    from salome.geom.t_shape import t_shape_builder
+    from salome.geom.t_shape import t_shape_dialog
     import xalome
     from PyQt4.QtGui import QMessageBox
     activeStudy = context.study
index 4701fc26d5a8e22ef3e2b73c98d935ed7980198f..98f580077ff36142b29cceeefa4518ea0e11b3f6 100644 (file)
@@ -40,5 +40,5 @@ PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_GEOM_INSTALL_PLUGINS}/t_shape)
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_GEOM_INSTALL_PLUGINS}/t_shape)
\ No newline at end of file
+SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom/t_shape)
\ No newline at end of file
index 7e9ab3e3498dad472a37adcd5d4b99943e6e5496..d4230cf2336045416c6607f145600130eb180562 100644 (file)
@@ -327,16 +327,23 @@ def jonction(study, r1, r2, h1, h2, a1):
  
   return faci, sect45, arc1, l1, lord90, lord45, edges, arcextru
 
-if __name__=="__main__":
+def test_t_shape_builder():
   """For testing purpose"""
   salome.salome_init()
   theStudy = salome.myStudy
   geompy = geomBuilder.New(theStudy)
-  for r1 in [1, 100, 10000]:
-    for r2 in [0.75*r1, 0.3*r1, 0.1*r1]:
-      for thickness in [(r1-r2)/10.0, (r1-r2) /2.0, 0.75*(r1-r2)]:
-        h1 = r1 * 1.5
+  for r1 in [1., 100.]:
+    for r2 in [0.9*r1, 0.5*r1, 0.1*r1, 0.05*r1]:
+      for thickness in [r1/100., r1/10., r1/2.]:
+        print r1, r2, thickness
+        h1 = r1 * 2.0
         h2 = h1
-        res = build_shape(theStudy, r1, r2, h1, h2, thickness)
-        geompy.addToStudy(res, "res_%f_%f_%f"%(r1,r2, thickness))
+        try:
+          res = build_shape(theStudy, r1, r2, h1, h2, thickness)
+          geompy.addToStudy(res, "res_%f_%f_%f"%(r1,r2, thickness))
+        except:
+          print "problem with res_%f_%f_%f"%(r1,r2, thickness)
   
+if __name__=="__main__":
+  """For testing purpose"""
+  test_t_shape_builder()