Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
22806: EDF SMESH: Regression: Prism_3D error
[modules/smesh.git]
/
src
/
SMESH_SWIG
/
smesh_algorithm.py
diff --git
a/src/SMESH_SWIG/smesh_algorithm.py
b/src/SMESH_SWIG/smesh_algorithm.py
index 3623b51764acc807ff104349556ca42f6a423920..8ce382e179b8b5c93545682b58c1274fc6678b75 100644
(file)
--- a/
src/SMESH_SWIG/smesh_algorithm.py
+++ b/
src/SMESH_SWIG/smesh_algorithm.py
@@
-40,7
+40,7
@@
import SMESH
# @code
# meshMethod = "MyAlgorithm"
# @endcode
# @code
# meshMethod = "MyAlgorithm"
# @endcode
-# then an instance of @c MyPlugin_Algorithm can be created by the direct invo
k
ation of the function
+# then an instance of @c MyPlugin_Algorithm can be created by the direct invo
c
ation of the function
# of smesh.Mesh class:
# @code
# my_algo = mesh.MyAlgorithm()
# of smesh.Mesh class:
# @code
# my_algo = mesh.MyAlgorithm()
@@
-257,7
+257,7
@@
class Mesh_Algorithm:
## Defines "ViscousLayers" hypothesis to give parameters of layers of prisms to build
# near mesh boundary. This hypothesis can be used by several 3D algorithms:
## Defines "ViscousLayers" hypothesis to give parameters of layers of prisms to build
# near mesh boundary. This hypothesis can be used by several 3D algorithms:
- # NETGEN 3D,
GHS3D
, Hexahedron(i,j,k)
+ # NETGEN 3D,
MG-Tetra
, Hexahedron(i,j,k)
# @param thickness total thickness of layers of prisms
# @param numberOfLayers number of layers of prisms
# @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
# @param thickness total thickness of layers of prisms
# @param numberOfLayers number of layers of prisms
# @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
@@
-274,7
+274,14
@@
class Mesh_Algorithm:
if not "ViscousLayers" in self.GetCompatibleHypothesis():
raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
if not "ViscousLayers" in self.GetCompatibleHypothesis():
raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName()
if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ):
- faces = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f) for f in faces ]
+ import GEOM
+ faceIDs = []
+ for f in faces:
+ if self.mesh.geompyD.ShapeIdToType( f.GetType() ) == "GROUP":
+ faceIDs += f.GetSubShapeIndices()
+ else:
+ faceIDs += [self.mesh.geompyD.GetSubShapeID(self.mesh.geom, f)]
+ faces = faceIDs
hyp = self.Hypothesis("ViscousLayers",
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
toAdd=False)
hyp = self.Hypothesis("ViscousLayers",
[thickness, numberOfLayers, stretchFactor, faces, isFacesToIgnore],
toAdd=False)
@@
-287,7
+294,7
@@
class Mesh_Algorithm:
## Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral
# elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms:
## Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral
# elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms:
- # NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO,
BLSURF
+ # NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO,
MG-CADSurf
# @param thickness total thickness of layers of quadrilaterals
# @param numberOfLayers number of layers
# @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh
# @param thickness total thickness of layers of quadrilaterals
# @param numberOfLayers number of layers
# @param stretchFactor factor (>1.0) of growth of layer thickness towards inside of mesh