Version: 9.12.0
SMESH::SMESH_Mesh Interface Reference

import"SMESH_Mesh.idl";

Inheritance diagram for SMESH::SMESH_Mesh:

Public Member Functions

boolean HasShapeToMesh () raises (SALOME::SALOME_Exception)
 Return true if there is a geometry to be meshed. More...
 
GEOM::GEOM_Object GetShapeToMesh () raises (SALOME::SALOME_Exception)
 Get geom shape to mesh. More...
 
void ReplaceShape (in GEOM::GEOM_Object theNewGeom) raises (SALOME::SALOME_Exception)
 Replaces a shape in the mesh. More...
 
boolean IsLoaded () raises (SALOME::SALOME_Exception)
 Return false if the mesh is not yet fully loaded from the study file. More...
 
void Load () raises (SALOME::SALOME_Exception)
 Load full mesh data from the study file. More...
 
void Clear () raises (SALOME::SALOME_Exception)
 Remove all nodes and elements. More...
 
submesh_array GetSubMeshes () raises (SALOME::SALOME_Exception)
 Get the list of sub-meshes existing in the mesh. More...
 
void ClearSubMesh (in long ShapeID) raises (SALOME::SALOME_Exception)
 Remove all nodes and elements of submesh. More...
 
SMESH_subMesh GetSubMesh (in GEOM::GEOM_Object aSubObject, in string name) raises (SALOME::SALOME_Exception)
 Get the subMesh object associated to a Sub-shape. More...
 
void RemoveSubMesh (in SMESH_subMesh aSubMesh) raises (SALOME::SALOME_Exception)
 Remove a submesh. More...
 
SMESH_Group CreateGroup (in ElementType elem_type, in string name) raises (SALOME::SALOME_Exception)
 Create a group. More...
 
SMESH_GroupOnGeom CreateGroupFromGEOM (in ElementType elemType, in string name, in GEOM::GEOM_Object geomObject) raises (SALOME::SALOME_Exception)
 Create a group from geometry. More...
 
SMESH_GroupOnFilter CreateGroupFromFilter (in ElementType elemType, in string name, in SMESH::Filter filter) raises (SALOME::SALOME_Exception)
 Create a group from filter. More...
 
void RemoveGroup (in SMESH_GroupBase aGroup) raises (SALOME::SALOME_Exception)
 Remove a group. More...
 
void RemoveGroupWithContents (in SMESH_GroupBase aGroup) raises (SALOME::SALOME_Exception)
 Remove group with its contents. More...
 
ListOfGroups GetGroups () raises (SALOME::SALOME_Exception)
 Get the list of groups existing in the mesh. More...
 
long NbGroups () raises (SALOME::SALOME_Exception)
 Get number of groups existing in the mesh. More...
 
SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1, in SMESH_GroupBase aGroup2, in string name) raises (SALOME::SALOME_Exception)
 Union of two groups New group is created. More...
 
SMESH_Group UnionListOfGroups (in ListOfGroups aListOfGroups, in string name) raises (SALOME::SALOME_Exception)
 Union of list of groups New group is created. More...
 
SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1, in SMESH_GroupBase aGroup2, in string name) raises (SALOME::SALOME_Exception)
 Intersection of two groups New group is created. More...
 
SMESH_Group IntersectListOfGroups (in ListOfGroups aListOfGroups, in string name) raises (SALOME::SALOME_Exception)
 Intersection of list of groups New group is created. More...
 
SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup, in SMESH_GroupBase aToolGroup, in string name) raises (SALOME::SALOME_Exception)
 Cut of two groups New group is created. More...
 
SMESH_Group CutListOfGroups (in ListOfGroups aMainGroups, in ListOfGroups aToolGroups, in string name) raises (SALOME::SALOME_Exception)
 Cut of lists of groups New group is created. More...
 
SMESH_Group CreateDimGroup (in ListOfIDSources aListOfGroups, in ElementType anElemType, in string name, in NB_COMMON_NODES_ENUM nbCommonNodes, in boolean underlyingOnly) raises (SALOME::SALOME_Exception)
 Create a group of entities basing on nodes of other groups. More...
 
ListOfGroups FaceGroupsSeparatedByEdges (in double sharpAngle, in boolean createEdges, in boolean useExistingEdges) raises (SALOME::SALOME_Exception)
 Distribute all faces of the mesh among groups using sharp edges and optionally existing 1D elements as group boundaries. More...
 
SMESH_Group ConvertToStandalone (in SMESH_GroupBase theGroupOn) raises (SALOME::SALOME_Exception)
 Convert group on geometry or on filter into standalone group. More...
 
Hypothesis_Status AddHypothesis (in GEOM::GEOM_Object aSubObject, in SMESH_Hypothesis anHyp, out string anErrorText) raises (SALOME::SALOME_Exception)
 Add hypothesis to the mesh, under a particular sub-shape (or the main shape itself) This method is only used to prepare the build of the mesh and store the algorithms and associated parameters. More...
 
Hypothesis_Status RemoveHypothesis (in GEOM::GEOM_Object aSubObject, in SMESH_Hypothesis anHyp) raises (SALOME::SALOME_Exception)
 Remove an hypothesis previously added with AddHypothesis. More...
 
ListOfHypothesis GetHypothesisList (in GEOM::GEOM_Object aSubObject) raises (SALOME::SALOME_Exception)
 Get the list of hypothesis added on a sub-shape. More...
 
log_array GetLog (in boolean clearAfterGet) raises (SALOME::SALOME_Exception)
 Get the log of nodes and elements added or removed since previous clear of the log. More...
 
void ClearLog () raises (SALOME::SALOME_Exception)
 Clear the log of nodes and elements added or removed since previous clear. More...
 
void SetAutoColor (in boolean theAutoColor) raises (SALOME::SALOME_Exception)
 Toggle auto color mode on the object. More...
 
