]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PythonAddons/macros/midSurface/surfaceMediane.py
Salome HOME
La part
[modules/shaper.git] / src / PythonAddons / macros / midSurface / surfaceMediane.py
index cfb6e70f5c5a42293c8cd899ec4a468605b6ff4f..13e493ef5d5b467ac7df967818d62a2b740d05b0 100755 (executable)
@@ -34,10 +34,9 @@ alexandre.prunie@blastsolutions.io
 guillaume.schweitzer@blastsolutions.io
 
 Gérald NICOLAS
-+33.1.78.19.43.52
 """
 
-__revision__ = "V10.48"
+__revision__ = "V10.49"
 
 #========================= Les imports - Début ===================================
 
@@ -1820,6 +1819,7 @@ Sorties :
       texte = "Création de la boite englobante pour l'objet '{}' ".format(objet.name())
       texte += "de type '{}'".format(objet.shapeType())
       print (texte)
+    #print ('bbox = model.getBoundingBox(self.part_doc, model.selection("{}", "{}"))'.format(objet.shapeType(),objet.name()))
     bbox = model.getBoundingBox(self.part_doc, model.selection("{}".format(objet.shapeType()), "{}".format(objet.name())))
 
     bbox_nom = bbox.name()
@@ -2089,6 +2089,9 @@ Sorties :
 # 1. Définition de la pièce
 
       self.part_doc = model.activeDocument()
+      if ( self.part_doc.kind() == "PartSet" ):
+        part = model.addPart(self.part_doc)
+        self.part_doc = part.document()
 
 # 2. Import de la CAO
 
@@ -2450,12 +2453,13 @@ Sorties :
 if __name__ == "__main__" :
 
 # 1. Options
+  FIC_CAO = os.path.join(os.getenv("HOME"), "dev", "git", "shaper", "src", "PythonAddons", "macros", "midSurface", "midSurface.stp")
 
   L_OPTIONS = list()
+  #L_OPTIONS.append("-h")
+  #L_OPTIONS.append("-v")
   L_OPTIONS.append("-vmax")
   #L_OPTIONS.append("-export_step")
-  FIC_CAO = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "midSurface", "midSurface.stp")
-  #FIC_CAO = os.path.join(os.getenv("HOME"), "salome-dev", "DEV_package", "modules", "src", "SHAPER", "src", "PythonAddons", "macros", "midSurface", "Objet_1.stp")
 
 # 2. Lancement de la classe