Version: 8.3.0
SMESH_Mesh_i Class Reference

#include <SMESH_Mesh_i.hxx>

Inheritance diagram for SMESH_Mesh_i:

Data Structures

struct  TGeomGroupData
 

Public Member Functions

 SMESH_Mesh_i (PortableServer::POA_ptr thePOA, SMESH_Gen_i *myGen_i, CORBA::Long studyId)
 Constructor. More...
 
virtual ~SMESH_Mesh_i ()
 Destructor. More...
 
void SetShape (GEOM::GEOM_Object_ptr theShapeObject) throw (SALOME::SALOME_Exception)
 SetShape. More...
 
CORBA::Boolean HasShapeToMesh () throw (SALOME::SALOME_Exception)
 return true if mesh has a shape to build a shape on More...
 
GEOM::GEOM_Object_ptr GetShapeToMesh () throw (SALOME::SALOME_Exception)
 
CORBA::Boolean IsLoaded () throw (SALOME::SALOME_Exception)
 Return false if the mesh is not yet fully loaded from the study file. More...
 
void Load () throw (SALOME::SALOME_Exception)
 Load full mesh data from the study file. More...
 
void Clear () throw (SALOME::SALOME_Exception)
 Remove all nodes and elements. More...
 
void ClearSubMesh (CORBA::Long ShapeID) throw (SALOME::SALOME_Exception)
 Remove all nodes and elements for indicated shape. More...
 
SMESH::Hypothesis_Status AddHypothesis (GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp, CORBA::String_out anErrorText) throw (SALOME::SALOME_Exception)
 AddHypothesis. More...
 
SMESH::Hypothesis_Status RemoveHypothesis (GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp) throw (SALOME::SALOME_Exception)
 
SMESH::ListOfHypothesisGetHypothesisList (GEOM::GEOM_Object_ptr aSubShape) throw (SALOME::SALOME_Exception)
 
SMESH::submesh_arrayGetSubMeshes () throw (SALOME::SALOME_Exception)
 
SMESH::SMESH_subMesh_ptr GetSubMesh (GEOM::GEOM_Object_ptr aSubShape, const char *theName) throw (SALOME::SALOME_Exception)
 
void RemoveSubMesh (SMESH::SMESH_subMesh_ptr theSubMesh) throw (SALOME::SALOME_Exception)
 
SMESH::SMESH_Group_ptr CreateGroup (SMESH::ElementType theElemType, const char *theName) throw (SALOME::SALOME_Exception)
 
SMESH::SMESH_GroupOnGeom_ptr CreateGroupFromGEOM (SMESH::ElementType theElemType, const char *theName, GEOM::GEOM_Object_ptr theGeomObj) throw (SALOME::SALOME_Exception)
 
SMESH::SMESH_GroupOnFilter_ptr CreateGroupFromFilter (SMESH::ElementType theElemType, const char *theName, SMESH::Filter_ptr theFilter) throw (SALOME::SALOME_Exception)
 Creates a group whose contents is defined by filter. More...
 
void RemoveGroup (SMESH::SMESH_GroupBase_ptr theGroup) throw (SALOME::SALOME_Exception)
 
void RemoveGroupWithContents (SMESH::SMESH_GroupBase_ptr theGroup) throw (SALOME::SALOME_Exception)
 Remove group with its contents. More...
 
SMESH::ListOfGroupsGetGroups () throw (SALOME::SALOME_Exception)
 Get the list of groups existing in the mesh. More...
 
CORBA::Long NbGroups () throw (SALOME::SALOME_Exception)
 Get number of groups existing in the mesh. More...
 
SMESH::SMESH_Group_ptr UnionGroups (SMESH::SMESH_GroupBase_ptr theGroup1, SMESH::SMESH_GroupBase_ptr theGroup2, const char *theName) throw (SALOME::SALOME_Exception)
 New group including all mesh elements present in initial groups is created. More...
 
SMESH::SMESH_Group_ptr UnionListOfGroups (const SMESH::ListOfGroups &theGroups, const char *theName) throw (SALOME::SALOME_Exception)
 New group including all mesh elements present in initial groups is created. More...
 
SMESH::SMESH_Group_ptr IntersectGroups (SMESH::SMESH_GroupBase_ptr theGroup1, SMESH::SMESH_GroupBase_ptr theGroup2, const char *theName) throw (SALOME::SALOME_Exception)
 New group is created. More...
 
SMESH::SMESH_Group_ptr IntersectListOfGroups (const SMESH::ListOfGroups &theGroups, const char *theName) throw (SALOME::SALOME_Exception)
 Intersect list of groups. More...
 
SMESH::SMESH_Group_ptr CutGroups (SMESH::SMESH_GroupBase_ptr theGroup1, SMESH::SMESH_GroupBase_ptr theGroup2, const char *theName) throw (SALOME::SALOME_Exception)
 New group is created. More...
 
SMESH::SMESH_Group_ptr CutListOfGroups (const SMESH::ListOfGroups &theMainGroups, const SMESH::ListOfGroups &theToolGroups, const char *theName) throw (SALOME::SALOME_Exception)
 Cut lists of groups. More...
 
SMESH::SMESH_Group_ptr CreateDimGroup (const SMESH::ListOfIDSources &theGroups, SMESH::ElementType theElemType, const char *theName, SMESH::NB_COMMON_NODES_ENUM theNbCommonNodes, CORBA::Boolean theUnderlyingOnly) throw (SALOME::SALOME_Exception)
 Create a group of entities basing on nodes of other groups. More...
 
SMESH::SMESH_Group_ptr ConvertToStandalone (SMESH::SMESH_GroupBase_ptr theGroupOn) throw (SALOME::SALOME_Exception)
 Create standalone group from a group on geometry or filter. More...
 
SMESH::log_arrayGetLog (CORBA::Boolean clearAfterGet) throw (SALOME::SALOME_Exception)
 
SMESH::SMESH_MeshEditor_ptr GetMeshEditor () throw (SALOME::SALOME_Exception)
 Return mesh editor. More...
 
SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer () throw (SALOME::SALOME_Exception)
 Return mesh edition previewer. More...
 
CORBA::Boolean HasModificationsToDiscard () throw (SALOME::SALOME_Exception)
 Return true if the mesh has been edited since a last total re-compute and those modifications may prevent successful partial re-compute. More...
 
void ClearLog () throw (SALOME::SALOME_Exception)
 
CORBA::Long GetId () throw (SALOME::SALOME_Exception)
 
CORBA::Long GetStudyId () throw (SALOME::SALOME_Exception)
 
void SetImpl (::SMESH_Mesh *impl)
 
::SMESH_MeshGetImpl ()
 
SMESH_Gen_iGetGen ()
 
int ImportUNVFile (const char *theFileName) throw (SALOME::SALOME_Exception)
 ImportUNVFile. More...
 
int ImportSTLFile (const char *theFileName) throw (SALOME::SALOME_Exception)
 ImportSTLFile. More...
 
SMESH::ComputeErrorImportGMFFile (const char *theFileName, bool theMakeRequiredGroups) throw (SALOME::SALOME_Exception)
 Imports data from a GMF file and returns an error description. More...
 
SMESH::DriverMED_ReadStatus ImportMEDFile (const char *theFileName, const char *theMeshName) throw (SALOME::SALOME_Exception)
 consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value More...
 