boolean GetAutoColor () raises (SALOME::SALOME_Exception)
 Get flag of object's auto color mode. More...
 
long GetId ()
 Get the internal Id. More...
 
SMESH_MeshEditor GetMeshEditor () raises (SALOME::SALOME_Exception)
 Obtain instance of SMESH_MeshEditor. More...
 
SMESH_MeshEditor GetMeshEditPreviewer () raises (SALOME::SALOME_Exception)
 Return SMESH_MeshEditor that would not modify the mesh but fill MeshPreviewStruct. More...
 
boolean HasModificationsToDiscard () raises (SALOME::SALOME_Exception)
 Return true if the mesh has been edited since a total re-compute and those modifications may prevent successful partial re-compute. More...
 
boolean HasDuplicatedGroupNamesMED ()
 Check group names for duplications. More...
 
void ExportMED (in string fileName, in boolean auto_groups, in long version, in boolean overwrite, in boolean autoDimension) raises (SALOME::SALOME_Exception)
 Export a Mesh to MED file. More...
 
long long ExportMEDCoupling (in boolean auto_groups, in boolean autoDimension) raises (SALOME::SALOME_Exception)
 
void ExportPartToMED (in SMESH_IDSource meshPart, in string fileName, in boolean auto_groups, in long version, in boolean overwrite, in boolean autoDimension, in GEOM::ListOfFields fields, in string geomAssocFields, in double ZTolerance, in boolean saveNumbers) raises (SALOME::SALOME_Exception)
 Export a [part of] Mesh into a MED file @params. More...
 
long long ExportPartToMEDCoupling (in SMESH_IDSource meshPart, in boolean auto_groups, in boolean autoDimension, in GEOM::ListOfFields fields, in string geomAssocFields, in double ZTolerance, in boolean saveNumbers) raises (SALOME::SALOME_Exception)
 
string GetVersionString (in long minor, in short nbDigits)
 Return string representation of a MED file version comprising nbDigits. More...
 
long_array GetMEDVersionsCompatibleForAppend ()
 Return the list of med versions compatibles for write/append, encoded in 10*major+minor (for instance, code for med 3.2.1 is 32) More...
 
void ExportDAT (in string file, in boolean renumer) raises (SALOME::SALOME_Exception)
 Export Mesh to different Formats (UNV supported version is I-DEAS 10) More...
 
void ExportUNV (in string file, in boolean renumer) raises (SALOME::SALOME_Exception)
 
void ExportSTL (in string file, in boolean isascii) raises (SALOME::SALOME_Exception)
 
void ExportCGNS (in SMESH_IDSource meshPart, in string file, in boolean overwrite, in boolean groupElemsByType) raises (SALOME::SALOME_Exception)
 
void ExportGMF (in SMESH_IDSource meshPart, in string file, in boolean withRequiredGroups) raises (SALOME::SALOME_Exception)
 
void ExportPartToDAT (in SMESH_IDSource meshPart, in string file, in boolean renumer) raises (SALOME::SALOME_Exception)
 
void ExportPartToUNV (in SMESH_IDSource meshPart, in string file, in boolean renumer) raises (SALOME::SALOME_Exception)
 
void ExportPartToSTL (in SMESH_IDSource meshPart, in string file, in boolean isascii) raises (SALOME::SALOME_Exception)
 
double GetComputeProgress ()
 Return computation progress [0.,1]. More...
 
smIdType NbNodes () raises (SALOME::SALOME_Exception)
 Get information about mesh contents. More...
 
smIdType NbElements () raises (SALOME::SALOME_Exception)
 
smIdType Nb0DElements () raises (SALOME::SALOME_Exception)
 
smIdType NbBalls () raises (SALOME::SALOME_Exception)
 
smIdType NbEdges () raises (SALOME::SALOME_Exception)
 
smIdType NbEdgesOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbFaces () raises (SALOME::SALOME_Exception)
 
smIdType NbFacesOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbTriangles () raises (SALOME::SALOME_Exception)
 
smIdType NbTrianglesOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbBiQuadTriangles () raises (SALOME::SALOME_Exception)
 
smIdType NbQuadrangles () raises (SALOME::SALOME_Exception)
 
smIdType NbQuadranglesOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbBiQuadQuadrangles () raises (SALOME::SALOME_Exception)
 
smIdType NbPolygons () raises (SALOME::SALOME_Exception)
 
smIdType NbPolygonsOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbVolumes () raises (SALOME::SALOME_Exception)
 
smIdType NbVolumesOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbTetras () raises (SALOME::SALOME_Exception)
 
smIdType NbTetrasOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbHexas () raises (SALOME::SALOME_Exception)
 
smIdType NbHexasOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbTriQuadraticHexas () raises (SALOME::SALOME_Exception)
 
smIdType NbPyramids () raises (SALOME::SALOME_Exception)
 
smIdType NbPyramidsOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbPrisms () raises (SALOME::SALOME_Exception)
 
smIdType NbPrismsOfOrder (in ElementOrder order) raises (SALOME::SALOME_Exception)
 
smIdType NbHexagonalPrisms () raises (SALOME::SALOME_Exception)
 
smIdType NbPolyhedrons () raises (SALOME::SALOME_Exception)
 
smIdType NbSubMesh () raises (SALOME::SALOME_Exception)
 
smIdType_array GetElementsId () raises (SALOME::SALOME_Exception)
 
smIdType_array GetElementsByType (in ElementType theType) raises (SALOME::SALOME_Exception)
 
smIdType_array GetNodesId () raises (SALOME::SALOME_Exception)
 
ElementType GetElementType (in smIdType id, in boolean iselem) raises (SALOME::SALOME_Exception)
 Returns type of mesh element. More...
 
