mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
PAL12037. Add protection against None shapes and empty geom groups
This commit is contained in:
parent
9890a58bd3
commit
d85d44875c
@ -89,6 +89,8 @@ class Mesh_Algorithm:
|
|||||||
"""
|
"""
|
||||||
Private method
|
Private method
|
||||||
"""
|
"""
|
||||||
|
if geom is None:
|
||||||
|
raise RuntimeError, "Attemp to create " + hypo + " algoritm on None shape"
|
||||||
self.mesh = mesh
|
self.mesh = mesh
|
||||||
piece = mesh.geom
|
piece = mesh.geom
|
||||||
if geom==0:
|
if geom==0:
|
||||||
@ -437,6 +439,9 @@ class Mesh:
|
|||||||
elif tgeo == "SHELL":
|
elif tgeo == "SHELL":
|
||||||
type = SMESH.VOLUME
|
type = SMESH.VOLUME
|
||||||
elif tgeo == "COMPOUND":
|
elif tgeo == "COMPOUND":
|
||||||
|
if len( geompy.GetObjectIDs( grp )) == 0:
|
||||||
|
print "Mesh.Group: empty geometric group", GetName( grp )
|
||||||
|
return 0
|
||||||
tgeo = geompy.GetType(grp)
|
tgeo = geompy.GetType(grp)
|
||||||
if tgeo == geompy.ShapeType["VERTEX"]:
|
if tgeo == geompy.ShapeType["VERTEX"]:
|
||||||
type = SMESH.NODE
|
type = SMESH.NODE
|
||||||
|
Loading…
Reference in New Issue
Block a user