SMESH::DriverMED_ReadStatus ImportCGNSFile (const char *theFileName, const int theMeshIndex, std::string &theMeshName) throw (SALOME::SALOME_Exception)
 Imports mesh data from the CGNS file. More...
 
void SetAutoColor (CORBA::Boolean theAutoColor) throw (SALOME::SALOME_Exception)
 Auto color. More...
 
CORBA::Boolean GetAutoColor () throw (SALOME::SALOME_Exception)
 Returns true if auto-color mode is on. More...
 
CORBA::Boolean HasDuplicatedGroupNamesMED ()
 Check group names for duplications. More...
 
char * GetVersionString (SMESH::MED_VERSION version, CORBA::Short nbDigits)
 Return string representation of a MED file version comprising nbDigits. More...
 
void ExportToMEDX (const char *file, CORBA::Boolean auto_groups, SMESH::MED_VERSION version, CORBA::Boolean overwrite, CORBA::Boolean autoDimension=true) throw (SALOME::SALOME_Exception)
 Export to med file. More...
 
void ExportToMED (const char *file, CORBA::Boolean auto_groups, SMESH::MED_VERSION version) throw (SALOME::SALOME_Exception)
 Export a mesh to a med file. More...
 
void ExportMED (const char *file, CORBA::Boolean auto_groups) throw (SALOME::SALOME_Exception)
 Export a mesh to a med file. More...
 
void ExportSAUV (const char *file, CORBA::Boolean auto_groups) throw (SALOME::SALOME_Exception)
 Export a mesh to a SAUV file. More...
 
void ExportDAT (const char *file) throw (SALOME::SALOME_Exception)
 Export a mesh to a DAT file. More...
 
void ExportUNV (const char *file) throw (SALOME::SALOME_Exception)
 Export a mesh to an UNV file. More...
 
void ExportSTL (const char *file, bool isascii) throw (SALOME::SALOME_Exception)
 Export a mesh to an STL file. More...
 
void ExportCGNS (SMESH::SMESH_IDSource_ptr meshPart, const char *file, CORBA::Boolean overwrite) throw (SALOME::SALOME_Exception)
 Export a part of mesh to an STL file. More...
 
void ExportGMF (SMESH::SMESH_IDSource_ptr meshPart, const char *file, CORBA::Boolean withRequiredGroups) throw (SALOME::SALOME_Exception)
 Export a part of mesh to a GMF file. More...
 
void ExportPartToMED (SMESH::SMESH_IDSource_ptr meshPart, const char *file, CORBA::Boolean auto_groups, SMESH::MED_VERSION version, CORBA::Boolean overwrite, CORBA::Boolean autoDim, const GEOM::ListOfFields &fields, const char *geomAssocFields) throw (SALOME::SALOME_Exception)
 Export a part of mesh to a med file. More...
 
void ExportPartToDAT (SMESH::SMESH_IDSource_ptr meshPart, const char *file) throw (SALOME::SALOME_Exception)
 Export a part of mesh to a DAT file. More...
 
void ExportPartToUNV (SMESH::SMESH_IDSource_ptr meshPart, const char *file) throw (SALOME::SALOME_Exception)
 Export a part of mesh to an UNV file. More...
 
void ExportPartToSTL (SMESH::SMESH_IDSource_ptr meshPart, const char *file, CORBA::Boolean isascii) throw (SALOME::SALOME_Exception)
 Export a part of mesh to an STL file. More...
 
CORBA::Double GetComputeProgress ()
 Return computation progress [0.,1]. More...
 
CORBA::Long NbNodes () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbElements () throw (SALOME::SALOME_Exception)
 
CORBA::Long Nb0DElements () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbBalls () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbEdges () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbEdgesOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbFaces () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbFacesOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbTriangles () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbTrianglesOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbBiQuadTriangles () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbQuadrangles () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbQuadranglesOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbBiQuadQuadrangles () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPolygons () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPolygonsOfOrder (SMESH::ElementOrder order=SMESH::ORDER_ANY) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbVolumes () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbVolumesOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbTetras () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbTetrasOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbHexas () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbHexasOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbTriQuadraticHexas () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPyramids () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPyramidsOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPrisms () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPrismsOfOrder (SMESH::ElementOrder order) throw (SALOME::SALOME_Exception)
 
CORBA::Long NbHexagonalPrisms () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbPolyhedrons () throw (SALOME::SALOME_Exception)
 
CORBA::Long NbSubMesh () throw (SALOME::SALOME_Exception)
 Returns nb of published sub-meshes. More...
 
SMESH::long_arrayGetElementsId () throw (SALOME::SALOME_Exception)
 Returns ids of all elements. More...
 
SMESH::long_arrayGetElementsByType (SMESH::ElementType theElemType) throw (SALOME::SALOME_Exception)
 Returns ids of all elements of given type. More...
 
SMESH::long_arrayGetNodesId () throw (SALOME::SALOME_Exception)
 Returns ids of all nodes. More...
 
SMESH::ElementType GetElementType (CORBA::Long id, bool iselem) throw (SALOME::SALOME_Exception)
 
SMESH::EntityType GetElementGeomType (CORBA::Long id) throw (SALOME::SALOME_Exception)
 
SMESH::GeometryType GetElementShape (CORBA::Long id) throw (SALOME::SALOME_Exception)
 
SMESH::long_arrayGetSubMeshElementsId (CORBA::Long ShapeID) throw (SALOME::SALOME_Exception)
 Returns ID of elements for given submesh. More...
 
SMESH::long_arrayGetSubMeshNodesId (CORBA::Long ShapeID, CORBA::Boolean all) throw (SALOME::SALOME_Exception)
 Returns ID of nodes for given submesh If param all==true - returns all nodes, else - returns only nodes on shapes. More...
 
SMESH::ElementType GetSubMeshElementType (CORBA::Long ShapeID) throw (SALOME::SALOME_Exception)
 Returns type of elements for given submesh. More...
 
char * Dump ()
 Dumps mesh into a string. More...
 
SMESH::ListOfGroupsMakeGroupsOfBadInputElements (int theSubShapeID, const char *theGroupName) throw (SALOME::SALOME_Exception)
 Create a group of elements preventing computation of a sub-shape. More...
 
SMESH_Hypothesis::Hypothesis_Status addHypothesis (GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp, std::string *anErrorText=0)
 
SMESH_Hypothesis::Hypothesis_Status removeHypothesis (GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp)
 
SMESH::SMESH_subMesh_ptr createSubMesh (GEOM::GEOM_Object_ptr theSubShapeObject)
 
bool removeSubMesh (SMESH::SMESH_subMesh_ptr theSubMesh, GEOM::GEOM_Object_ptr theSubShapeObject)
 
SMESH::SMESH_GroupBase_ptr createGroup (SMESH::ElementType theElemType, const char *theName, const TopoDS_Shape &theShape=TopoDS_Shape(), const SMESH_PredicatePtr &thePred=SMESH_PredicatePtr())
 
void removeGroup (const int theId)
 SMESH_Mesh_i::removeGroup. More...
 
SMESH::SMESH_subMesh_ptr getSubMesh (int shapeID)
 
const std::map< int,
SMESH::SMESH_GroupBase_ptr > & 
getGroups ()
 
