import SALOMEDS
import os
+import SALOME_ModuleCatalog
+
+print "======================================================================"
+print " Get Catalog "
+print "======================================================================"
+obj = salome.naming_service.Resolve('Kernel/ModulCatalog')
+catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog)
+
print "======================================================================"
print " Create Study "
print "======================================================================"
+comp = catalog.GetComponent("GEOM")
+if comp is None:
+ raise RuntimeError,"Component GEOM not found in Module Catalog."
+
import geompy
print "================================="
print "============= Test SMESH ============================="
print
+comp = catalog.GetComponent("SMESH")
+if comp is None:
+ raise RuntimeError,"Component SMESH not found in Module Catalog."
+
+comp = catalog.GetComponent("MED")
+if comp is None:
+ raise RuntimeError,"Component MED not found in Module Catalog."
+
import SMESH
import smeshpy
-geom = salome.lcc.FindOrLoadComponent("FactoryServer", "Geometry")
+geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM")
myBuilder = salome.myStudy.NewBuilder()
smeshgui = salome.ImportComponentGUI("SMESH")
print "============= Test Supervisor ============================="
print
+comp = catalog.GetComponent("SUPERV")
+if comp is None:
+ raise RuntimeError,"Component SUPERV not found in Module Catalog."
+
from SuperV import *
import SALOMEDS
myStudy = salome.myStudy
myBuilder = myStudy.NewBuilder()
-SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","Supervision")
+SuperVision = lcc.FindOrLoadComponent("SuperVisionContainer","SUPERV")
father = myStudy.FindComponent("SUPERV")
if father is None:
father = myBuilder.NewComponent("SUPERV")
anIOR.SetValue(dataflow.getIOR())
import os
-dir= os.getenv("SALOME_ROOT_DIR")
+dir= os.getenv("SUPERV_ROOT_DIR")
if dir == None:
- raise RuntimeError, "SALOME_ROOT_DIR is not defined"
-xmlfile = dir +"/data/GraphEssai.xml"
+ raise RuntimeError, "SUPERV_ROOT_DIR is not defined"
+xmlfile = dir +"/examples/GraphEssai.xml"
print "Load dataflow from the file : "
print xmlfile
print
print
print "============= Test VISU and MED ============================="
print
+
+comp = catalog.GetComponent("VISU")
+if comp is None:
+ raise RuntimeError,"Component VISU not found in Module Catalog."
+
import sys
import SALOMEDS
import SALOME
import visu_gui
medFile = "pointe.med"
-medFile = os.getenv('SALOME_ROOT_DIR') + '/data/' + medFile
+medFile = os.getenv('KERNEL_ROOT_DIR') + '/examples/' + medFile
print "Load ", medFile
studyCurrent = salome.myStudyName
-med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "Med")
-myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "Visu")
+med_comp = salome.lcc.FindOrLoadComponent("FactoryServer", "MED")
+myVisu = salome.lcc.FindOrLoadComponent("FactoryServer", "VISU")
try:
if os.access(medFile, os.R_OK) :