21680: EDF 2288 SMESH: creation of 0D elements from other elements

+    def Add0DElementsToAllNodes(self, theObject, theGroupName=""):
This commit is contained in:
eap 2012-10-23 07:52:48 +00:00
parent 957276d339
commit 08c538cf8f

View File

@ -2334,6 +2334,24 @@ class Mesh:
def Add0DElement(self, IDOfNode):
return self.editor.Add0DElement(IDOfNode)
## Create 0D elements on all nodes of the given elements except those
# nodes on which a 0D element already exists.
# @param theObject an object on whose nodes 0D elements will be created.
# It can be mesh, sub-mesh, group, list of element IDs or a holder
# of nodes IDs created by calling mesh.GetIDSource( nodes, SMESH.NODE )
# @param theGroupName optional name of a group to add 0D elements created
# and/or found on nodes of \a theObject.
# @return an object (a new group or a temporary SMESH_IDSource) holding
# IDs of new and/or found 0D elements. IDs of 0D elements
# can be retrieved from the returned object by calling GetIDs()
# @ingroup l2_modif_add
def Add0DElementsToAllNodes(self, theObject, theGroupName=""):
if isinstance( theObject, Mesh ):
theObject = theObject.GetMesh()
if isinstance( theObject, list ):
theObject = self.GetIDSource( theObject, SMESH.ALL )
return self.editor.Create0DElementsOnAllNodes( theObject, theGroupName )
## Creates a ball element on a node with given ID.
# @param IDOfNode the ID of node for creation of the element.
# @param diameter the bal diameter.