mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-29 19:10:51 +05:00
0020594: EDF 1166 SMESH: Creation of a group of elements from a compound in TUI
fix GroupOnGeom() for the case of a compound which is not a GEOM group.
This commit is contained in:
parent
f46a7af424
commit
235f0b122d
@ -1393,9 +1393,15 @@ class Mesh:
|
|||||||
elif tgeo == "SHELL":
|
elif tgeo == "SHELL":
|
||||||
typ = VOLUME
|
typ = VOLUME
|
||||||
elif tgeo == "COMPOUND":
|
elif tgeo == "COMPOUND":
|
||||||
|
try: # it raises on a compound of compounds
|
||||||
if len( self.geompyD.GetObjectIDs( grp )) == 0:
|
if len( self.geompyD.GetObjectIDs( grp )) == 0:
|
||||||
print "Mesh.Group: empty geometric group", GetName( grp )
|
print "Mesh.Group: empty geometric group", GetName( grp )
|
||||||
return 0
|
return 0
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
if grp.GetType() == 37: # GEOMImpl_Types.hxx: #define GEOM_GROUP 37
|
||||||
|
# group
|
||||||
tgeo = self.geompyD.GetType(grp)
|
tgeo = self.geompyD.GetType(grp)
|
||||||
if tgeo == geompyDC.ShapeType["VERTEX"]:
|
if tgeo == geompyDC.ShapeType["VERTEX"]:
|
||||||
typ = NODE
|
typ = NODE
|
||||||
@ -1405,7 +1411,19 @@ class Mesh:
|
|||||||
typ = FACE
|
typ = FACE
|
||||||
elif tgeo == geompyDC.ShapeType["SOLID"]:
|
elif tgeo == geompyDC.ShapeType["SOLID"]:
|
||||||
typ = VOLUME
|
typ = VOLUME
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
# just a compound
|
||||||
|
for elemType, shapeType in [[VOLUME,"SOLID"],[FACE,"FACE"],
|
||||||
|
[EDGE,"EDGE"],[NODE,"VERTEX"]]:
|
||||||
|
if self.geompyD.SubShapeAll(grp,geompyDC.ShapeType[shapeType]):
|
||||||
|
typ = elemType
|
||||||
|
break
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
pass
|
||||||
if typ == None:
|
if typ == None:
|
||||||
print "Mesh.Group: bad first argument: expected a group, a vertex, an edge, a face or a solid"
|
print "Mesh.Group: bad first argument: expected a group, a vertex, an edge, a face or a solid"
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user