functor = aFilterMgr.CreateLength()
elif theCriterion == FT_Length2D:
functor = aFilterMgr.CreateLength2D()
functor = aFilterMgr.CreateLength()
elif theCriterion == FT_Length2D:
functor = aFilterMgr.CreateLength2D()
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) )
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) )
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
## Removes all nodes and elements of indicated shape
# @param refresh if @c True, Object browser is automatically updated (when running in GUI)
## Removes all nodes and elements of indicated shape
# @param refresh if @c True, Object browser is automatically updated (when running in GUI)
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True )
## Computes a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron
# @param fineness [0.0,1.0] defines mesh fineness
## Computes a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron
# @param fineness [0.0,1.0] defines mesh fineness
# Shape must be the sub-shape of a ShapeToMesh()
# @param all If true, gives all nodes of submesh elements, otherwise gives only submesh nodes
# @return the list of integer values
# Shape must be the sub-shape of a ShapeToMesh()
# @param all If true, gives all nodes of submesh elements, otherwise gives only submesh nodes
# @return the list of integer values
return self.mesh.GetSubMeshNodesId(ShapeID, all)
## Returns type of elements on given shape
return self.mesh.GetSubMeshNodesId(ShapeID, all)
## Returns type of elements on given shape
## 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
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self ), ok, (self.GetNumberOfElements()==0) )
smeshgui = salome.ImportComponentGUI("SMESH")
smeshgui.Init(self.mesh.GetStudyId())
smeshgui.SetMeshIcon( salome.ObjectToID( self ), ok, (self.GetNumberOfElements()==0) )