functor = aFilterMgr.CreateLength()
elif theCriterion == FT_Length2D:
functor = aFilterMgr.CreateLength2D()
functor = aFilterMgr.CreateLength()
elif theCriterion == FT_Length2D:
functor = aFilterMgr.CreateLength2D()
## Creates a 0D element on a node with given number.
# @param IDOfNode the ID of node for creation of the element.
## Creates a 0D element on a node with given number.
# @param IDOfNode the ID of node for creation of the element.
- def Add0DElement(self, IDOfNode):
- return self.editor.Add0DElement(IDOfNode)
+ def Add0DElement( self, IDOfNode, DuplicateElements=True ):
+ return self.editor.Add0DElement( IDOfNode, DuplicateElements )
## Create 0D elements on all nodes of the given elements except those
# nodes on which a 0D element already exists.
## Create 0D elements on all nodes of the given elements except those
# nodes on which a 0D element already exists.
# 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.
# 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
# @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=""):
+ def Add0DElementsToAllNodes(self, theObject, theGroupName="", DuplicateElements=False):
unRegister = genObjUnRegister()
if isinstance( theObject, Mesh ):
theObject = theObject.GetMesh()
unRegister = genObjUnRegister()
if isinstance( theObject, Mesh ):
theObject = theObject.GetMesh()
theObject = self.GetIDSource( theObject, SMESH.ALL )
unRegister.set( theObject )
theObject = self.GetIDSource( theObject, SMESH.ALL )
unRegister.set( theObject )
## Creates a ball element on a node with given ID.
# @param IDOfNode the ID of node for creation of the element.
## Creates a ball element on a node with given ID.
# @param IDOfNode the ID of node for creation of the element.
# @param exceptNodes list of either SubMeshes, Groups or node IDs to exclude from search
# @param SeparateCornerAndMediumNodes if @c True, in quadratic mesh puts
# corner and medium nodes in separate groups thus preventing
# @param exceptNodes list of either SubMeshes, Groups or node IDs to exclude from search
# @param SeparateCornerAndMediumNodes if @c True, in quadratic mesh puts
# corner and medium nodes in separate groups thus preventing