EntityType GetElementGeomType (in smIdType id) raises (SALOME::SALOME_Exception)
 
GeometryType GetElementShape (in smIdType id) raises (SALOME::SALOME_Exception)
 
smIdType_array GetSubMeshElementsId (in long ShapeID) raises (SALOME::SALOME_Exception)
 
smIdType_array GetSubMeshNodesId (in long ShapeID, in boolean all) raises (SALOME::SALOME_Exception)
 
ElementType GetSubMeshElementType (in long ShapeID) raises (SALOME::SALOME_Exception)
 
boolean IsUnorderedSubMesh (in long submeshID)
 Methods to set meshing order of submeshes. More...
 
submesh_array_array GetMeshOrder ()
 Return submesh objects list in meshing order. More...
 
boolean SetMeshOrder (in submesh_array_array theSubMeshArray)
 Set submesh object order. More...
 
string Dump ()
 Get mesh description. More...
 
long long GetMeshPtr ()
 Get mesh pointer. More...
 
double_array GetNodeXYZ (in smIdType id)
 Get XYZ coordinates of node as list of double If there is not node for given ID - returns empty list. More...
 
smIdType_array GetNodeInverseElements (in smIdType id, in ElementType elemType)
 For given node returns list of IDs of inverse elements If there is not node for given ID - returns empty list. More...
 
NodePosition GetNodePosition (in smIdType NodeID)
 Return position of a node on shape. More...
 
ElementPosition GetElementPosition (in smIdType ElemID)
 Return position of an element on shape. More...
 
long GetShapeID (in smIdType id)
 If given element is node returns IDs of shape from position If there is not node for given ID - returns -1. More...
 
long GetShapeIDForElem (in smIdType id)
 For given element returns ID of result shape after ::FindShape() from SMESH_MeshEditor If there is not element for given ID - returns -1. More...
 
short GetElemNbNodes (in smIdType id)
 Returns number of nodes for given element If there is not element for given ID - returns -1. More...
 
smIdType_array GetElemNodes (in smIdType id)
 Returns IDs of nodes of given element. More...
 
smIdType GetElemNode (in smIdType id, in short index)
 Returns ID of node by given index for given element If there is not element for given ID - returns -1 If there is not node for given index - returns -2. More...
 
boolean IsMediumNode (in smIdType ide, in smIdType idn)
 Returns true if given node is medium node in given quadratic element. More...
 
boolean IsMediumNodeOfAnyElem (in smIdType idn, in ElementType elem_type)
 Returns true if given node is medium node in one of quadratic elements. More...
 
long ElemNbEdges (in smIdType id)
 Returns number of edges for given element. More...
 
long ElemNbFaces (in smIdType id)
 Returns number of faces for given element. More...
 
smIdType_array GetElemFaceNodes (in smIdType elemId, in short faceIndex)
 Returns nodes of given face (counted from zero) for given volumic element. More...
 
double_array GetFaceNormal (in long faceId, in boolean normalized)
 Returns three components of normal of given mesh face (or an empty array in KO case) More...
 
smIdType FindElementByNodes (in smIdType_array nodes)
 Returns an element based on all given nodes. More...
 
smIdType_array GetElementsByNodes (in smIdType_array nodes, in ElementType elem_type)
 Return elements including all given nodes. More...
 
boolean IsPoly (in smIdType id)
 Returns true if given element is polygon. More...
 
boolean IsQuadratic (in smIdType id)
 Returns true if given element is quadratic. More...
 
double GetBallDiameter (in smIdType id)
 Returns diameter of a ball discrete element or zero in case of an invalid id. More...
 
double_array BaryCenter (in smIdType id)
 Returns XYZ coordinates of bary center for given element as list of double If there is not element for given ID - returns empty list. More...
 
MedFileInfo GetMEDFileInfo ()
 Gets information about imported MED file. More...
 
void SetParameters (in string theParameters)
 Sets list of notebook variables used for Mesh operations separated by ":" symbol. More...
 
string GetParameters ()
 Returns list of notebook variables used for Mesh operations separated by ":" symbol. More...
 
string_array GetLastParameters ()
 Returns list of notebook variables used for last Mesh operation. More...
 
smIdType_array GetIDs ()
 Returns a sequence of all element IDs. More...
 
smIdType_array GetMeshInfo ()
 Returns number of mesh elements of each EntityType. More...
 
smIdType_array GetNbElementsByType ()
 Returns number of mesh elements of each ElementType. More...
 
array_of_ElementType GetTypes ()
 Returns types of elements it contains. More...
 
SMESH_Mesh GetMesh ()
 Returns the mesh. More...
 
boolean IsMeshInfoCorrect ()
 Returns false if GetMeshInfo() returns incorrect information that may happen if mesh data is not yet fully loaded from the file of study. More...
 
SALOMEDS::TMPFile GetVtkUgStream ()
 Returns mesh unstructed grid information. More...
 

Member Function Documentation

◆ AddHypothesis()

Hypothesis_Status SMESH::SMESH_Mesh::AddHypothesis ( in GEOM::GEOM_Object  aSubObject,
in SMESH_Hypothesis  anHyp,
out string  anErrorText 
)
raises (SALOME::SALOME_Exception
)

Add hypothesis to the mesh, under a particular sub-shape (or the main shape itself) This method is only used to prepare the build of the mesh and store the algorithms and associated parameters.

Actual job of meshing the shape is done by SMESH_Gen::Compute() @params

  • aSubObject : sub-shape obtained by a shape explode in GEOM (or main shape)
  • anHyp : an hypothesis object
    Returns
  • An enum item explaining what's up
  • anErrorText: an optional textual description of a problem (if any)

◆ BaryCenter()

double_array SMESH::SMESH_Mesh::BaryCenter ( in smIdType  id)

