Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Functions
Transforming meshes (Translation, Rotation, Symmetry, Sewing, Merging)
Modifying meshes

Functions

def Mirror
 Creates a symmetrical copy of mesh elements.
def MirrorMakeMesh
 Creates a new mesh by a symmetrical copy of mesh elements.
def MirrorObject
 Creates a symmetrical copy of the object.
def MirrorObjectMakeMesh
 Creates a new mesh by a symmetrical copy of the object.
def Translate
 Translates the elements.
def TranslateMakeMesh
 Creates a new mesh of translated elements.
def TranslateObject
 Translates the object.
def TranslateObjectMakeMesh
 Creates a new mesh from the translated object.
def Rotate
 Rotates the elements.
def RotateMakeMesh
 Creates a new mesh of rotated elements.
def RotateObject
 Rotates the object.
def RotateObjectMakeMesh
 Creates a new mesh from the rotated object.
def FindCoincidentNodes
 Finds groups of ajacent nodes within Tolerance.
def FindCoincidentNodesOnPart
 Finds groups of ajacent nodes within Tolerance.
def MergeNodes
 Merges nodes.
def FindEqualElements
 Finds the elements built on the same nodes.
def MergeElements
 Merges elements in each given group.
def MergeEqualElements
 Leaves one element and removes all other elements built on the same nodes.
def SewFreeBorders
 Sews free borders.
def SewConformFreeBorders
 Sews conform free borders.
def SewBorderToSide
 Sews border to side.
def SewSideElements
 Sews two sides of a mesh.

Detailed Description

Function Documentation

def Mirror (   self,
  IDsOfElements,
  Mirror,
  theMirrorType,
  Copy = 0,
  MakeGroups = False 
)

Creates a symmetrical copy of mesh elements.

Parameters
IDsOfElementslist of elements ids
Mirroris AxisStruct or geom object(point, line, plane)
theMirrorTypeis POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary
Copyallows to copy element (Copy is 1) or to replace with its mirroring (Copy is 0)
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.GetElementsId().

def MirrorMakeMesh (   self,
  IDsOfElements,
  Mirror,
  theMirrorType,
  MakeGroups = 0,
  NewMeshName = "" 
)

Creates a new mesh by a symmetrical copy of mesh elements.

Parameters
IDsOfElementsthe list of elements ids
Mirroris AxisStruct or geom object (point, line, plane)
theMirrorTypeis POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary
MakeGroupsto generate new groups from existing ones
NewMeshNamea name of the new mesh to create
Returns
instance of Mesh class

References Mesh.geompyD, Mesh.GetElementsId(), and Mesh.smeshpyD.

def MirrorObject (   self,
  theObject,
  Mirror,
  theMirrorType,
  Copy = 0,
  MakeGroups = False 
)

Creates a symmetrical copy of the object.

Parameters
theObjectmesh, submesh or group
MirrorAxisStruct or geom object (point, line, plane)
theMirrorTypeis POINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary
Copyallows copying the element (Copy is 1) or replacing it with its mirror (Copy is 0)
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise
def MirrorObjectMakeMesh (   self,
  theObject,
  Mirror,
  theMirrorType,
  MakeGroups = 0,
  NewMeshName = "" 
)

Creates a new mesh by a symmetrical copy of the object.

Parameters
theObjectmesh, submesh or group
MirrorAxisStruct or geom object (point, line, plane)
theMirrorTypePOINT, AXIS or PLANE If the Mirror is a geom object this parameter is unnecessary
MakeGroupsforces the generation of new groups from existing ones
NewMeshNamethe name of the new mesh to create
Returns
instance of Mesh class

References Mesh.geompyD, and Mesh.smeshpyD.

def Translate (   self,
  IDsOfElements,
  Vector,
  Copy,
  MakeGroups = False 
)

Translates the elements.

Parameters
IDsOfElementslist of elements ids
Vectorthe direction of translation (DirStruct or vector)
Copyallows copying the translated elements
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.GetElementsId().

def TranslateMakeMesh (   self,
  IDsOfElements,
  Vector,
  MakeGroups = False,
  NewMeshName = "" 
)

Creates a new mesh of translated elements.

Parameters
IDsOfElementslist of elements ids
Vectorthe direction of translation (DirStruct or vector)
MakeGroupsforces the generation of new groups from existing ones
NewMeshNamethe name of the newly created mesh
Returns
instance of Mesh class

References Mesh.geompyD, Mesh.GetElementsId(), and Mesh.smeshpyD.

def TranslateObject (   self,
  theObject,
  Vector,
  Copy,
  MakeGroups = False 
)

Translates the object.

Parameters
theObjectthe object to translate (mesh, submesh, or group)
Vectordirection of translation (DirStruct or geom vector)
Copyallows copying the translated elements
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise
def TranslateObjectMakeMesh (   self,
  theObject,
  Vector,
  MakeGroups = False,
  NewMeshName = "" 
)

Creates a new mesh from the translated object.

Parameters
theObjectthe object to translate (mesh, submesh, or group)
Vectorthe direction of translation (DirStruct or geom vector)
MakeGroupsforces the generation of new groups from existing ones
NewMeshNamethe name of the newly created mesh
Returns
instance of Mesh class

References Mesh.geompyD, and Mesh.smeshpyD.

