0020746: EDF 1274 SMESH : MergeAllNodesButNodesFromGroup feature

fix FindCoincidentNodesOnPart()
This commit is contained in:
eap 2010-10-13 12:03:56 +00:00
parent afac1ba0e1
commit 5c7ff1a389

View File

@ -2815,9 +2815,13 @@ class Mesh:
if isinstance( elements, Mesh ): if isinstance( elements, Mesh ):
elements = elements.GetMesh() elements = elements.GetMesh()
if ( isinstance( elements, list )): if ( isinstance( elements, list )):
elements = self.editor.MakeIDSource(elements, SMESH.ALL) elemType = SMESH.ALL
return self.editor.MakeBoundaryMesh(elements,dimension,groupName,meshName, if elements: elemType = self.GetElementType( elements[0], iselem=True)
elements = self.editor.MakeIDSource(elements, elemType)
mesh, group = self.editor.MakeBoundaryMesh(elements,dimension,groupName,meshName,
toCopyElements,toCopyExistingBondary) toCopyElements,toCopyExistingBondary)
if mesh: mesh = self.smeshpyD.Mesh(mesh)
return mesh, group
## Renumber mesh nodes ## Renumber mesh nodes
# @ingroup l2_modif_renumber # @ingroup l2_modif_renumber
@ -3610,11 +3614,11 @@ class Mesh:
def FindCoincidentNodesOnPart (self, SubMeshOrGroup, Tolerance, exceptNodes=[]): def FindCoincidentNodesOnPart (self, SubMeshOrGroup, Tolerance, exceptNodes=[]):
if (isinstance( SubMeshOrGroup, Mesh )): if (isinstance( SubMeshOrGroup, Mesh )):
SubMeshOrGroup = SubMeshOrGroup.GetMesh() SubMeshOrGroup = SubMeshOrGroup.GetMesh()
if not isinstance( ExceptSubMeshOrGroups, list): if not isinstance( exceptNodes, list):
ExceptSubMeshOrGroups = [ ExceptSubMeshOrGroups ] exceptNodes = [ exceptNodes ]
if ExceptSubMeshOrGroups and isinstance( ExceptSubMeshOrGroups[0], int): if exceptNodes and isinstance( exceptNodes[0], int):
ExceptSubMeshOrGroups = [ self.editor.MakeIDSource( ExceptSubMeshOrGroups, SMESH.NODE)] exceptNodes = [ self.editor.MakeIDSource( exceptNodes, SMESH.NODE)]
return self.editor.FindCoincidentNodesOnPartBut(SubMeshOrGroup, Tolerance,ExceptSubMeshOrGroups) return self.editor.FindCoincidentNodesOnPartBut(SubMeshOrGroup, Tolerance,exceptNodes)
## Merges nodes ## Merges nodes
# @param GroupsOfNodes the list of groups of nodes # @param GroupsOfNodes the list of groups of nodes