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:
b9ebe1d
)
Fix for the issue #19226 : ViscousLayers2D can't be created on a group from SHAPERST...
author
mpv
<mikhail.ponikarov@opencascade.com>
Fri, 5 Jun 2020 08:59:23 +0000
(11:59 +0300)
committer
mpv
<mikhail.ponikarov@opencascade.com>
Fri, 5 Jun 2020 08:59:23 +0000
(11:59 +0300)
src/SMESH_SWIG/smesh_algorithm.py
patch
|
blob
|
history
diff --git
a/src/SMESH_SWIG/smesh_algorithm.py
b/src/SMESH_SWIG/smesh_algorithm.py
index e7003b5094193a6954ba0695effc13d54679f6f6..768900eb095d40505b18f372283278b85b1a6556 100644
(file)
--- a/
src/SMESH_SWIG/smesh_algorithm.py
+++ b/
src/SMESH_SWIG/smesh_algorithm.py
@@
-340,9
+340,17
@@
class Mesh_Algorithm:
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
faceIDs = []
for shape in faces:
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
faceIDs = []
for shape in faces:
- ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] )
- for f in ff:
+ try:
+ ff = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["FACE"] )
+ for f in ff:
faceIDs.append( self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f))
faceIDs.append( self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f))
+ 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:
+ faceIDs = gen.GetIShapesOperations().GetAllSubShapesIDs(shape, self.mesh.geompyD.ShapeType["FACE"], False)
faces = faceIDs
hyp = self.Hypothesis("ViscousLayers",
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
faces = faceIDs
hyp = self.Hypothesis("ViscousLayers",
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
@@
-392,9
+400,17
@@
class Mesh_Algorithm:
if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ):
edgeIDs = []
for shape in edges:
if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ):
edgeIDs = []
for shape in edges:
+ try:
ee = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["EDGE"])
for e in ee:
ee = self.mesh.geompyD.SubShapeAll( shape, self.mesh.geompyD.ShapeType["EDGE"])
for e in ee:
- edgeIDs.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, e ))
+ edgeIDs.append( self.mesh.geompyD.GetSubShapeID( self.mesh.geom, e ))
+ 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:
+ edgeIDs = gen.GetIShapesOperations().GetAllSubShapesIDs(shape, self.mesh.geompyD.ShapeType["EDGE"], False)
edges = edgeIDs
hyp = self.Hypothesis("ViscousLayers2D",
[thickness, numberOfLayers, stretchFactor, edges, isEdgesToIgnore],
edges = edgeIDs
hyp = self.Hypothesis("ViscousLayers2D",
[thickness, numberOfLayers, stretchFactor, edges, isEdgesToIgnore],