Regression of imps/A3

fix setting the mesh to the filter
This commit is contained in:
eap 2010-10-26 08:36:34 +00:00
parent b168bef52e
commit d044393536

View File

@ -1635,7 +1635,6 @@ class Mesh:
def MakeGroupByCriterion(self, groupName, Criterion): def MakeGroupByCriterion(self, groupName, Criterion):
aFilterMgr = self.smeshpyD.CreateFilterManager() aFilterMgr = self.smeshpyD.CreateFilterManager()
aFilter = aFilterMgr.CreateFilter() aFilter = aFilterMgr.CreateFilter()
aFilter.SetMesh( self.mesh )
aCriteria = [] aCriteria = []
aCriteria.append(Criterion) aCriteria.append(Criterion)
aFilter.SetCriteria(aCriteria) aFilter.SetCriteria(aCriteria)
@ -1650,7 +1649,6 @@ class Mesh:
def MakeGroupByCriteria(self, groupName, theCriteria): def MakeGroupByCriteria(self, groupName, theCriteria):
aFilterMgr = self.smeshpyD.CreateFilterManager() aFilterMgr = self.smeshpyD.CreateFilterManager()
aFilter = aFilterMgr.CreateFilter() aFilter = aFilterMgr.CreateFilter()
aFilter.SetMesh( self.mesh )
aFilter.SetCriteria(theCriteria) aFilter.SetCriteria(theCriteria)
group = self.MakeGroupByFilter(groupName, aFilter) group = self.MakeGroupByFilter(groupName, aFilter)
return group return group
@ -1662,6 +1660,7 @@ class Mesh:
# @ingroup l2_grps_create # @ingroup l2_grps_create
def MakeGroupByFilter(self, groupName, theFilter): def MakeGroupByFilter(self, groupName, theFilter):
group = self.CreateEmptyGroup(theFilter.GetElementType(), groupName) group = self.CreateEmptyGroup(theFilter.GetElementType(), groupName)
theFilter.SetMesh( self.mesh )
group.AddFrom( theFilter ) group.AddFrom( theFilter )
return group return group
@ -1670,6 +1669,7 @@ class Mesh:
# @return a list of ids # @return a list of ids
# @ingroup l1_controls # @ingroup l1_controls
def GetIdsFromFilter(self, theFilter): def GetIdsFromFilter(self, theFilter):
theFilter.SetMesh( self.mesh )
return theFilter.GetIDs() return theFilter.GetIDs()
## Verifies whether a 2D mesh element has free edges (edges connected to one face only)\n ## Verifies whether a 2D mesh element has free edges (edges connected to one face only)\n
@ -3990,7 +3990,8 @@ class Mesh_Algorithm:
pass pass
except: except:
name = mesh.geompyD.SubShapeName(geom, piece) name = mesh.geompyD.SubShapeName(geom, piece)
mesh.geompyD.addToStudyInFather(piece, geom, name) if not name:
name = "%s_%s"%(geom.GetShapeType(), id(geom%1000))
pass pass
self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName()) self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())