def Rotate (   self,
  IDsOfElements,
  Axis,
  AngleInRadians,
  Copy,
  MakeGroups = False 
)

Rotates the elements.

Parameters
IDsOfElementslist of elements ids
Axisthe axis of rotation (AxisStruct or geom line)
AngleInRadiansthe angle of rotation (in radians) or a name of variable which defines angle in degrees
Copyallows copying the rotated elements
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.GetElementsId(), and smesh.ParseAngles().

def RotateMakeMesh (   self,
  IDsOfElements,
  Axis,
  AngleInRadians,
  MakeGroups = 0,
  NewMeshName = "" 
)

Creates a new mesh of rotated elements.

Parameters
IDsOfElementslist of element ids
Axisthe axis of rotation (AxisStruct or geom line)
AngleInRadiansthe angle of rotation (in radians) or a name of variable which defines angle in degrees
MakeGroupsforces the generation of new groups from existing ones
NewMeshNamethe name of the newly created mesh
Returns
instance of Mesh class

References Mesh.geompyD, Mesh.GetElementsId(), smesh.ParseAngles(), and Mesh.smeshpyD.

def RotateObject (   self,
  theObject,
  Axis,
  AngleInRadians,
  Copy,
  MakeGroups = False 
)

Rotates the object.

Parameters
theObjectthe object to rotate( mesh, submesh, or group)
Axisthe axis of rotation (AxisStruct or geom line)
AngleInRadiansthe angle of rotation (in radians) or a name of variable which defines angle in degrees
Copyallows copying the rotated elements
MakeGroupsforces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References smesh.ParseAngles().

def RotateObjectMakeMesh (   self,
  theObject,
  Axis,
  AngleInRadians,
  MakeGroups = 0,
  NewMeshName = "" 
)

Creates a new mesh from the rotated object.

Parameters
theObjectthe object to rotate (mesh, submesh, or group)
Axisthe axis of rotation (AxisStruct or geom line)
AngleInRadiansthe angle of rotation (in radians) or a name of variable which defines angle in degrees
MakeGroupsforces the generation of new groups from existing ones
NewMeshNamethe name of the newly created mesh
Returns
instance of Mesh class

References Mesh.geompyD, smesh.ParseAngles(), and Mesh.smeshpyD.

def FindCoincidentNodes (   self,
  Tolerance 
)

Finds groups of ajacent nodes within Tolerance.

Parameters
Tolerancethe value of tolerance
Returns
the list of groups of nodes
def FindCoincidentNodesOnPart (   self,
  SubMeshOrGroup,
  Tolerance,
  exceptNodes = [] 
)

Finds groups of ajacent nodes within Tolerance.

Parameters
Tolerancethe value of tolerance
SubMeshOrGroupSubMesh or Group
exceptNodeslist of either SubMeshes, Groups or node IDs to exclude from search
Returns
the list of groups of nodes

References Mesh.GetIDSource().

def MergeNodes (   self,
  GroupsOfNodes 
)

Merges nodes.

Parameters
GroupsOfNodesthe list of groups of nodes
def FindEqualElements (   self,
  MeshOrSubMeshOrGroup 
)

Finds the elements built on the same nodes.

Parameters
MeshOrSubMeshOrGroupMesh or SubMesh, or Group of elements for searching
Returns
a list of groups of equal elements
def MergeElements (   self,
  GroupsOfElementsID 
)

Merges elements in each given group.

Parameters
GroupsOfElementsIDgroups of elements for merging
def MergeEqualElements (   self)

Leaves one element and removes all other elements built on the same nodes.

References Mesh.SewFreeBorders().

def SewFreeBorders (   self,
  FirstNodeID1,
  SecondNodeID1,
  LastNodeID1,
  FirstNodeID2,
  SecondNodeID2,
  LastNodeID2,
  CreatePolygons,
  CreatePolyedrs 
)

Sews free borders.

Returns
SMESH::Sew_Error

References Mesh.SewConformFreeBorders().

def SewConformFreeBorders (   self,
  FirstNodeID1,
  SecondNodeID1,
  LastNodeID1,
  FirstNodeID2,
  SecondNodeID2 
)

Sews conform free borders.

Returns
SMESH::Sew_Error

References Mesh.SewBorderToSide().

def SewBorderToSide (   self,
  FirstNodeIDOnFreeBorder,
  SecondNodeIDOnFreeBorder,
  LastNodeIDOnFreeBorder,
  FirstNodeIDOnSide,
  LastNodeIDOnSide,
  CreatePolygons,
  CreatePolyedrs 
)

Sews border to side.

Returns
SMESH::Sew_Error

References Mesh.SewSideElements().

def SewSideElements (   self,
  IDsOfSide1Elements,
  IDsOfSide2Elements,
  NodeID1OfSide1ToMerge,
  NodeID1OfSide2ToMerge,
  NodeID2OfSide1ToMerge,
  NodeID2OfSide2ToMerge 
)

Sews two sides of a mesh.

The nodes belonging to Side1 are merged with the nodes of elements of Side2. The number of elements in theSide1 and in theSide2 must be equal and they should have similar nodal connectivity. The nodes to merge should belong to side borders and the first node should be linked to the second.

Returns
SMESH::Sew_Error
Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS