X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_SWIG%2FStdMeshersBuilder.py;h=35e43e551ba6d5b8ce79acfb63de41e21cfb4fec;hb=7646a7f54e99134575c14521e60b6fa8c2418201;hp=98acce5f6d38b3d3943984d5619d1d0ecf475b8b;hpb=512d3547bc726e9bb5732b1d0692e1141ca258e1;p=modules%2Fsmesh.git diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 98acce5f6..35e43e551 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -1100,7 +1100,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): pass # end of StdMeshersBuilder_Prism3D class -## Defines a Prism 3D algorithm +## Defines Radial Prism 3D algorithm # # It is created by calling smeshBuilder.Mesh.Prism(geom=0) # @@ -1417,10 +1417,13 @@ class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): # @param UseExisting if ==true - searches for the existing hypothesis created with # the same parameters, else (default) - creates a new one def SourceFaces(self, groups, toCopyMesh=False, toCopyGroups=False, UseExisting=False): + import SMESH compFun = lambda hyp, args: ( hyp.GetSourceFaces() == args[0] and \ hyp.GetCopySourceMesh() == args[1], args[2] ) hyp = self.Hypothesis("ImportSource2D", [groups, toCopyMesh, toCopyGroups], UseExisting=UseExisting, CompareMethod=compFun, toAdd=False) + if groups and isinstance( groups, SMESH._objref_SMESH_GroupBase ): + groups = [groups] hyp.SetSourceFaces(groups) hyp.SetCopySourceMesh(toCopyMesh, toCopyGroups) self.mesh.AddHypothesis(hyp, self.geom)