]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
Ajout de la prise en compte des conditions aux limites sur des Edges pour les études 2D
authorsalome <>
Thu, 14 Apr 2005 10:45:02 +0000 (10:45 +0000)
committersalome <>
Thu, 14 Apr 2005 10:45:02 +0000 (10:45 +0000)
src/EFICASGUI/eficasCL.py

index 8442bd901d7d7cf35c519c49c0c00c57d6c635cf..7f874875e6d42d1718d1c551c7a6f6b37ec02fd2 100644 (file)
@@ -44,7 +44,16 @@ class CLinit:
            attrName  = aShapeSO.FindAttribute("AttributeName")[1]
                   anAttr = attrName._narrow(SALOMEDS.AttributeName)
            Name = anAttr.Value()
-           Mesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
+          #_CS_cbo: ajout de la determination de la dimension de la geometrie
+           #Mesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
+          ShapeType = GEOMShape.GetShapeType()
+          print ShapeType
+          if str(ShapeType) is "EDGE":
+              print "--------------- EDGE existing Mesh"
+               Mesh.CreateGroupFromGEOM(SMESH.EDGE,Name,GEOMShape)
+          else:
+              print "--------------- FACE existing Mesh"
+              Mesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
        del dict_CL[GEOMIor]
            
 
@@ -70,7 +79,16 @@ class CLinit:
            attrName  = aShapeSO.FindAttribute("AttributeName")[1]
                   anAttr = attrName._narrow(SALOMEDS.AttributeName)
            Name = anAttr.Value()
-           newMesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
+           #_CS_cbo: ajout de la determination de la dimension de la geometrie
+           #newMesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
+           ShapeType = GEOMShape.GetShapeType()
+           print ShapeType
+           if str(ShapeType) is "EDGE":
+               print "--------------- EDGE newMesh"
+               newMesh.CreateGroupFromGEOM(SMESH.EDGE,Name,GEOMShape)
+           else:
+               print "--------------- FACE newMesh"
+               newMesh.CreateGroupFromGEOM(SMESH.FACE,Name,GEOMShape)
        del dict_CL[GEOMIor]
 
     def NomShape(self,numero):