void onHypothesisModified ()
 callback from _impl to forget not loaded mesh data (issue 0021208) More...
 
void checkMeshLoaded ()
 
void CheckGeomModif ()
 Update data if geometry changes. More...
 
void CheckGeomGroupModif ()
 Update hypotheses assigned to geom groups if the latter change. More...
 
CORBA::LongLong GetMeshPtr ()
 Returns pointer to _impl as an integer value. More...
 
void CreateGroupServants ()
 Assure that all groups are published. More...
 
SMESH::ListOfGroupsGetGroups (const std::list< int > &groupIDs) const
 Return groups cantained in _mapGroups by their IDs. More...
 
SMESH::double_arrayGetNodeXYZ (CORBA::Long id)
 Get XYZ coordinates of node as list of double If there is not node for given ID - returns empty list. More...
 
SMESH::long_arrayGetNodeInverseElements (CORBA::Long id)
 For given node returns list of IDs of inverse elements If there is not node for given ID - returns empty list. More...
 
SMESH::NodePositionGetNodePosition (CORBA::Long NodeID)
 Return position of a node on shape. More...
 
SMESH::ElementPosition GetElementPosition (CORBA::Long ElemID)
 Return position of an element on shape. More...
 
CORBA::Long GetShapeID (CORBA::Long id)
 If given element is node returns IDs of shape from position If there is not node for given ID - returns -1. More...
 
