Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Creating groups

Functions

def CreateEmptyGroup
 Create an empty mesh group. More...
 
def Group
 Create a mesh group based on the geometric object grp and gives a name,
if this parameter is not defined the name is the same as the geometric group name
Note: Works like GroupOnGeom(). More...
 
def GroupOnGeom
 Create a mesh group based on the geometrical object grp and gives a name,
if this parameter is not defined the name is the same as the geometrical group name. More...
 
def GroupOnFilter
 Create a mesh group with given name based on the filter which is a special type of group dynamically updating it's contents during mesh modification. More...
 
def MakeGroupByIds
 Create a mesh group by the given ids of elements. More...
 
def MakeGroup
 Create a mesh group by the given conditions. More...
 
def MakeGroupByCriterion
 Create a mesh group by the given criterion. More...
 
def MakeGroupByCriteria
 Create a mesh group by the given criteria (list of criteria) More...
 
def MakeGroupByFilter
 Create a mesh group by the given filter. More...
 
def GetGroups
 Get the list of groups existing in the mesh in the order of creation (starting from the oldest one) More...
 
def NbGroups
 Get the number of groups existing in the mesh. More...
 
def GetGroupNames
 Get the list of names of groups existing in the mesh. More...
 
def GetGroupByName
 Find groups by name and type. More...
 

Detailed Description

Function Documentation

def CreateEmptyGroup (   self,
  elementType,
  name 
)

Create an empty mesh group.

Parameters
elementTypethe type of elements in the group; either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME)
namethe name of the mesh group
Returns
SMESH_Group
def Group (   self,
  grp,
  name = "" 
)

Create a mesh group based on the geometric object grp and gives a name,
if this parameter is not defined the name is the same as the geometric group name
Note: Works like GroupOnGeom().

Parameters
grpa geometric group, a vertex, an edge, a face or a solid
namethe name of the mesh group
Returns
SMESH_GroupOnGeom

References Mesh.GroupOnGeom().

def GroupOnGeom (   self,
  grp,
  name = "",
  typ = None 
)

Create a mesh group based on the geometrical object grp and gives a name,
if this parameter is not defined the name is the same as the geometrical group name.

Parameters
grpa geometrical group, a vertex, an edge, a face or a solid
namethe name of the mesh group
typthe type of elements in the group; either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). If not set, it is automatically detected by the type of the geometry
Returns
SMESH_GroupOnGeom

References Mesh._groupTypeFromShape(), and smeshBuilder.AssureGeomPublished().

def GroupOnFilter (   self,
  typ,
  name,
  filter 
)

Create a mesh group with given name based on the filter which is a special type of group dynamically updating it's contents during mesh modification.

Parameters
typthe type of elements in the group; either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME).
namethe name of the mesh group
filterthe filter defining group contents
Returns
SMESH_GroupOnFilter
def MakeGroupByIds (   self,
  groupName,
  elementType,
  elemIDs 
)

Create a mesh group by the given ids of elements.

Parameters
groupNamethe name of the mesh group
elementTypethe type of elements in the group; either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME).
elemIDseither the list of ids, group, sub-mesh, or filter
Returns
SMESH_Group

References Mesh.GetMesh(), and Mesh.MakeGroup().

def MakeGroup (   self,
  groupName,
  elementType,
  CritType = FT_Undefined,
  Compare = FT_EqualTo,
  Threshold = "",
  UnaryOp = FT_Undefined,
  Tolerance = 1e-07 
)

Create a mesh group by the given conditions.

Parameters
groupNamethe name of the mesh group
elementTypethe type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME)
CritTypethe type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) Type SMESH.FunctorType._items in the Python Console to see all values. Note that the items starting from FT_LessThan are not suitable for CritType.
Comparebelongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo}
Thresholdthe threshold value (range of ids as string, shape, numeric)
UnaryOpSMESH.FT_LogicalNOT or SMESH.FT_Undefined
Tolerancethe tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria
Returns
SMESH_GroupOnFilter

References Mesh.MakeGroupByCriterion().

def MakeGroupByCriterion (   self,
  groupName,
  Criterion 
)

Create a mesh group by the given criterion.

Parameters
groupNamethe name of the mesh group
Criterionthe instance of Criterion class
Returns
SMESH_GroupOnFilter

References Mesh.MakeGroupByCriteria().

def MakeGroupByCriteria (   self,
  groupName,
  theCriteria,
  binOp = SMESH.FT_LogicalAND 
)

Create a mesh group by the given criteria (list of criteria)

Parameters
groupNamethe name of the mesh group
theCriteriathe list of criteria
binOpbinary operator used when binary operator of criteria is undefined
Returns
SMESH_GroupOnFilter

References Mesh.MakeGroupByFilter().

def MakeGroupByFilter (   self,
  groupName,
  theFilter 
)

Create a mesh group by the given filter.

Parameters
groupNamethe name of the mesh group
theFilterthe instance of Filter class
Returns
SMESH_GroupOnFilter

References Mesh.GroupOnFilter().

def GetGroups (   self,
  elemType = SMESH.ALL 
)

Get the list of groups existing in the mesh in the order of creation (starting from the oldest one)

Parameters
elemTypetype of elements the groups contain; either of (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); by default groups of elements of all types are returned
Returns
a sequence of SMESH_GroupBase
def NbGroups (   self)

Get the number of groups existing in the mesh.

Returns
the quantity of groups as an integer value
def GetGroupNames (   self)

Get the list of names of groups existing in the mesh.

Returns
list of strings

References Mesh.GetGroups().

def GetGroupByName (   self,
  name,
  elemType = None 
)

Find groups by name and type.

Parameters
namename of the group of interest
elemTypetype of elements the groups contain; either of (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); by default one group of any type of elements is returned if elemType == SMESH.ALL then all groups of any type are returned
Returns
a list of SMESH_GroupBase's

References Mesh.GetGroups().