Returns XYZ coordinates of bary center for given element as list of double If there is not element for given ID - returns empty list.

◆ Clear()

void SMESH::SMESH_Mesh::Clear ( )
raises (SALOME::SALOME_Exception
)

Remove all nodes and elements.

◆ ClearLog()

void SMESH::SMESH_Mesh::ClearLog ( )
raises (SALOME::SALOME_Exception
)

Clear the log of nodes and elements added or removed since previous clear.

Must be used immediately after GetLog if clearAfterGet is false.

◆ ClearSubMesh()

void SMESH::SMESH_Mesh::ClearSubMesh ( in long  ShapeID)
raises (SALOME::SALOME_Exception
)

Remove all nodes and elements of submesh.

◆ ConvertToStandalone()

SMESH_Group SMESH::SMESH_Mesh::ConvertToStandalone ( in SMESH_GroupBase  theGroupOn)
raises (SALOME::SALOME_Exception
)

Convert group on geometry or on filter into standalone group.

◆ CreateDimGroup()

SMESH_Group SMESH::SMESH_Mesh::CreateDimGroup ( in ListOfIDSources  aListOfGroups,
in ElementType  anElemType,
in string  name,
in NB_COMMON_NODES_ENUM  nbCommonNodes,
in boolean  underlyingOnly 
)
raises (SALOME::SALOME_Exception
)

Create a group of entities basing on nodes of other groups.

Parameters
[in]aListOfGroups- list of either groups, sub-meshes or filters.
[in]anElemType- a type of elements to include to the new group.
[in]name- a name of the new group.
[in]nbCommonNodes- criterion of inclusion of an element to the new group.
[in]underlyingOnly- if True, an element is included to the new group provided that it is based on nodes of an element of aListOfGroups
Returns
SMESH_Group - the created group

◆ CreateGroup()

