Functions | |
def | Mirror |
Create a symmetrical copy of mesh elements. More... | |
def | MirrorMakeMesh |
Create a new mesh by a symmetrical copy of mesh elements. More... | |
def | MirrorObject |
Create a symmetrical copy of the object. More... | |
def | MirrorObjectMakeMesh |
Create a new mesh by a symmetrical copy of the object. More... | |
def | Translate |
Translate the elements. More... | |
def | TranslateMakeMesh |
Create a new mesh of translated elements. More... | |
def | TranslateObject |
Translate the object. More... | |
def | TranslateObjectMakeMesh |
Create a new mesh from the translated object. More... | |
def | Rotate |
Rotate the elements. More... | |
def | RotateMakeMesh |
Create a new mesh of rotated elements. More... | |
def | RotateObject |
Rotate the object. More... | |
def | RotateObjectMakeMesh |
Create a new mesh from the rotated object. More... | |
def | FindCoincidentNodes |
Find groups of adjacent nodes within Tolerance. More... | |
def | FindCoincidentNodesOnPart |
Find groups of ajacent nodes within Tolerance. More... | |
def | MergeNodes |
Merge nodes. More... | |
def | FindEqualElements |
Find the elements built on the same nodes. More... | |
def | MergeElements |
Merge elements in each given group. More... | |
def | MergeEqualElements |
Leave one element and remove all other elements built on the same nodes. More... | |
def | FindCoincidentFreeBorders |
Return groups of FreeBorder's coincident within the given tolerance. More... | |
def | SewCoincidentFreeBorders |
Sew FreeBorder's of each group. More... | |
def | SewFreeBorders |
Sew free borders. More... | |
def | SewConformFreeBorders |
Sew conform free borders. More... | |
def | SewBorderToSide |
Sew border to side. More... | |
def | SewSideElements |
Sew two sides of a mesh. More... | |
def Mirror | ( | self, | |
IDsOfElements, | |||
Mirror, | |||
theMirrorType = None , |
|||
Copy = 0 , |
|||
MakeGroups = False |
|||
) |
Create a symmetrical copy of mesh elements.
IDsOfElements | list of elements ids |
Mirror | is AxisStruct or geom object(point, line, plane) |
theMirrorType | smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE If the Mirror is a geom object this parameter is unnecessary |
Copy | allows to copy element (Copy is 1) or to replace with its mirroring (Copy is 0) |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
References Mesh.GetElementsId().
def MirrorMakeMesh | ( | self, | |
IDsOfElements, | |||
Mirror, | |||
theMirrorType = 0 , |
|||
MakeGroups = 0 , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh by a symmetrical copy of mesh elements.
IDsOfElements | the list of elements ids |
Mirror | is AxisStruct or geom object (point, line, plane) |
theMirrorType | smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE If the Mirror is a geom object this parameter is unnecessary |
MakeGroups | to generate new groups from existing ones |
NewMeshName | a name of the new mesh to create |
References smeshBuilder.geompyD, Mesh.geompyD, Mesh.GetElementsId(), and Mesh.smeshpyD.
def MirrorObject | ( | self, | |
theObject, | |||
Mirror, | |||
theMirrorType = None , |
|||
Copy = 0 , |
|||
MakeGroups = False |
|||
) |
Create a symmetrical copy of the object.
theObject | mesh, submesh or group |
Mirror | AxisStruct or geom object (point, line, plane) |
theMirrorType | smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE If the Mirror is a geom object this parameter is unnecessary |
Copy | allows copying the element (Copy is 1) or replacing it with its mirror (Copy is 0) |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
def MirrorObjectMakeMesh | ( | self, | |
theObject, | |||
Mirror, | |||
theMirrorType = 0 , |
|||
MakeGroups = 0 , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh by a symmetrical copy of the object.
theObject | mesh, submesh or group |
Mirror | AxisStruct or geom object (point, line, plane) |
theMirrorType | smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE If the Mirror is a geom object this parameter is unnecessary |
MakeGroups | forces the generation of new groups from existing ones |
NewMeshName | the name of the new mesh to create |
References smeshBuilder.geompyD, Mesh.geompyD, and Mesh.smeshpyD.
def Translate | ( | self, | |
IDsOfElements, | |||
Vector, | |||
Copy, | |||
MakeGroups = False |
|||
) |
Translate the elements.
IDsOfElements | list of elements ids |
Vector | the direction of translation (DirStruct or vector or 3 vector components) |
Copy | allows copying the translated elements |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
References Mesh.GetElementsId().
def TranslateMakeMesh | ( | self, | |
IDsOfElements, | |||
Vector, | |||
MakeGroups = False , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh of translated elements.
IDsOfElements | list of elements ids |
Vector | the direction of translation (DirStruct or vector or 3 vector components) |
MakeGroups | forces the generation of new groups from existing ones |
NewMeshName | the name of the newly created mesh |
References smeshBuilder.geompyD, Mesh.geompyD, Mesh.GetElementsId(), and Mesh.smeshpyD.
def TranslateObject | ( | self, | |
theObject, | |||
Vector, | |||
Copy, | |||
MakeGroups = False |
|||
) |
Translate the object.
theObject | the object to translate (mesh, submesh, or group) |
Vector | direction of translation (DirStruct or geom vector or 3 vector components) |
Copy | allows copying the translated elements |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
def TranslateObjectMakeMesh | ( | self, | |
theObject, | |||
Vector, | |||
MakeGroups = False , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh from the translated object.
theObject | the object to translate (mesh, submesh, or group) |
Vector | the direction of translation (DirStruct or geom vector or 3 vector components) |
MakeGroups | forces the generation of new groups from existing ones |
NewMeshName | the name of the newly created mesh |
References smeshBuilder.geompyD, Mesh.geompyD, and Mesh.smeshpyD.
def Rotate | ( | self, | |
IDsOfElements, | |||
Axis, | |||
AngleInRadians, | |||
Copy, | |||
MakeGroups = False |
|||
) |
Rotate the elements.
IDsOfElements | list of elements ids |
Axis | the axis of rotation (AxisStruct or geom line) |
AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
Copy | allows copying the rotated elements |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
References Mesh.GetElementsId(), and smeshBuilder.ParseAngles().
def RotateMakeMesh | ( | self, | |
IDsOfElements, | |||
Axis, | |||
AngleInRadians, | |||
MakeGroups = 0 , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh of rotated elements.
IDsOfElements | list of element ids |
Axis | the axis of rotation (AxisStruct or geom line) |
AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
MakeGroups | forces the generation of new groups from existing ones |
NewMeshName | the name of the newly created mesh |
References smeshBuilder.geompyD, Mesh.geompyD, Mesh.GetElementsId(), smeshBuilder.ParseAngles(), and Mesh.smeshpyD.
def RotateObject | ( | self, | |
theObject, | |||
Axis, | |||
AngleInRadians, | |||
Copy, | |||
MakeGroups = False |
|||
) |
Rotate the object.
theObject | the object to rotate( mesh, submesh, or group) |
Axis | the axis of rotation (AxisStruct or geom line) |
AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
Copy | allows copying the rotated elements |
MakeGroups | forces the generation of new groups from existing ones (if Copy) |
References smeshBuilder.ParseAngles().
def RotateObjectMakeMesh | ( | self, | |
theObject, | |||
Axis, | |||
AngleInRadians, | |||
MakeGroups = 0 , |
|||
NewMeshName = "" |
|||
) |
Create a new mesh from the rotated object.
theObject | the object to rotate (mesh, submesh, or group) |
Axis | the axis of rotation (AxisStruct or geom line) |
AngleInRadians | the angle of rotation (in radians) or a name of variable which defines angle in degrees |
MakeGroups | forces the generation of new groups from existing ones |
NewMeshName | the name of the newly created mesh |
References smeshBuilder.geompyD, Mesh.geompyD, smeshBuilder.ParseAngles(), and Mesh.smeshpyD.
def FindCoincidentNodes | ( | self, | |
Tolerance, | |||
SeparateCornerAndMediumNodes = False |
|||
) |
Find groups of adjacent nodes within Tolerance.
Tolerance | the value of tolerance |
SeparateCornerAndMediumNodes | if True , in quadratic mesh puts corner and medium nodes in separate groups thus preventing their further merge. |
References Mesh.FindCoincidentNodesOnPart().
def FindCoincidentNodesOnPart | ( | self, | |
SubMeshOrGroup, | |||
Tolerance, | |||
exceptNodes = [] , |
|||
SeparateCornerAndMediumNodes = False |
|||
) |
Find groups of ajacent nodes within Tolerance.
Tolerance | the value of tolerance |
SubMeshOrGroup | SubMesh, Group or Filter |
exceptNodes | list of either SubMeshes, Groups or node IDs to exclude from search |
SeparateCornerAndMediumNodes | if True , in quadratic mesh puts corner and medium nodes in separate groups thus preventing their further merge. |
References Mesh.GetIDSource().
def MergeNodes | ( | self, | |
GroupsOfNodes, | |||
NodesToKeep = [] , |
|||
AvoidMakingHoles = False |
|||
) |
Merge nodes.
GroupsOfNodes | a list of groups of nodes IDs for merging (e.g. [[1,12,13],[25,4]], then nodes 12, 13 and 4 will be removed and replaced by nodes 1 and 25 correspondingly in all elements and groups |
NodesToKeep | nodes to keep in the mesh: a list of groups, sub-meshes or node IDs. If NodesToKeep does not include a node to keep for some group to merge, then the first node in the group is kept. |
AvoidMakingHoles | prevent merging nodes which cause removal of elements becoming invalid |
def FindEqualElements | ( | self, | |
MeshOrSubMeshOrGroup = None |
|||
) |
def MergeElements | ( | self, | |
GroupsOfElementsID | |||
) |
Merge elements in each given group.
GroupsOfElementsID | a list of groups of elements IDs for merging (e.g. [[1,12,13],[25,4]], then elements 12, 13 and 4 will be removed and replaced by elements 1 and 25 in all groups) |
def MergeEqualElements | ( | self | ) |
Leave one element and remove all other elements built on the same nodes.
def FindCoincidentFreeBorders | ( | self, | |
tolerance = 0. |
|||
) |
Return groups of FreeBorder's coincident within the given tolerance.
tolerance | the tolerance. If the tolerance <= 0.0 then one tenth of an average size of elements adjacent to free borders being compared is used. |
def SewCoincidentFreeBorders | ( | self, | |
freeBorders, | |||
createPolygons = False , |
|||
createPolyhedra = False |
|||
) |
Sew FreeBorder's of each group.
freeBorders | either a SMESH.CoincidentFreeBorders structure or a list of lists where each enclosed list contains node IDs of a group of coincident free borders such that each consequent triple of IDs within a group describes a free border in a usual way: n1, n2, nLast - i.e. 1st node, 2nd node and last node of a border. For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes two groups of coincident free borders, each group including two borders. |
createPolygons | if True faces adjacent to free borders are converted to polygons if a node of opposite border falls on a face edge, else such faces are split into several ones. |
createPolyhedra | if True volumes adjacent to free borders are converted to polyhedra if a node of opposite border falls on a volume edge, else such volumes, if any, remain intact and the mesh becomes non-conformal. |
References Mesh.SewFreeBorders().
def SewFreeBorders | ( | self, | |
FirstNodeID1, | |||
SecondNodeID1, | |||
LastNodeID1, | |||
FirstNodeID2, | |||
SecondNodeID2, | |||
LastNodeID2, | |||
CreatePolygons, | |||
CreatePolyedrs | |||
) |
def SewConformFreeBorders | ( | self, | |
FirstNodeID1, | |||
SecondNodeID1, | |||
LastNodeID1, | |||
FirstNodeID2, | |||
SecondNodeID2 | |||
) |
def SewBorderToSide | ( | self, | |
FirstNodeIDOnFreeBorder, | |||
SecondNodeIDOnFreeBorder, | |||
LastNodeIDOnFreeBorder, | |||
FirstNodeIDOnSide, | |||
LastNodeIDOnSide, | |||
CreatePolygons, | |||
CreatePolyedrs | |||
) |
def SewSideElements | ( | self, | |
IDsOfSide1Elements, | |||
IDsOfSide2Elements, | |||
NodeID1OfSide1ToMerge, | |||
NodeID1OfSide2ToMerge, | |||
NodeID2OfSide1ToMerge, | |||
NodeID2OfSide2ToMerge | |||
) |
Sew 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.