CORBA::Long GetShapeIDForElem (CORBA::Long 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...
 
CORBA::Long GetElemNbNodes (CORBA::Long id)
 Returns number of nodes for given element If there is not element for given ID - returns -1. More...
 
SMESH::long_arrayGetElemNodes (CORBA::Long id)
 Returns IDs of nodes of given element. More...
 
CORBA::Long GetElemNode (CORBA::Long id, CORBA::Long 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...
 
CORBA::Boolean IsMediumNode (CORBA::Long ide, CORBA::Long idn)
 Returns true if given node is medium node in given quadratic element. More...
 
CORBA::Boolean IsMediumNodeOfAnyElem (CORBA::Long idn, SMESH::ElementType theElemType)
 Returns true if given node is medium node in one of quadratic elements. More...
 
CORBA::Long ElemNbEdges (CORBA::Long id)
 Returns number of edges for given element. More...
 
CORBA::Long ElemNbFaces (CORBA::Long id)
 Returns number of faces for given element. More...
 
SMESH::long_arrayGetElemFaceNodes (CORBA::Long elemId, CORBA::Short faceIndex)
 Returns nodes of given face (counted from zero) for given element. More...
 
SMESH::double_arrayGetFaceNormal (CORBA::Long faceId, CORBA::Boolean normalized)
 Returns three components of normal of given mesh face (or an empty array in KO case) More...
 
CORBA::Long FindElementByNodes (const SMESH::long_array &nodes)
 Returns an element based on all given nodes. More...
 
CORBA::Boolean IsPoly (CORBA::Long id)
 Returns true if given element is polygon. More...
 
CORBA::Boolean IsQuadratic (CORBA::Long id)
 Returns true if given element is quadratic. More...
 
CORBA::Double GetBallDiameter (CORBA::Long id)
 Returns diameter of ball discrete element or zero in case of an invalid id. More...
 
SMESH::double_arrayBaryCenter (CORBA::Long id)
 Returns bary center for given element. More...
 
virtual SMESH::MedFileInfoGetMEDFileInfo ()
 Returns information about imported MED file. More...
 
void SetParameters (const char *theParameters)
 Sets list of notebook variables used for Mesh operations separated by ":" symbol. More...
 
char * GetParameters ()
 Returns list of notebook variables used for Mesh operations separated by ":" symbol. More...
 
SMESH::string_arrayGetLastParameters ()
 Returns list of notebook variables used for last Mesh operation. More...
 
CORBA::Boolean IsUnorderedSubMesh (CORBA::Long submeshID)
 Return true if a meshing order not yet set for a concurrent sub-mesh. More...
 
virtual
SMESH::submesh_array_array
GetMeshOrder ()
 Return submesh objects list in meshing order. More...
 
virtual ::CORBA::Boolean SetMeshOrder (const SMESH::submesh_array_array &theSubMeshArray)
 Set submesh object order. More...
 
virtual SMESH::long_arrayGetIDs ()
 Method of SMESH_IDSource interface. More...
 
virtual SMESH::long_arrayGetMeshInfo ()
 Returns number of mesh elements of each EntityType Result array of number of elements per EntityType Inherited from SMESH_IDSource. More...
 
virtual SMESH::long_arrayGetNbElementsByType ()
 Returns number of mesh elements of each ElementType. More...
 
virtual
SMESH::array_of_ElementType
GetTypes ()
 Returns types of elements it contains. More...
 
virtual SMESH::SMESH_Mesh_ptr GetMesh ()
 Returns self. More...
 
bool 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...
 
virtual SALOMEDS::TMPFile * GetVtkUgStream ()
 Returns mesh unstructed grid information. More...
 

Static Public Member Functions

static SMESH::Hypothesis_Status ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus)
 
static void PrepareForWriting (const char *file, bool overwrite=true)
 Care of a file before exporting mesh into it. More...
 
static void CollectMeshInfo (const SMDS_ElemIteratorPtr theItr, SMESH::long_array &theInfo)
 Collect statistic of mesh elements given by iterator. More...
 
static SMDS_ElemIteratorPtr GetElements (SMESH::SMESH_IDSource_ptr obj, SMESH::ElementType type)
 Return iterator on elements of given type in given object. More...
 

Data Fields

std::map< int, SMESH_subMesh_i * > _mapSubMesh_i
 
std::map< int,::SMESH_subMesh * > _mapSubMesh
 

Private Member Functions

 SMESH_Mesh_i ()
 
 SMESH_Mesh_i (const SMESH_Mesh_i &)
 
std::string prepareMeshNameAndGroups (const char *file, CORBA::Boolean overwrite)
 Prepares a file for export and pass names of mesh groups from study to mesh DS. More...
 
void checkGroupNames ()
 Check and correct names of mesh groups. More...
 
void exportMEDFields (DriverMED_W_Field &writer, SMESHDS_Mesh *meshDS, const GEOM::ListOfFields &fields, const char *geomAssocFields)
 Write GEOM fields to MED file. More...
 
void convertMeshOrder (const TListOfListOfInt &theIdsOrder, SMESH::submesh_array_array &theSubMeshOrder, const bool theIsDump)
 Convert submesh ids into submesh interfaces. More...
 
TListOfListOfInt findConcurrentSubMeshes ()
 Finds concurrent sub-meshes. More...
 
SMESH_PreMeshInfo *& changePreMeshInfo ()
 
void addGeomGroupData (GEOM::GEOM_Object_ptr theGeomObj, CORBA::Object_ptr theSmeshObj)
 Remember GEOM group data. More...
 
void removeGeomGroupData (CORBA::Object_ptr theSmeshObj)
 Remove GEOM group data relating to removed smesh object. More...
 
TopoDS_Shape newGroupShape (TGeomGroupData &groupData)
 Return new group contents if it has been changed and update group data. More...
 

Private Attributes

::SMESH_Mesh_impl
 
SMESH_Gen_i_gen_i
 
int _id
 
int _studyId
 
std::map< int,
SMESH::SMESH_subMesh_ptr > 
_mapSubMeshIor
 
std::map< int,
SMESH::SMESH_GroupBase_ptr > 
_mapGroups
 
std::map< int,
SMESH::SMESH_Hypothesis_ptr > 
_mapHypo
 
SMESH_MeshEditor_i_editor
 
SMESH_MeshEditor_i_previewEditor
 
SMESH::MedFileInfo_var _medFileInfo
 
SMESH_PreMeshInfo_preMeshInfo
 
std::list< TGeomGroupData_geomGroupData
 
int _mainShapeTick
 

Static Private Attributes

static int _idGenerator = 0
 

Friends

class SMESH_PreMeshInfo
 

Constructor & Destructor Documentation

SMESH_Mesh_i::SMESH_Mesh_i ( )
private
SMESH_Mesh_i::SMESH_Mesh_i ( const SMESH_Mesh_i )
private
SMESH_Mesh_i::SMESH_Mesh_i ( PortableServer::POA_ptr  thePOA,
SMESH_Gen_i myGen_i,
CORBA::Long  studyId 
)
SMESH_Mesh_i::~SMESH_Mesh_i ( )
virtual

Member Function Documentation

void SMESH_Mesh_i::addGeomGroupData ( GEOM::GEOM_Object_ptr  theGeomObj,
CORBA::Object_ptr  theSmeshObj 
)
private
SMESH::Hypothesis_Status SMESH_Mesh_i::AddHypothesis ( GEOM::GEOM_Object_ptr  aSubShape,
SMESH::SMESH_Hypothesis_ptr  anHyp,
CORBA::String_out  anErrorText 
) throw (SALOME::SALOME_Exception)

AddHypothesis.

calls internal addHypothesis() and then adds a reference to <anHyp> under the SObject actually having a reference to <aSubShape>. NB: For this method to work, it is necessary to add a reference to sub-shape first.

References SMESH_Hypothesis::IsStatusFatal(), and MESSAGE.

SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh_i::addHypothesis ( GEOM::GEOM_Object_ptr  aSubShape,
SMESH::SMESH_Hypothesis_ptr  anHyp,
std::string *  anErrorText = 0 
)
void SMESH_Mesh_i::CheckGeomGroupModif ( )

Update hypotheses assigned to geom groups if the latter change.

Update objects depending on changed geom groups.

NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"

NPAL16168: geometrical group edition from a submesh don't modifiy mesh computation issue 0020210: Update of a smesh group after modification of the associated geom group

References _gen_i, _geomGroupData, _impl, _mapGroups, _mapSubMesh, _mapSubMesh_i, _mapSubMeshIor, _preMeshInfo, SMESH_GroupBase_i::changeLocalId(), SMESH_PreMeshInfo::ForgetOrLoad(), SMESH_Gen_i::GetCurrentStudy(), SMESHDS_Mesh::GetGroups(), SMESHDS_Mesh::GetHypothesis(), SMESH_GroupBase_i::GetLocalID(), SMESHDS_GroupOnGeom::GetShape(), SMESHDS_Mesh::IndexToShape(), SMESHDS_Mesh::MaxShapeIndex(), NbElements(), NbNodes(), newGroupShape(), SMESH_Gen_i::ObjectToSObject(), RemoveGroup(), RemoveSubMesh(), SMESH_Gen_i::SetPixMap(), SMESHDS_GroupOnGeom::SetShape(), SMESHDS_Mesh::ShapeToIndex(), and SMESHDS_Mesh::ShapeToMesh().

Referenced by CheckGeomModif().

void SMESH_Mesh_i::checkGroupNames ( )
private

Check and correct names of mesh groups.

Pass names of mesh groups from study to mesh DS.

References _gen_i, SMESH_Gen_i::GetCurrentStudy(), GetGroups(), NbGroups(), and SMESH_Gen_i::ObjectToSObject().

Referenced by prepareMeshNameAndGroups().

void SMESH_Mesh_i::checkMeshLoaded ( )
void SMESH_Mesh_i::Clear ( ) throw (SALOME::SALOME_Exception)

Remove all nodes and elements.

References _impl, _preMeshInfo, and SMESH_PreMeshInfo::ForgetOrLoad().

void SMESH_Mesh_i::ClearLog ( ) throw (SALOME::SALOME_Exception)
void SMESH_Mesh_i::ClearSubMesh ( CORBA::Long  ShapeID) throw (SALOME::SALOME_Exception)

Remove all nodes and elements for indicated shape.

void SMESH_Mesh_i::CollectMeshInfo ( const SMDS_ElemIteratorPtr  theItr,
SMESH::long_array theInfo 
)
static

Collect statistic of mesh elements given by iterator.

Referenced by SMESH_GroupBase_i::GetMeshInfo(), and SMESH_subMesh_i::GetMeshInfo().

void SMESH_Mesh_i::convertMeshOrder ( const TListOfListOfInt theIdsOrder,
SMESH::submesh_array_array theSubMeshOrder,
const bool  theIsDump 
)
private

Convert submesh ids into submesh interfaces.

References _mapSubMeshIor.

Referenced by GetMeshOrder().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone ( SMESH::SMESH_GroupBase_ptr  theGroupOn) throw (SALOME::SALOME_Exception)

Create standalone group from a group on geometry or filter.

References SMESH_GroupBase_i::GetLocalID(), SMESH_Gen_i::GetPOA(), SMESH_GroupBase_i::GetTypes(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup ( const SMESH::ListOfIDSources theGroups,
SMESH::ElementType  theElemType,
const char *  theName,
SMESH::NB_COMMON_NODES_ENUM  theNbCommonNodes,
CORBA::Boolean  theUnderlyingOnly 
) throw (SALOME::SALOME_Exception)

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

Parameters
[in]theGroups- list of either groups, sub-meshes or filters.
[in]anElemType- a type of elements to include to the new group.
[in]theName- a name of the new group.
[in]theNbCommonNodes- criterion of inclusion of an element to the new group.
[in]theUnderlyingOnly- 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

References SMDS_MeshGroup::Add(), SMESH::ALL, SMESH::ALL_NODES, SMESH::AT_LEAST_ONE, SMDS_MeshElement::begin_nodes(), SMDS_MeshElement::end_nodes(), SMDS_Mesh::FindNode(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), SMESHDS_GroupBase::GetMesh(), SMESH::MAIN, SMESH::MAJORITY, SMDS_Mesh::MaxElementID(), SMDS_MeshElement::NbCornerNodes(), SMDS_MeshElement::NbNodes(), SMESH::NODE, SMDS_MeshElement::nodeIterator(), SMDS_MeshElement::nodesIterator(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateGroup ( SMESH::ElementType  theElemType,
const char *  theName 
) throw (SALOME::SALOME_Exception)
SMESH::SMESH_GroupBase_ptr SMESH_Mesh_i::createGroup ( SMESH::ElementType  theElemType,
const char *  theName,
const TopoDS_Shape &  theShape = TopoDS_Shape(),
const SMESH_PredicatePtr thePred = SMESH_PredicatePtr() 
)
SMESH::SMESH_GroupOnFilter_ptr SMESH_Mesh_i::CreateGroupFromFilter ( SMESH::ElementType  theElemType,
const char *  theName,
SMESH::Filter_ptr  theFilter 
) throw (SALOME::SALOME_Exception)

Creates a group whose contents is defined by filter.

Parameters
theElemType- group type
theName- group name
theFilter- the filter
Return values
SMESH::SMESH_GroupOnFilter_ptr- group defined by filter

References SMESH_GroupOnFilter_i::GetPredicate().

SMESH::SMESH_GroupOnGeom_ptr SMESH_Mesh_i::CreateGroupFromGEOM ( SMESH::ElementType  theElemType,
const char *  theName,
GEOM::GEOM_Object_ptr  theGeomObj 
) throw (SALOME::SALOME_Exception)
SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh ( GEOM::GEOM_Object_ptr  theSubShapeObject)
SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutGroups ( SMESH::SMESH_GroupBase_ptr  theGroup1,
SMESH::SMESH_GroupBase_ptr  theGroup2,
const char *  theName 
) throw (SALOME::SALOME_Exception)

New group is created.

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

References SMDS_MeshGroup::Add(), SMESHDS_GroupBase::Contains(), SMESHDS_GroupBase::GetElements(), SMESHDS_Group::SMDSGroup(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutListOfGroups ( const SMESH::ListOfGroups theMainGroups,
const SMESH::ListOfGroups theToolGroups,
const char *  theName 
) throw (SALOME::SALOME_Exception)

Cut 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

Parameters
theMainGroupslist of main groups
theToolGroupslist of tool groups
theNamename of group to be created
Returns
pointer on the group

References SMDS_MeshGroup::Add(), SMESH::ALL, SMESHDS_Group::SMDSGroup(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

char * SMESH_Mesh_i::Dump ( )

Dumps mesh into a string.

References _impl.

CORBA::Long SMESH_Mesh_i::ElemNbEdges ( CORBA::Long  id)
CORBA::Long SMESH_Mesh_i::ElemNbFaces ( CORBA::Long  id)
void SMESH_Mesh_i::ExportCGNS ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file,
CORBA::Boolean  overwrite 
) throw (SALOME::SALOME_Exception)

Export a part of mesh to an STL file.

void SMESH_Mesh_i::ExportDAT ( const char *  file) throw (SALOME::SALOME_Exception)

Export a mesh to a DAT file.

void SMESH_Mesh_i::ExportGMF ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file,
CORBA::Boolean  withRequiredGroups 
) throw (SALOME::SALOME_Exception)

Export a part of mesh to a GMF file.

void SMESH_Mesh_i::ExportMED ( const char *  file,
CORBA::Boolean  auto_groups 
) throw (SALOME::SALOME_Exception)

Export a mesh to a med file.

References SMESH::MED_V2_2.

void SMESH_Mesh_i::ExportPartToDAT ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file 
) throw (SALOME::SALOME_Exception)

Export a part of mesh to a DAT file.

void SMESH_Mesh_i::ExportPartToMED ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file,
CORBA::Boolean  auto_groups,
SMESH::MED_VERSION  version,
CORBA::Boolean  overwrite,
CORBA::Boolean  autoDim,
const GEOM::ListOfFields &  fields,
const char *  geomAssocFields 
) throw (SALOME::SALOME_Exception)
void SMESH_Mesh_i::ExportPartToSTL ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file,
CORBA::Boolean  isascii 
) throw (SALOME::SALOME_Exception)

