# -*- coding: utf-8 -*-
-from Logger import ExtLogger
+from pal.logger import ExtLogger
logger=ExtLogger( "EFICAS_SRC.EFICASGUI.eficasSalome.py" )
# -----------------------------------------------------------------------------
import eficasConfig
-# __GBO__ lignes de path ajoutees pour acceder aux packages python du
+# lignes de path ajoutees pour acceder aux packages python du
# logiciel Eficas. Le package Aster est ajoute explicitement pour
# acceder au module prefs.py. A
sys.path[:0]=[eficasConfig.eficasPath,
from InterfaceQT4 import qtEficas
import salome
-
-import studyManager
import visuDriver
import SalomePyQt
+from pal.studyedit import StudyEditor
+monEditor=StudyEditor()
# message utilisateur
msgWarning = "Attention"
+# couleur pour visualisation des geometries
-# couleur pour visualisation des geometrie CS_CBO
-COLORS = ( studyManager.RED,
- studyManager.GREEN,
- studyManager.BLUE,
- studyManager.SANDY,
- studyManager.ORANGE,
- studyManager.PURPLE,
- studyManager.DARK_RED,
- studyManager.DARK_GREEN,
- studyManager.DARK_BLUE,
- studyManager.YELLOW,
- studyManager.PINK,
- studyManager.CYAN )
+import colors
+COLORS = ( colors.RED,
+ colors.GREEN,
+ colors.BLUE,
+ colors.SANDY,
+ colors.ORANGE,
+ colors.PURPLE,
+ colors.DARK_RED,
+ colors.DARK_GREEN,
+ colors.DARK_BLUE,
+ colors.YELLOW,
+ colors.PINK,
+ colors.CYAN )
LEN_COLORS = len( COLORS )
-
-
-#class SelectMainShapeDiagImpl( SelectMainShapeDiag ):
-# def __init__( self, mainShapeEntries, parent = None,name = None,modal = 1,fl = 0 ):
-# SelectMainShapeDiag.__init__( self,parent,name,modal,fl )
-#
-# self.mainShapes = {} # ( entry, value )
-# for entry in mainShapeEntries:
-# name = studyManager.palStudy.getName( entry )
-# self.mainShapes[entry] = name
-#
-# self.lbMainShapes.clear()
-# for entry,name in self.mainShapes.items():
-# self.lbMainShapes.insertItem( name )
-# self.lbMainShapes.setCurrentItem( 0 )
-#
-#
-# def getUserSelection( self ):
-# mainShapeEntry = None
-#
-# item = self.lbMainShapes.selectedItem()
-# mainShapeName = str( item.text() )
-#
-# for entry, name in self.mainShapes.items():
-# if mainShapeName == name:
-# mainShapeEntry = entry
-# break
-#
-# return mainShapeEntry
-#
-#
-#class SelectMeshDiagImpl( SelectMeshDiag ):
-# def __init__( self, meshGroupEntries, parent = None,name = None,modal = 1,fl = 0 ):
-# SelectMeshDiag.__init__( self,parent,name,modal,fl )
-#
-# self.meshes = {} # ( entry, value )
-#
-# for meshGroupEntry in meshGroupEntries:
-# meshEntry = studyManager.palStudy.getMesh(meshGroupEntry)
-# meshName = studyManager.palStudy.getName(meshEntry)
-# self.meshes[meshEntry] = meshName
-#
-# self.lbMeshes.clear()
-# for entry,name in self.meshes .items():
-# self.lbMeshes.insertItem( name )
-# self.lbMeshes.setCurrentItem( 0 )
-#
-# def getUserSelection( self ):
-# selMeshEntry, keep = None, False
-#
-# item = self.lbMeshes.selectedItem()
-# meshName = str( item.text() )
-# for entry, name in self.meshes.items():
-# if meshName == name:
-# selMeshEntry = entry
-# break
-#
-# keep = self.cbAgain.isChecked()
-#
-# return selMeshEntry, keep
-#
-#
-#
class MyEficas( qtEficas.Appli ):
"""
Classe de lancement du logiciel EFICAS dans SALOME.
a)la creation de groupes de mailles dans le composant SMESH de SALOME
b)la visualisation d'elements geometrique dans le coposant GEOM de SALOME par selection dans EFICAS
"""
- def __init__( self, parent, code = "ASTER", fichier = None, module = studyManager.SEficas, version=None):
+ def __init__( self, parent, code = "ASTER", fichier = None, module = "Eficas", version=None):
"""
Constructeur.
@type parent:
if fichier:
eficasArg += [ fichier ]
if version:
- print version
eficasArg += [ "-c", version ]
else :
print "noversion"
appli = None
event.accept()
- def __studySync( self ):
- """
- IMPORTANT( a appeler prealablement a chaque appel du gestionnaire d'etude ) : specifique au lancement de Eficas dans Salome,
- permet au gestionnaire d'etude ( studyManager.palStudy ) de pointer sur la bonne etude.
-
- Un retour a False indique qu'il n'y a aucune etude active, dans ce cas ne faire aucune operation avec le gestionnaire d'etude(
- gros plantage sinon )
- """
- activeStudyId = salome.sg.getActiveStudyId()
-
- if activeStudyId == 0: # pas d'etude active
- return False
-
- if activeStudyId != salome.myStudyId:
- studyManager.palStudy.setCurrentStudyID( activeStudyId )
-
- return True
-
-
- def __createOCCView( self ):
- """
- Creation vue Occ
- """
- #salome.salome_init()
- import iparameters
-
- # On determine le nombre de GUI states deja presents dans l'arbre d'etude
- GUIStateID = 1
-
- ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID))
- properties = ipar.getProperties()
-
- while properties != []:
- GUIStateID += 1
- ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID))
- properties = ipar.getProperties()
-
- print "GUIStateID: ", GUIStateID
-
- #Set up visual properties:
- ipar.setProperty("AP_ACTIVE_VIEW", "OCCViewer_0_0")
- ipar.setProperty("AP_WORKSTACK_INFO", "(splitter orientation=0 sizes=1045 (views active='OCCViewer_0_0' 'OCCViewer_0_0'))")
- ipar.setProperty("AP_SAVEPOINT_NAME", "GUI state: %i"%(GUIStateID))
-
- #Set up lists:
- # fill list AP_VIEWERS_LIST
- ipar.append("AP_VIEWERS_LIST", "OCCViewer_1")
- # fill list OCCViewer_1
- ipar.append("OCCViewer_1", "OCC scene:1 - viewer:1")
- ipar.append("OCCViewer_1", "1.000000000000e+00*0.000000000000e+00*0.000000000000e+00*5.773502588272e-01*-5.773502588272e-01*5.773502588272e-01*0.000000000000e+00*0.000000000000e+00*0.000000000000e+00*0.000000000000e+00*2.886751294136e+02*-2.886751294136e+02*2.886751294136e+02")
-
- if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
- iparameters.getSession().restoreVisualState(GUIStateID)
def __selectWorkingMesh( self, meshGroupEntries ):
# liste des main shape possibles
for groups in ( groupeMaNamesIn, groupeNoNamesIn ):
for subShapeName in groups:
- entries = studyManager.palStudy.getEntriesFromName( studyManager.SGeom, subShapeName )
+ entries = getEntriesFromName(self, "GEOM", subShapeName )
+
for entry in entries:
- mainShapeEntry = studyManager.palStudy.getMainShapeEntry( entry )
+ mainShapeEntry = self.getMainShapeEntry( entry )
if mainShapeEntry != entry:
if mainShapes.has_key(subShapeName):
mainShapes[ subShapeName ].append( mainShapeEntry )
"""
name, msgError = '',''
- selectedMainShapeEntry = studyManager.palStudy.getMainShapeEntry( selectedEntry )
-
+ selectedMainShapeEntry = self.getMainShapeEntry( selectedEntry )
if selectedMainShapeEntry and selectedMainShapeEntry != selectedEntry: #ok test1)
- tGeo = studyManager.palStudy.getRealShapeType( selectedEntry )
- if kwType == "GROUP_NO" and tGeo != studyManager.VERTEX:
+ #PNPNPNPN a Revoir
+ tgeo=self.getShapeType( selectedEntry )
+ if kwType == "GROUP_NO" and tGeo != "VERTEX":
msgError = msgWarningGroupNoSelection
- elif kwType == "GROUP_MA" and tGeo == studyManager.VERTEX:
+ elif kwType == "GROUP_MA" and tGeo == "VERTEX":
name, msgError = '', msgErrorGroupMaSelection
return name, msgError
if not self.mainShapeEntries.has_key( editor ):
self.mainShapeEntries[ editor ] = selectedMainShapeEntry
- name = studyManager.palStudy.getName( selectedMainShapeEntry )
+ mySO=monEditor.study.FindObjectID(selectedMainShapeEntry )
+ if mySO:
+ name = mySO.GetName()
msgError = msgMainShapeSelection + name
if selectedMainShapeEntry == self.mainShapeEntries[ editor ]:
- name = studyManager.palStudy.getName( selectedEntry )
+ mySO=monEditor.study.FindObjectID(selectedMainShapeEntry )
+ if mySO:
+ name = mySO.GetName()
self.subShapes[ selectedEntry ] = name
else:
if not self.mainShapeNames.has_key( editor ):
- self.mainShapeNames[ editor ] = studyManager.palStudy.getName( self.mainShapeEntries[ editor ] )
+ mySO=monEditor.study.FindObjectID(self.mainShapeEntries[ editor ])
+ if mySO:
+ self.mainShapeNames[ editor ] = mySO.GetName()
msgError = msgSubShapeBadMainShape + self.mainShapeNames[ editor ]
else:
name, msgError = '', msgErrorNeedSubShape
"""
name, msgError = '',''
- selectedMeshEntry = studyManager.palStudy.getMesh( selectedEntry )
+ mySO=monEditor.study.FindObjectID(selectedEntry )
+ from pal.smeshstudytools import SMeshStudyTools
+ monSMeshStudyTools=SMeshStudyTools(monEditor)
+ selectedMeshEntry = monSMeshStudyTools.getMeshFromGroup(mySO)
+
if selectedMeshEntry: # ok test 1)
- tGroup = studyManager.palStudy.getGroupType( selectedEntry )
- if kwType == "GROUP_NO" and tGroup != studyManager.NodeGroups:
+ tGroup = ""
+ mySO = self._myStudy.FindObjectID(selectedEntry)
+ if mySO:
+ groupObject = mySO.GetObject()
+ if not groupObject:
+ mycomponent = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+ SCom = monEditor.study.FindComponent( "SMESH" )
+ monEditor.builder.LoadWith( SCom , myComponent )
+ groupObject = mySO.GetObject()
+ if not groupObject :
+ logger.debug("selectedMeshEntry: An error occurs")
+
+
+ import SMESH
+ aGroup = groupObject._narrow( SMESH.SMESH_GroupBase )
+ if aGroup: tGroup = aGroup.GetType()
+
+ #PNPNPNPN bizarre
+ if kwType == "GROUP_NO" and tGroup != SMESH.NODE:
msgError = msgWarningGroupNoSelection
- elif kwType == "GROUP_MA" and tGroup == studyManager.NodeGroups:
+ elif kwType == "GROUP_MA" and tGroup == SMESH.NODE:
name, msgError = '', msgErrorGroupMaSelection
return name, msgError
- selectedMainShapeEntry = studyManager.palStudy.getShapeFromMesh( selectedMeshEntry )
+ mySO = self._myStudy.FindObjectID(selectedMeshEntry)
+ if mySO:
+ object = mySO.GetObject()
+ if not object:
+ mycomponent = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
+ SCom = monEditor.study.FindComponent( "SMESH" )
+ monEditor.builder.LoadWith( SCom , myComponent )
+ object = mySO.GetObject()
+ if not object :
+ logger.debug("selectedMainShapeEntry: An error occurs")
+
+ mesh = object._narrow( SMESH.SMESH_Mesh )
+ if mesh: #Ok, c'est bien un objet maillage
+ shape = mesh.GetShapeToMesh()
+ if shape:
+ ior = salome.orb.object_to_string( shape )
+ if ior:
+ sObject = currentStudy.FindObjectIOR( ior )
+ selectedMainShapeEntry = sObject.GetID()
+ else:
+ selectedMainShapeEntry=0
+ logger.debug( 'SalomeStudy.getShapeFromMesh( meshEntry = %s ) ' %meshEntry )
+
if selectedMainShapeEntry: #test 2)
if not self.mainShapeEntries.has_key( editor ):
self.mainShapeEntries[ editor ] = selectedMainShapeEntry
- name = studyManager.palStudy.getName( selectedMainShapeEntry )
+ mySO=monEditor.study.FindObjectID(selectedMainShapeEntry )
+ if mySO:
+ name = mySO.GetName()
msgError = msgMainShapeSelection + name
if selectedMainShapeEntry == self.mainShapeEntries[ editor ]:
- name = studyManager.palStudy.getName( selectedEntry ) #ok test 2)
+ mySO=monEditor.study.FindObjectID(selectedEntry )
+ if mySO:
+ name = mySO.GetName()
else:
if not self.mainShapeNames.has_key( editor ):
- self.mainShapeNames[ editor ] = studyManager.palStudy.getName(
- self.mainShapeEntries[ editor ] )
+ mySO=monEditor.study.FindObjectID(self.mainShapeEntries[ editor ])
+ if mySO:
+ self.mainShapeNames[ editor ] = mySO.GetName()
msgError = msgMeshGroupBadMainShape + self.mainShapeNames[ editor ]
else:
# on authorise quand meme les groupes de maillage ne faisant
# pas reference a une geometrie principale (dixit CS_CBO )
- name = studyManager.palStudy.getName( selectedEntry )
+ mySO=monEditor.study.FindObjectID(selectedEntry )
+ if mySO:
+ name = mySO.GetName()
return name, msgError
-
- def __updateSubShapes( self, editor, groupeNames ):
- """
- mise a jours de la liste self.subShapes a partir de la liste des noms de groupe fourni en entre
- """
- for name in groupeNames:
- entries = studyManager.palStudy.getEntriesFromName( studyManager.SGeom, name )
- for entry in entries:
- if not self.subShapes.has_key( entry ):
- ok, msgError = self.__selectShape( editor, entry ) # filtre
- if ok:
- self.subShapes[ entry ] = name
-
def __getAllGroupeMa(self, item ):
"""
Recupere tous les GROUPE_MA dans le JDC courant
return groupNo
+ # ___________________________ Methodes de l ex Pal __________________________________
+ def getEntriesFromName(self, componentName, subShapeName ):
+ entries = []
+ try :
+ listSO = self._myStudy.FindObjectByName( objectName, componentName )
+ for SObjet in listSO :
+ entry = SObjet.GetID()
+ entries.append( entry )
+ except :
+ logger.debug("getEntriesFromName: An error occurs")
+ entries = None
+ return entries
+
+ def getMainShapeEntry(self,entry):
+ result=None
+ try:
+ mainShapeEntry = entry.split(':')[:4]
+
+ if len(mainShapeEntry) == 4:
+ strMainShapeEntry = '%s:%s:%s:%s'%tuple(mainShapeEntry)
+ if self.isMainShape(strMainShapeEntry):
+ result = strMainShapeEntry
+ except:
+ logger.debug( 'Erreur pour SalomeStudy.getMainShapeEntry( entry = %s ) ' %entry )
+ result = None
+ return result
+
+ def isMainShape(self,entry):
+ result = False
+ try:
+ anObject=None
+ mySO=monEditor.study.FindObjectID(entry )
+ if mySO:
+ anObject = mySO.GetObject()
+ if not anObject :
+ strContainer, strComponentName = "FactoryServer", "GEOM"
+ myComponent = salome.lcc.FindOrLoadComponent( strContainer, strComponentName )
+ SCom = monEditor.study.FindComponent( strComponentName )
+ monEditor.builder.LoadWith( SCom , myComponent )
+ anObject = mySO.GetObject()
+
+ shape = anObject._narrow( GEOM.GEOM_Object )
+ if shape.IsMainShape():
+ result = True
+ except:
+ logger.debug( 'Errreur pour SalomeStudy.isMainShape( entry = %s ) ' %entry )
+ result = False
+ return result
+
+
#----------------------- LISTE DES NOUVEAUX CAS D'UTILISATIONS -----------
def selectGroupFromSalome( self, kwType = None, editor=None):
"""
names, msg = [], ''
try:
self.editor=editor
- atLeastOneStudy = self.__studySync()
+ atLeastOneStudy = monEditor.study
if not atLeastOneStudy:
return names, msg
# recupere toutes les selections de l'utilsateur dans l'arbre Salome
entries = salome.sg.getAllSelected()
nbEntries = len( entries )
- if nbEntries >= 1:
- for entry in entries:
- if studyManager.palStudy.isMeshGroup( entry ): #selection d'un groupe de maille
- name, msg = self.__selectMeshGroup( editor, entry, kwType )
- elif studyManager.palStudy.isShape( entry ): #selection d'une sous-geometrie
- name, msg = self.__selectShape( editor, entry, kwType )
- else:
- name, msg = '', msgUnAuthorizedSelecion
- if name:
- names.append( name )
+ #if nbEntries >= 1:
+ # for entry in entries:
+ # if studyManager.palStudy.isMeshGroup( entry ): #selection d'un groupe de maille
+ # name, msg = self.__selectMeshGroup( editor, entry, kwType )
+ # elif studyManager.palStudy.isShape( entry ): #selection d'une sous-geometrie
+ # name, msg = self.__selectShape( editor, entry, kwType )
+ # else:
+ # name, msg = '', msgUnAuthorizedSelecion
+ # if name:
+ # names.append( name )
if names and len( names ) < nbEntries:
msg = msgIncompleteSelection
ok, msgError = False, msgErrorAddJdcInSalome
#try:
if 1:
- atLeastOneStudy = self.__studySync()
+ atLeastOneStudy = monEditor.study
if not atLeastOneStudy:
return ok, msgError
- fileType = { 'ASTER' : studyManager.FICHIER_EFICAS_ASTER,
- 'SEP' : studyManager.FICHIER_EFICAS_OM ,
- 'OPENTURNS': studyManager.FICHIER_EFICAS_OPENTURNS,
- 'OPENTURNS_STUDY': studyManager.FICHIER_EFICAS_OPENTURNS,
- 'OPENTURNS_WRAPPER': studyManager.FICHIER_EFICAS_OPENTURNS}
+ fileType = { 'ASTER' : "FICHIER_EFICAS_ASTER",
+ 'SEP' : "FICHIER_EFICAS_SEP",
+ 'OPENTURNS': "FICHIER_EFICAS_OPENTURNS",
+ 'OPENTURNS_STUDY': "FICHIER_EFICAS_OPENTURNS",
+ 'OPENTURNS_WRAPPER': "FICHIER_EFICAS_OPENTURNS",
+ }
folderName = { 'ASTER' : 'AsterFiles',
'SEP' : 'OMFiles' ,
'OPENTURNS_STUDY': 'OpenturnsFiles',
'OPENTURNS_WRAPPER': 'OpenturnsFiles'}
- folderType = { 'ASTER': studyManager.ASTER_FILE_FOLDER,
- 'SEP': studyManager.OM_FILE_FOLDER,
- 'OPENTURNS_STUDY': studyManager.OPENTURNS_FILE_FOLDER,
- 'OPENTURNS_WRAPPER': studyManager.OPENTURNS_FILE_FOLDER }
+ folderType = { 'ASTER': "ASTER_FILE_FOLDER",
+ 'SEP': "SEP_FILE_FOLDER",
+ 'OPENTURNS_STUDY':"OPENTURNS_FILE_FOLDER",
+ 'OPENTURNS_WRAPPER': "OPENTURNS_FILE_FOLDER"}
- moduleEntry = studyManager.palStudy.addComponent(self.module)
+ moduleEntry = monEditor.findOrCreateComponent(self.module)
itemName = re.split("/",jdcPath)[-1]
- fatherEntry = studyManager.palStudy.addItem(
+ fatherEntry = monEditor.findOrCreateItem(
moduleEntry,
- itemName = folderName[self.code],
- itemIcon = "ICON_COMM_FOLDER",
- itemType = folderType[self.code],
- bDoublonCheck = True )
+ name = folderName[self.code],
+ #icon = "ICON_COMM_FOLDER",
+ fileType = folderType[self.code])
- commEntry = studyManager.palStudy.addItem( fatherEntry ,
- itemName = itemName,
- itemType = fileType[ self.code ],
- itemValue = jdcPath,
- itemComment = str( jdcPath ),
- itemIcon = "ICON_COMM_FILE",
- bDoublonCheck = True )
- studyManager.palStudy.refresh()
+ commEntry = monEditor.findOrCreateItem( fatherEntry ,
+ name = itemName,
+ fileType = fileType[ self.code ],
+ fileName = jdcPath,
+ #icon = "ICON_COMM_FILE",
+ comment = str( jdcPath ))
+
+ salome.sg.updateObjBrowser()
+
print 'addJdcInSalome commEntry->', commEntry
if commEntry:
ok, msgError = True, ''
#except:
- logger.debug(50*'=')
+ # logger.debug(50*'=' Erreur au AddJDC)
return ok, msgError
- def createOrUpdateMesh( self, editor ):
- """
- Ouverture d'une boite de dialogue : Creation de groupes de mailles dans un maillage existant ou un nouveau maillage.
- Note: Appele par EFICAS à la sauvegarde du JDC.
- """
- try:
- atLeastOneStudy = self.__studySync()
- if not atLeastOneStudy:
- return
-
- groupeMaNames = self.__getAllGroupeMa( editor.tree.item )
- groupeNoNames = self.__getAllGroupeNo( editor.tree.item )
-
- # on elimine les doublons de la liste
- groupeMaNames = dict.fromkeys(groupeMaNames).keys()
- groupeNoNames = dict.fromkeys(groupeNoNames).keys()
-
- #print 'CS_pbruno createOrUpdateMesh groupeNoNames', groupeNoNames
-
- # mise à jours de la liste des sous-geometrie ( self.subShapes )
- if not self.mainShapeEntries.has_key( editor ):
- # l'utilisateur n'a selectionne aucune sous-geometrie et donc pas de geometrie principale
- groupeMaNames, groupeNoNames = self.__selectMainShape( groupeMaNames, groupeNoNames, editor )
-
- if groupeMaNames or groupeNoNames:
- print 'CS_pbruno createOrUpdateMesh groupeMaNames', groupeMaNames
- print 'CS_pbruno createOrUpdateMesh groupeNoNames', groupeNoNames
- self.__updateSubShapes( editor, groupeMaNames + groupeNoNames )
-
- # recuperation des identifiants( entries ) associes aux noms des groupes
- groupeMaEntries = []
- groupeNoEntries = []
-
- for entry, name in self.subShapes.items():
- if name in groupeMaNames:
- groupeMaEntries.append( entry )
- if name in groupeNoNames:
- groupeNoEntries.append( entry )
-
- if groupeMaEntries or groupeNoEntries:
- diag = meshGui.MeshUpdateDialogImpl(
- self.mainShapeEntries[editor],
- groupeMaEntries,
- groupeNoEntries,
- studyManager.palStudy,
- self.parent )
- diag.show()
-
- self.subShapes.clear()
- self.mainShapeNames.clear()
- self.mainShapeEntries.clear()
- except:
- logger.debug(50*'=')
-
def displayMeshGroups(self, meshGroupName):
"""
selMeshGroupEntry = None
# liste des groupes de maille de nom meshGroupName
- listSO = studyManager.palStudy._myStudy.FindObjectByName(meshGroupName, "SMESH")
+ listSO = monEditor.study.FindObjectByName(meshGroupName, "SMESH")
print "liste des groupes de maille de nom %s: "%(meshGroupName), listSO
if len(listSO)>0:
if selMeshGroupEntry:
#CS_pbruno: marche QUE si le module SMESH est active
myComponent = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
- SCom = studyManager.palStudy._myStudy.FindComponent("SMESH")
- studyManager.palStudy._myBuilder.LoadWith( SCom , myComponent )
+ SCom = monEditor.study.FindComponent("SMESH")
+ monEditor.builder.LoadWith( SCom , myComponent )
sg.CreateAndDisplayActor(selMeshGroupEntry)
salome.sg.Display(selMeshGroupEntry)
salome.sg.FitAll()
if v:
currentViewType = v.GetType()
- atLeastOneStudy = self.__studySync()
+ atLeastOneStudy = monEditor.study
if not atLeastOneStudy:
return ok, msgError
- #salome.sg.EraseAll()
print 'displayShapestrGeomShape shapeName -> ', shapeName
if currentViewType == VISU.TVIEW3D: # maillage
ok, msgError = self.displayMeshGroups(shapeName)
else: #geometrie
print 'Vue courante = OCC : affichage element geometrique'
- #self.__createOCCView()
current_color = COLORS[ self.icolor % LEN_COLORS ]
- ok = studyManager.palStudy.displayShapeByName( shapeName, current_color )
+ ##### PNPNPNPN dans visuPal
+ #ok = studyManager.palStudy.displayShapeByName( shapeName, current_color )
salome.sg.FitAll()
self.icolor = self.icolor + 1
if not ok:
def envoievisu(self,liste_commandes):
import traceback
try:
- atLeastOneStudy = self.__studySync()
+ atLeastOneStudy = monEditor.study
if not atLeastOneStudy:
return
logger.debug(10*'#'+":envoievisu: creating a visuDriver instance")
#-------------------------------------------------------------------------------------------------------
# Point d'entree lancement EFICAS
#
-def runEficas( code="ASTER", fichier=None, module = studyManager.SEficas, version=None ):
+def runEficas( code="ASTER", fichier=None, module = "Eficas", version=None ):
logger.debug(10*'#'+":runEficas: START")
global appli
logger.debug(10*'#'+":runEficas: code="+str(code))
"""
-def runAster(parent = SalomePyQt.SalomePyQt().getDesktop(), palStudyManager = studyManager.palStudy, code="ASTER", fichier=None ) :
+def runAster(parent = SalomePyQt.SalomePyQt().getDesktop(), code="ASTER", fichier=None ) :
global appli
if not appli: #une seul instance possible!
- appli = MyEficas( parent, palStudyManager, code = code, fichier = fichier )
+ appli = MyEficas( parent, code = code, fichier = fichier )
"""
appli = None