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:
593c663
)
A quick-fix for the #19221 smeshBuilder Mesh.Group(group) does not work on SHAPERSTUD...
author
mpv
<mikhail.ponikarov@opencascade.com>
Wed, 3 Jun 2020 14:10:45 +0000
(17:10 +0300)
committer
mpv
<mikhail.ponikarov@opencascade.com>
Wed, 3 Jun 2020 14:10:45 +0000
(17:10 +0300)
src/SMESH_SWIG/smeshBuilder.py
patch
|
blob
|
history
diff --git
a/src/SMESH_SWIG/smeshBuilder.py
b/src/SMESH_SWIG/smeshBuilder.py
index cb0191fccf112ce1f2e4ff25dfaa441cf5f5c581..3cb09bd0e35067f639becf200640454f8271589b 100644
(file)
--- a/
src/SMESH_SWIG/smeshBuilder.py
+++ b/
src/SMESH_SWIG/smeshBuilder.py
@@
-2636,7
+2636,15
@@
class Mesh(metaclass = MeshMeta):
elif tgeo == "SOLID" or tgeo == "COMPSOLID":
typ = VOLUME
elif tgeo == "COMPOUND":
elif tgeo == "SOLID" or tgeo == "COMPSOLID":
typ = VOLUME
elif tgeo == "COMPOUND":
- sub = self.geompyD.SubShapeAll( shape, self.geompyD.ShapeType["SHAPE"])
+ try:
+ sub = self.geompyD.SubShapeAll( shape, self.geompyD.ShapeType["SHAPE"])
+ except:
+ # try to get the SHAPERSTUDY engine directly, because GetGen does not work because of
+ # simplification of access in geomBuilder: omniORB.registerObjref
+ from SHAPERSTUDY_utils import getEngine
+ gen = getEngine()
+ if gen:
+ sub = gen.GetIShapesOperations().ExtractSubShapes(shape, self.geompyD.ShapeType["SHAPE"], False)
if not sub:
raise ValueError("_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape))
return self._groupTypeFromShape( sub[0] )
if not sub:
raise ValueError("_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape))
return self._groupTypeFromShape( sub[0] )