Export a part of mesh to an STL file.

void SMESH_Mesh_i::ExportPartToUNV ( SMESH::SMESH_IDSource_ptr  meshPart,
const char *  file 
) throw (SALOME::SALOME_Exception)

Export a part of mesh to an UNV file.

void SMESH_Mesh_i::ExportSAUV ( const char *  file,
CORBA::Boolean  auto_groups 
) throw (SALOME::SALOME_Exception)

Export a mesh to a SAUV file.

void SMESH_Mesh_i::ExportSTL ( const char *  file,
bool  isascii 
) throw (SALOME::SALOME_Exception)

Export a mesh to an STL file.

void SMESH_Mesh_i::ExportToMED ( const char *  file,
CORBA::Boolean  auto_groups,
SMESH::MED_VERSION  version 
) throw (SALOME::SALOME_Exception)

Export a mesh to a med file.

void SMESH_Mesh_i::ExportToMEDX ( const char *  file,
CORBA::Boolean  auto_groups,
SMESH::MED_VERSION  version,
CORBA::Boolean  overwrite,
CORBA::Boolean  autoDimension = true 
) throw (SALOME::SALOME_Exception)

Export to med file.

References SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

void SMESH_Mesh_i::ExportUNV ( const char *  file) throw (SALOME::SALOME_Exception)

Export a mesh to an UNV file.

TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes ( )
private

Finds concurrent sub-meshes.

References _mapSubMesh, GetImpl(), and SMESHDS_Hypothesis::PARAM_ALGO.

Referenced by GetMeshOrder(), and IsUnorderedSubMesh().

CORBA::Long SMESH_Mesh_i::FindElementByNodes ( const SMESH::long_array nodes)

Returns an element based on all given nodes.

References _impl, _preMeshInfo, SMESH_PreMeshInfo::FullLoadFromFile(), SMDS_MeshElement::GetID(), ORDER_QUADRATIC, and SMDSAbs_All.

CORBA::Boolean SMESH_Mesh_i::GetAutoColor ( ) throw (SALOME::SALOME_Exception)

Returns true if auto-color mode is on.

References _impl.

Referenced by SMESH_Gen_i::Save().

CORBA::Double SMESH_Mesh_i::GetBallDiameter ( CORBA::Long  id)

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

References _impl, _preMeshInfo, and SMESH_PreMeshInfo::FullLoadFromFile().

CORBA::Double SMESH_Mesh_i::GetComputeProgress ( )

Return computation progress [0.,1].

References _impl, SMESH::doNothing(), SMESH_CATCH, and SMESH_TRY.

SMESH::EntityType SMESH_Mesh_i::GetElementGeomType ( CORBA::Long  id) throw (SALOME::SALOME_Exception)
SMESH::long_array * SMESH_Mesh_i::GetElementsByType ( SMESH::ElementType  theElemType) throw (SALOME::SALOME_Exception)

Returns ids of all elements of given type.

References SMESH::ALL, SMDS_Mesh::elementsIterator(), and SMESH::NODE.

SMESH::GeometryType SMESH_Mesh_i::GetElementShape ( CORBA::Long  id) throw (SALOME::SALOME_Exception)
SMESH::long_array * SMESH_Mesh_i::GetElementsId ( ) throw (SALOME::SALOME_Exception)

Returns ids of all elements.

References _impl, _preMeshInfo, SMDS_Mesh::elementsIterator(), SMESH_PreMeshInfo::FullLoadFromFile(), and NbElements().

Referenced by GetIDs().

SMESH::ElementType SMESH_Mesh_i::GetElementType ( CORBA::Long  id,
bool  iselem 
) throw (SALOME::SALOME_Exception)
SMESH::long_array * SMESH_Mesh_i::GetElemFaceNodes ( CORBA::Long  elemId,
CORBA::Short  faceIndex 
)

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

References _impl, _preMeshInfo, SMESH_PreMeshInfo::FullLoadFromFile(), SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::NbFaceNodes(), and SMDS_VolumeTool::NbFaces().

CORBA::Long SMESH_Mesh_i::GetElemNbNodes ( CORBA::Long  id)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindElement(), SMESH_PreMeshInfo::FullLoadFromFile(), and SMDS_MeshElement::NbNodes().

