Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e2a6b8c
)
PAL12037. Add protection against None shapes and empty geom groups
author
eap
<eap@opencascade.com>
Wed, 29 Mar 2006 11:28:20 +0000
(11:28 +0000)
committer
eap
<eap@opencascade.com>
Wed, 29 Mar 2006 11:28:20 +0000
(11:28 +0000)
src/SMESH_SWIG/smesh.py
patch
|
blob
|
history
diff --git
a/src/SMESH_SWIG/smesh.py
b/src/SMESH_SWIG/smesh.py
index ec24cadfa1999533434d241ea8538fa1c6ee47bc..5e37242dca44710a12be8e68e0fecd9c0d86a09c 100644
(file)
--- a/
src/SMESH_SWIG/smesh.py
+++ b/
src/SMESH_SWIG/smesh.py
@@
-128,6
+128,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
piece = mesh.geom
if geom==0:
self.mesh = mesh
piece = mesh.geom
if geom==0:
@@
-606,6
+608,9
@@
class Mesh:
elif tgeo == "SHELL":
type = SMESH.VOLUME
elif tgeo == "COMPOUND":
elif tgeo == "SHELL":
type = SMESH.VOLUME
elif tgeo == "COMPOUND":
+ if len( geompy.GetObjectIDs( grp )) == 0:
+ print "Mesh.Group: empty geometric group", GetName( grp )
+ return 0
tgeo = geompy.GetType(grp)
if tgeo == geompy.ShapeType["VERTEX"]:
type = SMESH.NODE
tgeo = geompy.GetType(grp)
if tgeo == geompy.ShapeType["VERTEX"]:
type = SMESH.NODE