SMESH_Group SMESH::SMESH_Mesh::CreateGroup ( in ElementType  elem_type,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Create a group.

◆ CreateGroupFromFilter()

SMESH_GroupOnFilter SMESH::SMESH_Mesh::CreateGroupFromFilter ( in ElementType  elemType,
in string  name,
in SMESH::Filter  filter 
)
raises (SALOME::SALOME_Exception
)

Create a group from filter.

◆ CreateGroupFromGEOM()

SMESH_GroupOnGeom SMESH::SMESH_Mesh::CreateGroupFromGEOM ( in ElementType  elemType,
in string  name,
in GEOM::GEOM_Object  geomObject 
)
raises (SALOME::SALOME_Exception
)

Create a group from geometry.

◆ CutGroups()

SMESH_Group SMESH::SMESH_Mesh::CutGroups ( in SMESH_GroupBase  aMainGroup,
in SMESH_GroupBase  aToolGroup,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Cut of two groups New group is created.

All mesh elements that are present in main group but do not present in tool group are added to the new one

◆ CutListOfGroups()

SMESH_Group SMESH::SMESH_Mesh::CutListOfGroups ( in ListOfGroups  aMainGroups,
in ListOfGroups  aToolGroups,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Cut of lists of groups New group is created.

All mesh elements that are present in main groups but do not present in tool groups are added to the new one

◆ Dump()

string SMESH::SMESH_Mesh::Dump ( )

Get mesh description.

◆ ElemNbEdges()

long SMESH::SMESH_Mesh::ElemNbEdges ( in smIdType  id)

Returns number of edges for given element.

◆ ElemNbFaces()

long SMESH::SMESH_Mesh::ElemNbFaces ( in smIdType  id)

Returns number of faces for given element.

◆ ExportCGNS()

void SMESH::SMESH_Mesh::ExportCGNS ( in SMESH_IDSource  meshPart,
in string  file,
in boolean  overwrite,
in boolean  groupElemsByType 
)
raises (SALOME::SALOME_Exception
)

◆ ExportDAT()

void SMESH::SMESH_Mesh::ExportDAT ( in string  file,
in boolean  renumer 
)
raises (SALOME::SALOME_Exception
)

Export Mesh to different Formats (UNV supported version is I-DEAS 10)

◆ ExportGMF()

void SMESH::SMESH_Mesh::ExportGMF ( in SMESH_IDSource  meshPart,
in string  file,
in boolean  withRequiredGroups 
)
raises (SALOME::SALOME_Exception
)

◆ ExportMED()

void SMESH::SMESH_Mesh::ExportMED ( in string  fileName,
in boolean  auto_groups,
in long  version,
in boolean  overwrite,
in boolean  autoDimension 
)
raises (SALOME::SALOME_Exception
)

Export a Mesh to MED file.

@params

  • fileName : name of the MED file
  • auto_groups : boolean parameter for creating/not creating the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; the typical use is auto_groups=false.
  • overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
  • version : define the version of MED file format, coded with major and minor digits (release digit not used) for instance med 3.2.1 is coded 3*10+2 = 32, med 4.0.0 is coded 4*10+0 = 40. The rules of compatibility to write a mesh in an older version than the current version depend on the current version. For instance, with med 4.0 it is possible to write/append med files in 4.0.0 (default format) or 3.2.1 or 3.3.1 formats. The minor must be between 0 and the current minor version of MED file library. If version is equal to -1, the version is not changed (default).
  • autoDimension : if true, a space dimension of a MED mesh can be either
    • 1D if all mesh nodes lie on OX coordinate axis, or
    • 2D if all mesh nodes lie on XOY coordinate plane, or
    • 3D in the rest cases. If autoDimension is false, the space dimension is always 3.

◆ ExportMEDCoupling()

long long SMESH::SMESH_Mesh::ExportMEDCoupling ( in boolean  auto_groups,
in boolean  autoDimension 
)
raises (SALOME::SALOME_Exception
)

◆ ExportPartToDAT()

void SMESH::SMESH_Mesh::ExportPartToDAT ( in SMESH_IDSource  meshPart,
in string  file,
in boolean  renumer 
)
raises (SALOME::SALOME_Exception
)

◆ ExportPartToMED()

void SMESH::SMESH_Mesh::ExportPartToMED ( in SMESH_IDSource  meshPart,
in string  fileName,
in boolean  auto_groups,
in long  version,
in boolean  overwrite,
in boolean  autoDimension,
in GEOM::ListOfFields  fields,
in string  geomAssocFields,
in double  ZTolerance,
in boolean  saveNumbers 
)
raises (SALOME::SALOME_Exception
)

Export a [part of] Mesh into a MED file @params.

  • meshPart : a part of mesh to store
  • fileName : name of the MED file
  • overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
  • version : define the version of MED file format, coded with major and minor digits (release digit not used) for instance med 3.2.1 is coded 3*10+2 = 32, med 4.0.0 is coded 4*10+0 = 40. The rules of compatibility to write a mesh in an older version than the current version depend on the current version. For instance, with med 4.0 it is possible to write/append med files in 4.0.0 (default format) or 3.2.1 or 3.3.1 formats. The minor must be between 0 and the current minor version of MED file library. If version is equal to -1, the version is not changed (default).
  • autoDimension : if True, a space dimension for export is defined by mesh configuration; for example a planar mesh lying on XOY plane will be exported as a mesh in 2D space. If autoDimension == False, the space dimension is 3.
  • fields : list of GEOM fields defined on the shape to mesh.
  • geomAssocFields : each character of this string means a need to export a corresponding field; correspondence between fields and characters is following:
    • 'v' stands for vertices field;
    • 'e' stands for edges field;
    • 'f' stands for faces field;
    • 's' stands for solids field.
  • ZTolerance : tolerance in Z direction. If Z coordinate of a node is close to zero within a given tolerance, the coordinate is set to zero. If ZTolerance is negative, the node coordinates are kept as is.
  • saveNumbers : enable saving numbers of nodes and cells.

◆ ExportPartToMEDCoupling()

long long SMESH::SMESH_Mesh::ExportPartToMEDCoupling ( in SMESH_IDSource  meshPart,
in boolean  auto_groups,
in boolean  autoDimension,
in GEOM::ListOfFields  fields,
in string  geomAssocFields,
in double  ZTolerance,
in boolean  saveNumbers 
)
raises (SALOME::SALOME_Exception
)

◆ ExportPartToSTL()

void SMESH::SMESH_Mesh::ExportPartToSTL ( in SMESH_IDSource  meshPart,
in string  file,
in boolean  isascii 
)
raises (SALOME::SALOME_Exception
)

◆ ExportPartToUNV()

void SMESH::SMESH_Mesh::ExportPartToUNV ( in SMESH_IDSource  meshPart,
in string  file,
in boolean  renumer 
)
raises (SALOME::SALOME_Exception
)

◆ ExportSTL()

void SMESH::SMESH_Mesh::ExportSTL ( in string  file,
in boolean  isascii 
)
raises (SALOME::SALOME_Exception
)

◆ ExportUNV()

void SMESH::SMESH_Mesh::ExportUNV ( in string  file,
in boolean  renumer 
)
raises (SALOME::SALOME_Exception
)

◆ FaceGroupsSeparatedByEdges()

ListOfGroups SMESH::SMESH_Mesh::FaceGroupsSeparatedByEdges ( in double  sharpAngle,
in boolean  createEdges,
in boolean  useExistingEdges 
)
raises (SALOME::SALOME_Exception
)

Distribute all faces of the mesh among groups using sharp edges and optionally existing 1D elements as group boundaries.

Parameters
[in]sharpAngle- edge is considered sharp if an angle between normals of adjacent faces is more than sharpAngle in degrees.
[in]createEdges- to create 1D elements for detected sharp edges.
[in]useExistingEdges- to use existing edges as group boundaries
Returns
ListOfGroups - the created groups

◆ FindElementByNodes()

smIdType SMESH::SMESH_Mesh::FindElementByNodes ( in smIdType_array  nodes)

Returns an element based on all given nodes.

◆ GetAutoColor()

boolean SMESH::SMESH_Mesh::GetAutoColor ( )
raises (SALOME::SALOME_Exception
)

Get flag of object's auto color mode.

◆ GetBallDiameter()

double SMESH::SMESH_Mesh::GetBallDiameter ( in smIdType  id)

Returns diameter of a ball discrete element or zero in case of an invalid id.

◆ GetComputeProgress()

double SMESH::SMESH_Mesh::GetComputeProgress ( )

Return computation progress [0.,1].

◆ GetElementGeomType()

EntityType SMESH::SMESH_Mesh::GetElementGeomType ( in smIdType  id)
raises (SALOME::SALOME_Exception
)

◆ GetElementPosition()

ElementPosition SMESH::SMESH_Mesh::GetElementPosition ( in smIdType  ElemID)

Return position of an element on shape.

◆ GetElementsByNodes()

smIdType_array SMESH::SMESH_Mesh::GetElementsByNodes ( in smIdType_array  nodes,
in ElementType  elem_type 
)

Return elements including all given nodes.

◆ GetElementsByType()

smIdType_array SMESH::SMESH_Mesh::GetElementsByType ( in ElementType  theType)
raises (SALOME::SALOME_Exception
)

◆ GetElementShape()

GeometryType SMESH::SMESH_Mesh::GetElementShape ( in smIdType  id)
raises (SALOME::SALOME_Exception
)

◆ GetElementsId()

smIdType_array SMESH::SMESH_Mesh::GetElementsId ( )
raises (SALOME::SALOME_Exception
)

◆ GetElementType()

ElementType SMESH::SMESH_Mesh::GetElementType ( in smIdType  id,
in boolean  iselem 
)
raises (SALOME::SALOME_Exception
)

Returns type of mesh element.

◆ GetElemFaceNodes()

smIdType_array SMESH::SMESH_Mesh::GetElemFaceNodes ( in smIdType  elemId,
in short  faceIndex 
)

Returns nodes of given face (counted from zero) for given volumic element.

◆ GetElemNbNodes()

short SMESH::SMESH_Mesh::GetElemNbNodes ( in smIdType  id)

Returns number of nodes for given element If there is not element for given ID - returns -1.

◆ GetElemNode()

smIdType SMESH::SMESH_Mesh::GetElemNode ( in smIdType  id,
in short  index 
)

Returns ID of node by given index for given element If there is not element for given ID - returns -1 If there is not node for given index - returns -2.

◆ GetElemNodes()

smIdType_array SMESH::SMESH_Mesh::GetElemNodes ( in smIdType  id)

Returns IDs of nodes of given element.

◆ GetFaceNormal()

double_array SMESH::SMESH_Mesh::GetFaceNormal ( in long  faceId,
in boolean  normalized 
)

Returns three components of normal of given mesh face (or an empty array in KO case)

◆ GetGroups()

ListOfGroups SMESH::SMESH_Mesh::GetGroups ( )
raises (SALOME::SALOME_Exception
)

Get the list of groups existing in the mesh.

◆ GetHypothesisList()

ListOfHypothesis SMESH::SMESH_Mesh::GetHypothesisList ( in GEOM::GEOM_Object  aSubObject)
raises (SALOME::SALOME_Exception
)

Get the list of hypothesis added on a sub-shape.

◆ GetId()

long SMESH::SMESH_Mesh::GetId ( )

Get the internal Id.

◆ GetIDs()

smIdType_array SMESH::SMESH_IDSource::GetIDs ( )
inherited

Returns a sequence of all element IDs.

◆ GetLastParameters()

string_array SMESH::SMESH_Mesh::GetLastParameters ( )

Returns list of notebook variables used for last Mesh operation.

◆ GetLog()

log_array SMESH::SMESH_Mesh::GetLog ( in boolean  clearAfterGet)
raises (SALOME::SALOME_Exception
)

Get the log of nodes and elements added or removed since previous clear of the log.

@params

  • clearAfterGet : log is emptied after Get (safe if concurrents access)

◆ GetMEDFileInfo()

MedFileInfo SMESH::SMESH_Mesh::GetMEDFileInfo ( )

Gets information about imported MED file.

◆ GetMEDVersionsCompatibleForAppend()

long_array SMESH::SMESH_Mesh::GetMEDVersionsCompatibleForAppend ( )

Return the list of med versions compatibles for write/append, encoded in 10*major+minor (for instance, code for med 3.2.1 is 32)

◆ GetMesh()

SMESH_Mesh SMESH::SMESH_IDSource::GetMesh ( )
inherited

Returns the mesh.

◆ GetMeshEditor()

SMESH_MeshEditor SMESH::SMESH_Mesh::GetMeshEditor ( )
raises (SALOME::SALOME_Exception
)

Obtain instance of SMESH_MeshEditor.

◆ GetMeshEditPreviewer()

SMESH_MeshEditor SMESH::SMESH_Mesh::GetMeshEditPreviewer ( )
raises (SALOME::SALOME_Exception
)

Return SMESH_MeshEditor that would not modify the mesh but fill MeshPreviewStruct.

◆ GetMeshInfo()

smIdType_array SMESH::SMESH_IDSource::GetMeshInfo ( )
inherited

Returns number of mesh elements of each EntityType.

Returns
array of number of elements per EntityType

◆ GetMeshOrder()

submesh_array_array SMESH::SMESH_Mesh::GetMeshOrder ( )

Return submesh objects list in meshing order.

◆ GetMeshPtr()

long long SMESH::SMESH_Mesh::GetMeshPtr ( )

Get mesh pointer.

◆ GetNbElementsByType()

smIdType_array SMESH::SMESH_IDSource::GetNbElementsByType ( )
inherited

Returns number of mesh elements of each ElementType.

Returns
array of number of elements per ElementType

◆ GetNodeInverseElements()

smIdType_array SMESH::SMESH_Mesh::GetNodeInverseElements ( in smIdType  id,
in ElementType  elemType 
)

For given node returns list of IDs of inverse elements If there is not node for given ID - returns empty list.

◆ GetNodePosition()

NodePosition SMESH::SMESH_Mesh::GetNodePosition ( in smIdType  NodeID)

Return position of a node on shape.

◆ GetNodesId()

smIdType_array SMESH::SMESH_Mesh::GetNodesId ( )
raises (SALOME::SALOME_Exception
)

◆ GetNodeXYZ()

double_array SMESH::SMESH_Mesh::GetNodeXYZ ( in smIdType  id)

Get XYZ coordinates of node as list of double If there is not node for given ID - returns empty list.

◆ GetParameters()

string SMESH::SMESH_Mesh::GetParameters ( )

Returns list of notebook variables used for Mesh operations separated by ":" symbol.

◆ GetShapeID()

long SMESH::SMESH_Mesh::GetShapeID ( in smIdType  id)

If given element is node returns IDs of shape from position If there is not node for given ID - returns -1.

◆ GetShapeIDForElem()

long SMESH::SMESH_Mesh::GetShapeIDForElem ( in smIdType  id)

For given element returns ID of result shape after ::FindShape() from SMESH_MeshEditor If there is not element for given ID - returns -1.

◆ GetShapeToMesh()

GEOM::GEOM_Object SMESH::SMESH_Mesh::GetShapeToMesh ( )
raises (SALOME::SALOME_Exception
)

Get geom shape to mesh.

A result should not be nil. Use HasShapeToMesh() to know if a returned shape

◆ GetSubMesh()

SMESH_subMesh SMESH::SMESH_Mesh::GetSubMesh ( in GEOM::GEOM_Object  aSubObject,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Get the subMesh object associated to a Sub-shape.

The subMesh object gives access to nodes and elements IDs. SubMesh will be used instead of Sub-shape in a next idl version to address a specific subMesh...

Referenced by StdMeshers_Cartesian_3D::Compute(), and StdMeshers_Cartesian_3D::setSubmeshesComputed().

◆ GetSubMeshElementsId()

smIdType_array SMESH::SMESH_Mesh::GetSubMeshElementsId ( in long  ShapeID)
raises (SALOME::SALOME_Exception
)

◆ GetSubMeshElementType()

ElementType SMESH::SMESH_Mesh::GetSubMeshElementType ( in long  ShapeID)
raises (SALOME::SALOME_Exception
)

◆ GetSubMeshes()

submesh_array SMESH::SMESH_Mesh::GetSubMeshes ( )
raises (SALOME::SALOME_Exception
)

Get the list of sub-meshes existing in the mesh.

◆ GetSubMeshNodesId()

smIdType_array SMESH::SMESH_Mesh::GetSubMeshNodesId ( in long  ShapeID,
in boolean  all 
)
raises (SALOME::SALOME_Exception
)

◆ GetTypes()

array_of_ElementType SMESH::SMESH_IDSource::GetTypes ( )
inherited

Returns types of elements it contains.

It's empty if the SMESH_IDSource contains no IDs

◆ GetVersionString()

string SMESH::SMESH_Mesh::GetVersionString ( in long  minor,
in short  nbDigits 
)

Return string representation of a MED file version comprising nbDigits.

◆ GetVtkUgStream()

SALOMEDS::TMPFile SMESH::SMESH_IDSource::GetVtkUgStream ( )
inherited

Returns mesh unstructed grid information.

◆ HasDuplicatedGroupNamesMED()

boolean SMESH::SMESH_Mesh::HasDuplicatedGroupNamesMED ( )

Check group names for duplications.

Consider maximum group name length stored in MED file.

◆ HasModificationsToDiscard()

boolean SMESH::SMESH_Mesh::HasModificationsToDiscard ( )
raises (SALOME::SALOME_Exception
)

Return true if the mesh has been edited since a total re-compute and those modifications may prevent successful partial re-compute.

◆ HasShapeToMesh()

boolean SMESH::SMESH_Mesh::HasShapeToMesh ( )
raises (SALOME::SALOME_Exception
)

Return true if there is a geometry to be meshed.

◆ IntersectGroups()

SMESH_Group SMESH::SMESH_Mesh::IntersectGroups ( in SMESH_GroupBase  aGroup1,
in SMESH_GroupBase  aGroup2,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Intersection of two groups New group is created.

All mesh elements that are present in both initial groups are added to the new one.

◆ IntersectListOfGroups()

SMESH_Group SMESH::SMESH_Mesh::IntersectListOfGroups ( in ListOfGroups  aListOfGroups,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Intersection of list of groups New group is created.

All mesh elements that are present in all initial groups simultaneously are added to the new one.

◆ IsLoaded()

boolean SMESH::SMESH_Mesh::IsLoaded ( )
raises (SALOME::SALOME_Exception
)

Return false if the mesh is not yet fully loaded from the study file.

◆ IsMediumNode()

boolean SMESH::SMESH_Mesh::IsMediumNode ( in smIdType  ide,
in smIdType  idn 
)

Returns true if given node is medium node in given quadratic element.

◆ IsMediumNodeOfAnyElem()

boolean SMESH::SMESH_Mesh::IsMediumNodeOfAnyElem ( in smIdType  idn,
in ElementType  elem_type 
)

Returns true if given node is medium node in one of quadratic elements.

◆ IsMeshInfoCorrect()

boolean SMESH::SMESH_IDSource::IsMeshInfoCorrect ( )
inherited

Returns false if GetMeshInfo() returns incorrect information that may happen if mesh data is not yet fully loaded from the file of study.

◆ IsPoly()

boolean SMESH::SMESH_Mesh::IsPoly ( in smIdType  id)

Returns true if given element is polygon.

◆ IsQuadratic()

boolean SMESH::SMESH_Mesh::IsQuadratic ( in smIdType  id)

Returns true if given element is quadratic.

◆ IsUnorderedSubMesh()

boolean SMESH::SMESH_Mesh::IsUnorderedSubMesh ( in long  submeshID)

Methods to set meshing order of submeshes.

Return true if a meshing order not yet set for a concurrent sub-mesh

◆ Load()

void SMESH::SMESH_Mesh::Load ( )
raises (SALOME::SALOME_Exception
)

Load full mesh data from the study file.

◆ Nb0DElements()

smIdType SMESH::SMESH_Mesh::Nb0DElements ( )
raises (SALOME::SALOME_Exception
)

◆ NbBalls()

smIdType SMESH::SMESH_Mesh::NbBalls ( )
raises (SALOME::SALOME_Exception
)

◆ NbBiQuadQuadrangles()

smIdType SMESH::SMESH_Mesh::NbBiQuadQuadrangles ( )
raises (SALOME::SALOME_Exception
)

◆ NbBiQuadTriangles()

smIdType SMESH::SMESH_Mesh::NbBiQuadTriangles ( )
raises (SALOME::SALOME_Exception
)

◆ NbEdges()

smIdType SMESH::SMESH_Mesh::NbEdges ( )
raises (SALOME::SALOME_Exception
)

◆ NbEdgesOfOrder()

smIdType SMESH::SMESH_Mesh::NbEdgesOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbElements()

smIdType SMESH::SMESH_Mesh::NbElements ( )
raises (SALOME::SALOME_Exception
)

◆ NbFaces()

smIdType SMESH::SMESH_Mesh::NbFaces ( )
raises (SALOME::SALOME_Exception
)

◆ NbFacesOfOrder()

smIdType SMESH::SMESH_Mesh::NbFacesOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbGroups()

long SMESH::SMESH_Mesh::NbGroups ( )
raises (SALOME::SALOME_Exception
)

Get number of groups existing in the mesh.

◆ NbHexagonalPrisms()

smIdType SMESH::SMESH_Mesh::NbHexagonalPrisms ( )
raises (SALOME::SALOME_Exception
)

◆ NbHexas()

smIdType SMESH::SMESH_Mesh::NbHexas ( )
raises (SALOME::SALOME_Exception
)

◆ NbHexasOfOrder()

smIdType SMESH::SMESH_Mesh::NbHexasOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbNodes()

smIdType SMESH::SMESH_Mesh::NbNodes ( )
raises (SALOME::SALOME_Exception
)

Get information about mesh contents.

◆ NbPolygons()

smIdType SMESH::SMESH_Mesh::NbPolygons ( )
raises (SALOME::SALOME_Exception
)

◆ NbPolygonsOfOrder()

smIdType SMESH::SMESH_Mesh::NbPolygonsOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbPolyhedrons()

smIdType SMESH::SMESH_Mesh::NbPolyhedrons ( )
raises (SALOME::SALOME_Exception
)

◆ NbPrisms()

smIdType SMESH::SMESH_Mesh::NbPrisms ( )
raises (SALOME::SALOME_Exception
)

◆ NbPrismsOfOrder()

smIdType SMESH::SMESH_Mesh::NbPrismsOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbPyramids()

smIdType SMESH::SMESH_Mesh::NbPyramids ( )
raises (SALOME::SALOME_Exception
)

◆ NbPyramidsOfOrder()

smIdType SMESH::SMESH_Mesh::NbPyramidsOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbQuadrangles()

smIdType SMESH::SMESH_Mesh::NbQuadrangles ( )
raises (SALOME::SALOME_Exception
)

◆ NbQuadranglesOfOrder()

smIdType SMESH::SMESH_Mesh::NbQuadranglesOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbSubMesh()

smIdType SMESH::SMESH_Mesh::NbSubMesh ( )
raises (SALOME::SALOME_Exception
)

◆ NbTetras()

smIdType SMESH::SMESH_Mesh::NbTetras ( )
raises (SALOME::SALOME_Exception
)

◆ NbTetrasOfOrder()

smIdType SMESH::SMESH_Mesh::NbTetrasOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbTriangles()

smIdType SMESH::SMESH_Mesh::NbTriangles ( )
raises (SALOME::SALOME_Exception
)

◆ NbTrianglesOfOrder()

smIdType SMESH::SMESH_Mesh::NbTrianglesOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ NbTriQuadraticHexas()

smIdType SMESH::SMESH_Mesh::NbTriQuadraticHexas ( )
raises (SALOME::SALOME_Exception
)

◆ NbVolumes()

smIdType SMESH::SMESH_Mesh::NbVolumes ( )
raises (SALOME::SALOME_Exception
)

◆ NbVolumesOfOrder()

smIdType SMESH::SMESH_Mesh::NbVolumesOfOrder ( in ElementOrder  order)
raises (SALOME::SALOME_Exception
)

◆ RemoveGroup()

void SMESH::SMESH_Mesh::RemoveGroup ( in SMESH_GroupBase  aGroup)
raises (SALOME::SALOME_Exception
)

Remove a group.

◆ RemoveGroupWithContents()

void SMESH::SMESH_Mesh::RemoveGroupWithContents ( in SMESH_GroupBase  aGroup)
raises (SALOME::SALOME_Exception
)

Remove group with its contents.

◆ RemoveHypothesis()

Hypothesis_Status SMESH::SMESH_Mesh::RemoveHypothesis ( in GEOM::GEOM_Object  aSubObject,
in SMESH_Hypothesis  anHyp 
)
raises (SALOME::SALOME_Exception
)

Remove an hypothesis previously added with AddHypothesis.

◆ RemoveSubMesh()

void SMESH::SMESH_Mesh::RemoveSubMesh ( in SMESH_subMesh  aSubMesh)
raises (SALOME::SALOME_Exception
)

Remove a submesh.

◆ ReplaceShape()

void SMESH::SMESH_Mesh::ReplaceShape ( in GEOM::GEOM_Object  theNewGeom)
raises (SALOME::SALOME_Exception
)

Replaces a shape in the mesh.

◆ SetAutoColor()

void SMESH::SMESH_Mesh::SetAutoColor ( in boolean  theAutoColor)
raises (SALOME::SALOME_Exception
)

Toggle auto color mode on the object.

@params

  • theAutoColor : flag which toggles auto color mode.

◆ SetMeshOrder()

boolean SMESH::SMESH_Mesh::SetMeshOrder ( in submesh_array_array  theSubMeshArray)

Set submesh object order.

◆ SetParameters()

void SMESH::SMESH_Mesh::SetParameters ( in string  theParameters)

Sets list of notebook variables used for Mesh operations separated by ":" symbol.

Parameters
theParametersis a string containing the notebook variables

◆ UnionGroups()

SMESH_Group SMESH::SMESH_Mesh::UnionGroups ( in SMESH_GroupBase  aGroup1,
in SMESH_GroupBase  aGroup2,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Union of two groups New group is created.

All mesh elements that are present in initial groups are added to the new one

◆ UnionListOfGroups()

SMESH_Group SMESH::SMESH_Mesh::UnionListOfGroups ( in ListOfGroups  aListOfGroups,
in string  name 
)
raises (SALOME::SALOME_Exception
)

Union of list of groups New group is created.

All mesh elements that are present in initial groups are added to the new one