CORBA::Long SMESH_Mesh_i::GetElemNode ( CORBA::Long  id,
CORBA::Long  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.

References _impl, _preMeshInfo, SMDS_Mesh::FindElement(), SMESH_PreMeshInfo::FullLoadFromFile(), SMDS_MeshElement::GetID(), SMDS_MeshElement::GetNode(), and SMDS_MeshElement::NbNodes().

SMESH::long_array * SMESH_Mesh_i::GetElemNodes ( CORBA::Long  id)

Returns IDs of nodes of given element.

References _impl, _preMeshInfo, and SMESH_PreMeshInfo::FullLoadFromFile().

SMESH::double_array * SMESH_Mesh_i::GetFaceNormal ( CORBA::Long  faceId,
CORBA::Boolean  normalized 
)

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

References _impl, _preMeshInfo, SMESH_MeshAlgos::FaceNormal(), and SMESH_PreMeshInfo::FullLoadFromFile().

SMESH_Gen_i* SMESH_Mesh_i::GetGen ( )
const std::map<int, SMESH::SMESH_GroupBase_ptr>& SMESH_Mesh_i::getGroups ( )
SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups ( const std::list< int > &  groupIDs) const

Return groups cantained in _mapGroups by their IDs.

References _mapGroups.

SMESH::ListOfHypothesis * SMESH_Mesh_i::GetHypothesisList ( GEOM::GEOM_Object_ptr  aSubShape) throw (SALOME::SALOME_Exception)

References MESSAGE.

Referenced by removeSubMesh().

CORBA::Long SMESH_Mesh_i::GetId ( ) throw (SALOME::SALOME_Exception)

References _id.

SMESH::long_array * SMESH_Mesh_i::GetIDs ( )
virtual

Method of SMESH_IDSource interface.

References GetElementsId().

SMESH_Mesh & SMESH_Mesh_i::GetImpl ( )

References _impl, and MESSAGE.

Referenced by SMESH_Gen_i::_GetInside(), SMESH_Gen_i::AddHypothesisToShape(), SMESH_Gen_i::CancelCompute(), SMESH_Gen_i::Compute(), SMESH_Gen_i::ConcatenateCommon(), SMESH_Gen_i::CopyMesh(), SMESH_Gen_i::CreateMeshesFromCGNS(), SMESH_Gen_i::CreateMeshesFromGMF(), SMESH_Gen_i::CreateMeshesFromMEDorSAUV(), SMESH_Gen_i::CreateMeshesFromSTL(), SMESH_Gen_i::CreateMeshesFromUNV(), SMESH_Gen_i::Evaluate(), SMESH_MeshEditor_i::ExtrusionAlongPathObjects(), findConcurrentSubMeshes(), SMESH_Gen_i::FindGeometryByMeshElement(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Gen_i::GetAlgoState(), GetElements(), SMESH_Gen_i::GetHypothesisParameterValues(), SMESH_Pattern_i::getMesh(), getMesh(), GetMeshOrder(), SMESH_Gen_i::GetMeshOrSubmeshByShape(), SMESH_GroupBase_i::GetSmeshGroup(), SMESH_Gen_i::GetSoleSubMeshUsingHyp(), SMESH_Gen_i::IsReadyToCompute(), IsUnorderedSubMesh(), SMESH_MeshEditor_i::LinearAnglesVariation(), SMESH_Gen_i::Load(), StdMeshers_ProjectionSource1D_i::LoadFrom(), StdMeshers_ProjectionSource2D_i::LoadFrom(), StdMeshers_ProjectionSource3D_i::LoadFrom(), SMESH_MeshEditor_i::MakeBoundaryElements(), SMESH_MeshEditor_i::MakeBoundaryMesh(), MeshPtr2SMDSMesh(), SMESH_MeshEditor_i::MirrorMakeMesh(), SMESH_MeshEditor_i::MirrorObjectMakeMesh(), SMESH_Gen_i::Precompute(), SMESH_PreMeshInfo::readSubMeshes(), SMESH_PreMeshInfo::readSubMeshInfo(), SMESH_MeshEditor_i::RotateMakeMesh(), SMESH_MeshEditor_i::RotateObjectMakeMesh(), SMESH_Gen_i::Save(), SMESH_PreMeshInfo::SaveToFile(), SMESH_MeshEditor_i::ScaleMakeMesh(), SetMeshOrder(), StdMeshers_ProjectionSource1D_i::SetSourceMesh(), StdMeshers_ProjectionSource2D_i::SetSourceMesh(), StdMeshers_ProjectionSource3D_i::SetSourceMesh(), SMESH_MeshPartDS::SMESH_MeshPartDS(), SMESH_MeshEditor_i::TranslateMakeMesh(), and SMESH_MeshEditor_i::TranslateObjectMakeMesh().

SMESH::string_array * SMESH_Mesh_i::GetLastParameters ( )

Returns list of notebook variables used for last Mesh operation.

References SMESH_Gen_i::GetCurrentStudy(), GetParameters(), and SMESH_Gen_i::GetSMESHGen().

SMESH::log_array * SMESH_Mesh_i::GetLog ( CORBA::Boolean  clearAfterGet) throw (SALOME::SALOME_Exception)
SMESH::MedFileInfo * SMESH_Mesh_i::GetMEDFileInfo ( )
virtual

Returns information about imported MED file.

Return information about imported file.

References _medFileInfo, and SMESH::MedFileInfo::fileName.

SMESH::SMESH_Mesh_ptr SMESH_Mesh_i::GetMesh ( )
virtual
SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor ( ) throw (SALOME::SALOME_Exception)
SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditPreviewer ( ) throw (SALOME::SALOME_Exception)
SMESH::long_array * SMESH_Mesh_i::GetMeshInfo ( )
virtual

Returns number of mesh elements of each EntityType Result array of number of elements per EntityType Inherited from SMESH_IDSource.

Returns number of mesh elements per each EntityType.

References _impl, _preMeshInfo, SMESH::Entity_Last, SMESH::Entity_Node, SMESH_PreMeshInfo::GetMeshInfo(), SMDS_Mesh::GetMeshInfo(), and SMDS_MeshInfo::NbEntities().

Referenced by SMESH_PreMeshInfo::SaveToFile().

SMESH::submesh_array_array * SMESH_Mesh_i::GetMeshOrder ( )
virtual

Return submesh objects list in meshing order.

References _impl, convertMeshOrder(), findConcurrentSubMeshes(), and GetImpl().

CORBA::LongLong SMESH_Mesh_i::GetMeshPtr ( )

Returns pointer to _impl as an integer value.

Is called from constructor of SMESH_Client

References _impl, _preMeshInfo, SMESH_PreMeshInfo::FullLoadFromFile(), and MESSAGE.

SMESH::long_array * SMESH_Mesh_i::GetNbElementsByType ( )
virtual

Returns number of mesh elements of each ElementType.

Returns number of mesh elements per each ElementType.

References _impl, _preMeshInfo, SMESH::NB_ELEMENT_TYPES, and SMDS_MeshInfo::NbElements().

SMESH::long_array * SMESH_Mesh_i::GetNodeInverseElements ( CORBA::Long  id)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindNode(), SMESH_PreMeshInfo::FullLoadFromFile(), SMDS_MeshElement::GetID(), SMDS_MeshNode::GetInverseElementIterator(), and SMDS_MeshNode::NbInverseElements().

SMESH::long_array * SMESH_Mesh_i::GetNodesId ( ) throw (SALOME::SALOME_Exception)
SMESH::double_array * SMESH_Mesh_i::GetNodeXYZ ( CORBA::Long  id)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindNode(), SMESH_PreMeshInfo::FullLoadFromFile(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

char * SMESH_Mesh_i::GetParameters ( )

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

References SMESH_Gen_i::GetParameters(), and SMESH_Gen_i::GetSMESHGen().

Referenced by GetLastParameters().

CORBA::Long SMESH_Mesh_i::GetShapeID ( CORBA::Long  id)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindNode(), SMESH_PreMeshInfo::FullLoadFromFile(), and SMDS_MeshElement::getshapeId().

CORBA::Long SMESH_Mesh_i::GetShapeIDForElem ( CORBA::Long  id)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindElement(), and SMESH_PreMeshInfo::FullLoadFromFile().

GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::GetStudyId ( ) throw (SALOME::SALOME_Exception)

References _studyId.

SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh ( GEOM::GEOM_Object_ptr  aSubShape,
const char *  theName 
) throw (SALOME::SALOME_Exception)
SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::getSubMesh ( int  shapeID)
SMESH::long_array * SMESH_Mesh_i::GetSubMeshElementsId ( CORBA::Long  ShapeID) throw (SALOME::SALOME_Exception)
SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType ( CORBA::Long  ShapeID) throw (SALOME::SALOME_Exception)
SMESH::submesh_array * SMESH_Mesh_i::GetSubMeshes ( ) throw (SALOME::SALOME_Exception)

References _mapSubMeshIor, and MESSAGE.

SMESH::long_array * SMESH_Mesh_i::GetSubMeshNodesId ( CORBA::Long  ShapeID,
CORBA::Boolean  all 
) throw (SALOME::SALOME_Exception)

Returns ID of nodes for given submesh If param all==true - returns all nodes, else - returns only nodes on shapes.

References SMESHDS_SubMesh::GetElements(), SMDS_MeshElement::GetID(), SMESHDS_SubMesh::GetNodes(), SMESHDS_SubMesh::NbElements(), SMDS_MeshElement::nodesIterator(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::array_of_ElementType * SMESH_Mesh_i::GetTypes ( )
virtual
char * SMESH_Mesh_i::GetVersionString ( SMESH::MED_VERSION  version,
CORBA::Short  nbDigits 
)

Return string representation of a MED file version comprising nbDigits.

References DriverMED_W_SMESHDS_Mesh::GetVersionString().

SALOMEDS::TMPFile * SMESH_Mesh_i::GetVtkUgStream ( )
virtual

Returns mesh unstructed grid information.

References _impl.

CORBA::Boolean SMESH_Mesh_i::HasDuplicatedGroupNamesMED ( )

Check group names for duplications.

Checks if there are groups with equal names.

Consider maximum group name length stored in MED file.

References _impl.

CORBA::Boolean SMESH_Mesh_i::HasModificationsToDiscard ( ) throw (SALOME::SALOME_Exception)

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

References _impl.

CORBA::Boolean SMESH_Mesh_i::HasShapeToMesh ( ) throw (SALOME::SALOME_Exception)

return true if mesh has a shape to build a shape on

References _impl.

Referenced by addHypothesis(), SMESH_PreMeshInfo::ForgetOrLoad(), SMESH_Gen_i::GetSoleSubMeshUsingHyp(), SMESH_Gen_i::Load(), and removeHypothesis().

SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportCGNSFile ( const char *  theFileName,
const int  theMeshIndex,
std::string &  theMeshName 
) throw (SALOME::SALOME_Exception)

Imports mesh data from the CGNS file.

References ConvertDriverMEDReadStatus().

Referenced by SMESH_Gen_i::CreateMeshesFromCGNS().

SMESH::ComputeError * SMESH_Mesh_i::ImportGMFFile ( const char *  theFileName,
bool  theMakeRequiredGroups 
) throw (SALOME::SALOME_Exception)

Imports data from a GMF file and returns an error description.

References ConvertComputeError(), SMESH_CATCH, and SMESH_TRY.

Referenced by SMESH_Gen_i::CreateMeshesFromGMF().

SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportMEDFile ( const char *  theFileName,
const char *  theMeshName 
) throw (SALOME::SALOME_Exception)

consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value

ImportMEDFile.

Imports mesh data from MED file

References ConvertDriverMEDReadStatus(), MED::getMEDVersion(), and SMESH_File::size().

Referenced by SMESH_Gen_i::CreateMeshesFromMEDorSAUV().

int SMESH_Mesh_i::ImportSTLFile ( const char *  theFileName) throw (SALOME::SALOME_Exception)

ImportSTLFile.

Imports mesh data from STL file

References SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

Referenced by SMESH_Gen_i::CreateMeshesFromSTL().

int SMESH_Mesh_i::ImportUNVFile ( const char *  theFileName) throw (SALOME::SALOME_Exception)

ImportUNVFile.

Imports mesh data from MED file

References SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

Referenced by SMESH_Gen_i::CreateMeshesFromUNV().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::IntersectGroups ( SMESH::SMESH_GroupBase_ptr  theGroup1,
SMESH::SMESH_GroupBase_ptr  theGroup2,
const char *  theName 
) throw (SALOME::SALOME_Exception)

New group is created.

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

References SMDS_MeshGroup::Add(), SMESHDS_GroupBase::Contains(), SMESHDS_GroupBase::GetElements(), SMESHDS_GroupBase::IsEmpty(), SMESHDS_Group::SMDSGroup(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::IntersectListOfGroups ( const SMESH::ListOfGroups theGroups,
const char *  theName 
) throw (SALOME::SALOME_Exception)

Intersect list of groups.

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

Parameters
theGroupslist of groups
theNamename of group to be created
Returns
pointer on the group

References SMDS_MeshGroup::Add(), SMESH::ALL, SMESHDS_Group::SMDSGroup(), SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

CORBA::Boolean SMESH_Mesh_i::IsLoaded ( ) throw (SALOME::SALOME_Exception)

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

References _preMeshInfo.

CORBA::Boolean SMESH_Mesh_i::IsMediumNode ( CORBA::Long  ide,
CORBA::Long  idn 
)

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

References _impl, _preMeshInfo, SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), SMESH_PreMeshInfo::FullLoadFromFile(), and SMDS_MeshElement::IsMediumNode().

CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem ( CORBA::Long  idn,
SMESH::ElementType  theElemType 
)
bool SMESH_Mesh_i::IsMeshInfoCorrect ( )

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

References _preMeshInfo, and SMESH_PreMeshInfo::IsMeshInfoCorrect().

CORBA::Boolean SMESH_Mesh_i::IsPoly ( CORBA::Long  id)
CORBA::Boolean SMESH_Mesh_i::IsQuadratic ( CORBA::Long  id)
CORBA::Boolean SMESH_Mesh_i::IsUnorderedSubMesh ( CORBA::Long  submeshID)

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

References findConcurrentSubMeshes(), and GetImpl().

void SMESH_Mesh_i::Load ( ) throw (SALOME::SALOME_Exception)
SMESH::ListOfGroups * SMESH_Mesh_i::MakeGroupsOfBadInputElements ( int  theSubShapeID,
const char *  theGroupName 
) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::Nb0DElements ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbBalls ( ) throw (SALOME::SALOME_Exception)

References _impl, _preMeshInfo, and SMDS_MeshInfo::NbBalls().

Referenced by NbElements().

CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbEdges ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbEdgesOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbElements ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbFaces ( ) throw (SALOME::SALOME_Exception)

References _impl, _preMeshInfo, and SMDS_MeshInfo::NbFaces().

Referenced by NbElements().

CORBA::Long SMESH_Mesh_i::NbFacesOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbGroups ( ) throw (SALOME::SALOME_Exception)

Get number of groups existing in the mesh.

References _mapGroups.

Referenced by checkGroupNames().

CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbHexas ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbHexasOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbNodes ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPolygons ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder ( SMESH::ElementOrder  order = SMESH::ORDER_ANY) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPolyhedrons ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPrisms ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPrismsOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPyramids ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbPyramidsOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbQuadrangles ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbQuadranglesOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbSubMesh ( ) throw (SALOME::SALOME_Exception)

Returns nb of published sub-meshes.

References _mapSubMesh_i.

CORBA::Long SMESH_Mesh_i::NbTetras ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbTetrasOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbTriangles ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbTrianglesOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas ( ) throw (SALOME::SALOME_Exception)
CORBA::Long SMESH_Mesh_i::NbVolumes ( ) throw (SALOME::SALOME_Exception)

References _impl, _preMeshInfo, and SMDS_MeshInfo::NbVolumes().

Referenced by NbElements().

CORBA::Long SMESH_Mesh_i::NbVolumesOfOrder ( SMESH::ElementOrder  order) throw (SALOME::SALOME_Exception)
void SMESH_Mesh_i::onHypothesisModified ( )

callback from _impl to forget not loaded mesh data (issue 0021208)

References _preMeshInfo, and SMESH_PreMeshInfo::ForgetOrLoad().

void SMESH_Mesh_i::PrepareForWriting ( const char *  file,
bool  overwrite = true 
)
static
string SMESH_Mesh_i::prepareMeshNameAndGroups ( const char *  file,
CORBA::Boolean  overwrite 
)
private

Prepares a file for export and pass names of mesh groups from study to mesh DS.

Parameters
file- file name
overwrite- to erase the file or not
Return values
string- mesh name

References _gen_i, checkGroupNames(), SMESH_Gen_i::GetCurrentStudy(), SMESH_Gen_i::ObjectToSObject(), and PrepareForWriting().

void SMESH_Mesh_i::removeGeomGroupData ( CORBA::Object_ptr  theSmeshObj)
private

Remove GEOM group data relating to removed smesh object.

References _geomGroupData.

Referenced by removeGroup(), and removeSubMesh().

void SMESH_Mesh_i::RemoveGroup ( SMESH::SMESH_GroupBase_ptr  theGroup) throw (SALOME::SALOME_Exception)
void SMESH_Mesh_i::removeGroup ( const int  theId)

SMESH_Mesh_i::removeGroup.

Should be called by ~SMESH_Group_i()

References _impl, _mapGroups, MESSAGE, removeGeomGroupData(), and RemoveGroup().

void SMESH_Mesh_i::RemoveGroupWithContents ( SMESH::SMESH_GroupBase_ptr  theGroup) throw (SALOME::SALOME_Exception)
SMESH::Hypothesis_Status SMESH_Mesh_i::RemoveHypothesis ( GEOM::GEOM_Object_ptr  aSubShape,
SMESH::SMESH_Hypothesis_ptr  anHyp 
) throw (SALOME::SALOME_Exception)
SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh_i::removeHypothesis ( GEOM::GEOM_Object_ptr  aSubShape,
SMESH::SMESH_Hypothesis_ptr  anHyp 
)
void SMESH_Mesh_i::RemoveSubMesh ( SMESH::SMESH_subMesh_ptr  theSubMesh) throw (SALOME::SALOME_Exception)
bool SMESH_Mesh_i::removeSubMesh ( SMESH::SMESH_subMesh_ptr  theSubMesh,
GEOM::GEOM_Object_ptr  theSubShapeObject 
)
void SMESH_Mesh_i::SetAutoColor ( CORBA::Boolean  theAutoColor) throw (SALOME::SALOME_Exception)

Auto color.

Sets auto-color mode.

If it is on, groups get unique random colors

References getUniqueColor().

void SMESH_Mesh_i::SetImpl ( ::SMESH_Mesh impl)

References _impl, and MESSAGE.

Referenced by SMESH_Gen_i::createMesh().

CORBA::Boolean SMESH_Mesh_i::SetMeshOrder ( const SMESH::submesh_array_array theSubMeshArray)

Set submesh object order.

Parameters
theSubMeshArraysubmesh array order

References _mapSubMesh, _preMeshInfo, SMESH_subMesh::CLEAN, SMESH_PreMeshInfo::ForgetOrLoad(), and GetImpl().

void SMESH_Mesh_i::SetParameters ( const char *  theParameters)

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

References SMESH_Gen_i::GetSMESHGen(), and SMESH_Gen_i::UpdateParameters().

void SMESH_Mesh_i::SetShape ( GEOM::GEOM_Object_ptr  theShapeObject) throw (SALOME::SALOME_Exception)

SetShape.

Associates <this> mesh with <theShape> and puts a reference to <theShape> into the current study; the previous shape is substituted by the new one.

Referenced by SMESH_Gen_i::CreateMesh(), and SMESH_Gen_i::Load().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionGroups ( SMESH::SMESH_GroupBase_ptr  theGroup1,
SMESH::SMESH_GroupBase_ptr  theGroup2,
const char *  theName 
) throw (SALOME::SALOME_Exception)

New group including all mesh elements present in initial groups is created.

References SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionListOfGroups ( const SMESH::ListOfGroups theGroups,
const char *  theName 
) throw (SALOME::SALOME_Exception)

New group including all mesh elements present in initial groups is created.

Parameters
theGroupslist of groups
theNamename of group to be created
Returns
pointer to the new group

References SMESH::ALL, SMESH_CATCH, SMESH_TRY, and SMESH::throwCorbaException().

Friends And Related Function Documentation

friend class SMESH_PreMeshInfo
friend

Field Documentation

SMESH_MeshEditor_i* SMESH_Mesh_i::_editor
private
std::list<TGeomGroupData> SMESH_Mesh_i::_geomGroupData
private
int SMESH_Mesh_i::_id
private

Referenced by GetId(), and SMESH_Mesh_i().

int SMESH_Mesh_i::_idGenerator = 0
staticprivate

Referenced by SMESH_Mesh_i().

int SMESH_Mesh_i::_mainShapeTick
private

Referenced by CheckGeomModif(), and SMESH_Mesh_i().

std::map<int, SMESH::SMESH_Hypothesis_ptr> SMESH_Mesh_i::_mapHypo
private

Referenced by addHypothesis(), and ~SMESH_Mesh_i().

SMESH::MedFileInfo_var SMESH_Mesh_i::_medFileInfo
private

Referenced by GetMEDFileInfo().

SMESH_MeshEditor_i* SMESH_Mesh_i::_previewEditor
private
int SMESH_Mesh_i::_studyId
private

Referenced by GetStudyId(), and SMESH_Mesh_i().