--- /dev/null
+#
+# generate dependencies for idl file :
+#
+
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=..
+srcdir=@srcdir@
+VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome
+
+@COMMENCE@
+
+IDL_FILES = EFICAS_Gen.idl
+
+PY_CLIENT_IDL = $(IDL_FILES)
+
+# we copy all idl file in $(top_builddir)/idl
+inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
+
+$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
+ #$(CP) $< $@
+ cp -f $< $@
+
+lib: pyidl
+
+PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
+
+pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
+
+$(PYTHON_BUILD_SITE):
+ $(INSTALL) -d $@
+
+$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
+ $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
+
+# install python client (generated from idl file
+install: install-pyidl install-idl
+
+# create directory $(idldir) and copy idl files into it
+install-idl: $(IDL_FILES)
+ $(INSTALL) -d $(idldir)
+ cp -p $^ $(idldir)
+
+install-pyidl: $(IDL_FILES)
+ $(INSTALL) -d $(PYTHON_SITE_INSTALL)
+ @for file in $^ dummy; do \
+ if [ $$file != "dummy" ]; then \
+ $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
+ fi ; \
+ done ;
+
+
+cleandep:
+ -$(RM) .dep*
+
+distclean:
+ -$(RM) *.py
+ -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
+ -$(RM) Makefile
+
--- /dev/null
+import EFICAS_ORB__POA
+import SALOME_ComponentPy
+
+class EFICAS(EFICAS_ORB__POA.EFICAS_Gen,
+ SALOME_ComponentPy.SALOME_ComponentPy_i):
+ """
+ Pour etre un composant SALOME cette classe Python
+ doit avoir le nom du composant et heriter de la
+ classe EFICAS_Gen issue de la compilation de l'idl
+ par omniidl et de la classe SALOME_ComponentPy_i
+ qui porte les services generaux d'un composant SALOME
+ """
+ def __init__ (self, orb, poa, contID, containerName, instanceName,
+ interfaceName):
+ print "EFICAS.__init__: ",containerName,' ',instanceName
+ SALOME_ComponentPy.SALOME_ComponentPy_i.__init__(self, orb, poa,
+ contID, containerName,instanceName, interfaceName, 0 )
+ # On stocke dans l'attribut _naming_service, une reference sur
+ # le Naming Service CORBA
+ self._naming_service=SALOME_ComponentPy.SALOME_NamingServicePy_i(self._orb)
+
# Author : Paul RASCLE, EDF
# Project : SALOME
# Copyright : EDF 2003
-# $Header: /home/salome/PlateFormePAL/Bases_CVS_EDF/Modules_EDF/ASTER_SRC/src/ASTER/SMESH_utils.py,v 1.1.1.1.2.1 2004/05/18 11:40:20 salome Exp $
+# $Header: /home/salome/PlateFormePAL/Bases_CVS_EDF/Modules_EDF/EFICAS_SRC/src/EFICASGUI/SMESH_utils.py,v 1.1.1.1 2004/09/28 09:41:16 salome Exp $
#=============================================================================
from omniORB import CORBA
print "no IOR attribute on study object: ", entry
else:
iorString = iorso.Value()
- print iorString
+ print ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>iorString =",iorString
ior = orb.string_to_object(iorString)
return ior
+
+def entryToIor2(myStudy,entry):
+ myBuilder = myStudy.NewBuilder()
+ ior = None
+ SO = None
+ try:
+ SO = myStudy.FindObjectID(entry)
+ except:
+ print "invalid entry: ",entry
+ SO = None
+ if SO != None:
+ boo,iorso = myBuilder.FindAttribute(SO,"AttributeIOR")
+ if boo == 0:
+ print "no IOR attribute on study object: ", entry
+ else:
+ iorString = iorso.Value()
+ ior = orb.string_to_object(iorString)
+ return iorString
+
+
#--------------------------------------------------------------------------
def entryToName2(myStudy,entry):
#--------------------------------------------------------------------------
-
+ """
def getMainShape(myStudy,entry):
anObject=entryToIor(myStudy,entry)
- subShape=anObject._narrow(GEOM.GEOM_Shape)
+ subShape=anObject._narrow(GEOM.GEOM_Object)
if subShape == None:
print "entry does not give a shape: ", entry
return None
- isMain=subShape._get_IsMainShape()
+ isMain=subShape.IsMainShape()
if isMain:
iorMain=subShape
else:
iorStringMain=subShape._get_MainName()
iorMain = orb.string_to_object(iorStringMain)
return iorMain
-
+ """
+
def getMainShapeName(myStudy,entry):
anObject=entryToIor(myStudy,entry)
- subShape=anObject._narrow(GEOM.GEOM_Shape)
+ subShape=anObject._narrow(GEOM.GEOM_Object)
+ iorMain = subShape.GetMainShape()
+ stringior= orb.object_to_string(iorMain)
+ print "###############>stringior", stringior
+ return stringior
+
+def getMainShapeName3(myStudy,entry):
+ anObject=entryToIor(myStudy,entry)
+ subShape=anObject._narrow(GEOM.GEOM_Object)
+ stringior = subShape.GetMainShape().GetName()
+ print "###############>stringior", stringior
+ return stringior
+
+def getMainShapeName2(myStudy,entry):
+ anObject=entryToIor(myStudy,entry)
+ subShape=anObject._narrow(GEOM.GEOM_Gen)
if subShape == None:
print "entry does not give a shape: ", entry
return None
- isMain=subShape._get_IsMainShape()
+ isMain=subShape.IsMainShape()
if isMain:
iorMain=subShape
else:
+ print "############### iorStringMain=subShape._get_MainName()"
iorStringMain=subShape._get_MainName()
iorMain = orb.string_to_object(iorStringMain)
+
stringior= orb.object_to_string(iorMain)
return stringior
#--------------------------------------------------------------------------
# typenoeudorcell = 1 on traite des faces
refList = []
subShapeIndexes = []
+
+ print "################ len(entryList)=", len(entryList)
if len(entryList) > 0:
iorMain = getMainShapeName(myStudy, entryList[0])
+ if iorMain == None:
+ raise RuntimeException("L'ior CORBA n'est pas défini")
+
+ print "################ iormain=", iorMain
+ # _CS_gbo Test
+ #iorMain = "facebas2 facebas1"
+
myCL=smesh.GetOrCreateCL(str(iorMain))
if len(entryList) > 0:
labelGroupMa = []
for val in subShapeIndexes:
#label="GMM%d"%(val)
+ print "################> val = ", val
labelGroupMa.append(val)
- print labelGroupMa
return labelGroupMa
#--------------------------------------------------------------------------