Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Cutting elements

Functions

def InverseDiag
 Replace two neighbour triangles sharing Node1-Node2 link with the triangles built on the same 4 nodes but having other common link. More...
 
def QuadToTri
 Split quadrangles into triangles. More...
 
def QuadToTriObject
 Split quadrangles into triangles. More...
 
def QuadTo4Tri
 Split each of given quadrangles into 4 triangles. More...
 
def SplitQuad
 Split quadrangles into triangles. More...
 
def SplitQuadObject
 Split quadrangles into triangles. More...
 
def BestSplit
 Find a better splitting of the given quadrangle. More...
 
def SplitVolumesIntoTetra
 Split volumic elements into tetrahedrons. More...
 
def SplitBiQuadraticIntoLinear
 Split bi-quadratic elements into linear ones without creation of additional nodes: More...
 
def SplitHexahedraIntoPrisms
 Split hexahedra into prisms. More...
 
def SplitQuadsNearTriangularFacets
 Split quadrangle faces near triangular facets of volumes. More...
 
def SplitHexaToTetras
 Splits hexahedrons into tetrahedrons. More...
 
def SplitHexaToPrisms
 Split hexahedrons into prisms. More...
 

Detailed Description

Function Documentation

def InverseDiag (   self,
  NodeID1,
  NodeID2 
)

Replace two neighbour triangles sharing Node1-Node2 link with the triangles built on the same 4 nodes but having other common link.

Parameters
NodeID1the ID of the first node
NodeID2the ID of the second node
Returns
false if proper faces were not found
def QuadToTri (   self,
  IDsOfElements,
  theCriterion = None 
)

Split quadrangles into triangles.

Parameters
IDsOfElementsthe faces to be splitted.
theCriterionis a numerical functor, in terms of enum SMESH.FunctorType, used to choose a diagonal for splitting. If theCriterion is None, which is a default value, then quadrangles will be split by the smallest diagonal. Type SMESH.FunctorType._items in the Python Console to see all items. Note that not all items correspond to numerical functors.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.GetElementsId().

def QuadToTriObject (   self,
  theObject,
  theCriterion = None 
)

Split quadrangles into triangles.

Parameters
theObjectthe object from which the list of elements is taken, this is mesh, submesh or group
theCriterionis a numerical functor, in terms of enum SMESH.FunctorType, used to choose a diagonal for splitting. If theCriterion is None, which is a default value, then quadrangles will be split by the smallest diagonal. Type SMESH.FunctorType._items in the Python Console to see all items. Note that not all items correspond to numerical functors.
Returns
TRUE in case of success, FALSE otherwise.
def QuadTo4Tri (   self,
  theElements = [] 
)

Split each of given quadrangles into 4 triangles.

A node is added at the center of a quadrangle.

Parameters
theElementsthe faces to be splitted. This can be either mesh, sub-mesh, group or a list of face IDs. By default all quadrangles are split

References Mesh.GetIDSource(), and Mesh.mesh.

def SplitQuad (   self,
  IDsOfElements,
  Diag13 
)

Split quadrangles into triangles.

Parameters
IDsOfElementsthe faces to be splitted
Diag13is used to choose a diagonal for splitting.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.GetElementsId().

def SplitQuadObject (   self,
  theObject,
  Diag13 
)

Split quadrangles into triangles.

Parameters
theObjectthe object from which the list of elements is taken, this is mesh, submesh or group
Diag13is used to choose a diagonal for splitting.
Returns
TRUE in case of success, FALSE otherwise.
def BestSplit (   self,
  IDOfQuad,
  theCriterion 
)

Find a better splitting of the given quadrangle.

Parameters
IDOfQuadthe ID of the quadrangle to be splitted.
theCriterionis a numerical functor, in terms of enum SMESH.FunctorType, used to choose a diagonal for splitting. Type SMESH.FunctorType._items in the Python Console to see all items. Note that not all items correspond to numerical functors.
Returns
1 if 1-3 diagonal is better, 2 if 2-4 diagonal is better, 0 if error occurs.
def SplitVolumesIntoTetra (   self,
  elems,
  method = smeshBuilder.Hex_5Tet 
)

Split volumic elements into tetrahedrons.

Parameters
elemseither a list of elements or a mesh or a group or a submesh or a filter
methodflags passing splitting method: smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet. smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc.
def SplitBiQuadraticIntoLinear (   self,
  elems = None 
)

Split bi-quadratic elements into linear ones without creation of additional nodes:

  • bi-quadratic triangle will be split into 3 linear quadrangles;
  • bi-quadratic quadrangle will be split into 4 linear quadrangles;
  • tri-quadratic hexahedron will be split into 8 linear hexahedra. Quadratic elements of lower dimension adjacent to the split bi-quadratic element will be split in order to keep the mesh conformal.
    Parameters
    elems- elements to split: sub-meshes, groups, filters or element IDs; if None (default), all bi-quadratic elements will be split

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

def SplitHexahedraIntoPrisms (   self,
  elems,
  startHexPoint,
  facetNormal,
  method = smeshBuilder.Hex_2Prisms,
  allDomains = False 
)

Split hexahedra into prisms.

Parameters
elemseither a list of elements or a mesh or a group or a submesh or a filter
startHexPointa point used to find a hexahedron for which facetNormal gives a normal vector defining facets to split into triangles. startHexPoint can be either a triple of coordinates or a vertex.
facetNormala normal to a facet to split into triangles of a hexahedron found by startHexPoint. facetNormal can be either a triple of coordinates or an edge.
methodflags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms. smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc.
allDomainsif False, only hexahedra adjacent to one closest to startHexPoint are split, else startHexPoint is used to find the facet to split in all domains present in elems.
def SplitQuadsNearTriangularFacets (   self)

Split quadrangle faces near triangular facets of volumes.

References Mesh.GetElementsByType(), Mesh.GetElementType(), Mesh.GetElemNbNodes(), Mesh.GetNodeInverseElements(), and Mesh.SplitQuad().

def SplitHexaToTetras (   self,
  theObject,
  theNode000,
  theNode001 
)

Splits hexahedrons into tetrahedrons.

This operation uses pattern mapping functionality for splitting.

Parameters
theObjectthe object from which the list of hexahedrons is taken; this is mesh, submesh or group.
theNode000,theNode001within the range [0,7]; gives the orientation of the pattern relatively each hexahedron: the (0,0,0) key-point of the pattern will be mapped into theNode000-th node of each volume, the (0,0,1) key-point will be mapped into theNode001-th node of each volume. The (0,0,0) key-point of the used pattern corresponds to a non-split corner.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.mesh, and Mesh.SplitQuadsNearTriangularFacets().

def SplitHexaToPrisms (   self,
  theObject,
  theNode000,
  theNode001 
)

Split hexahedrons into prisms.

Uses the pattern mapping functionality for splitting.

Parameters
theObjectthe object (mesh, submesh or group) from where the list of hexahedrons is taken;
theNode000,theNode001(within the range [0,7]) gives the orientation of the pattern relatively each hexahedron: keypoint (0,0,0) of the pattern will be mapped into the theNode000-th node of each volume, keypoint (0,0,1) will be mapped into the theNode001-th node of each volume. Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners.
Returns
TRUE in case of success, FALSE otherwise.

References Mesh.mesh, Mesh.Smooth(), and Mesh.SplitQuadsNearTriangularFacets().