#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-"""Test de la création de surfaces médianes"""
-__revision__ = "V01.03"
+from salome.shaper import model
+from ModelAPI import *
import os
-from ModelAPI import *
-
aSession = ModelAPI_Session.get()
def getFilePath(fileName):
- """Le fichier décrivant l'objet"""
path = os.path.join(os.getenv("SHAPER_ROOT_DIR"), "bin", "salome", "macros", "midSurface")
return os.path.join(path, fileName)
theFile = getFilePath("midSurface.stp")
-theFile = getFilePath("Objet_1.stp")
aSession.startOperation("Create part for mid surface")
aPartFeature = aSession.moduleDocument().addFeature("Part")
aFile.setValue(theFile)
aSession.finishOperation()
-#print ("Nombre de dossiers : {}".format(aPart.size("Folders")))
+#for cle in ("Bodies", "Groups", "Construction", "Folders"):
+ #print (cle,":",aPart.size(cle))
-assert(aPart.size("Folders") == 1), "Wrong number of folders: {}".format(aPart.size("Folders"))
+assert(aPart.size("Bodies") == 8), "Right number of construction: {}".format(aPart.size("Bodies"))
+assert(aPart.size("Construction") == 7), "Right number of construction: {}".format(aPart.size("Construction"))
+assert(aPart.size("Groups") == 2), "Right number of construction: {}".format(aPart.size("Groups"))
+assert(aPart.size("Folders") == 4), "Wrong number of folders: {}".format(aPart.size("Folders"))