26#ifndef _SMESH_MESH_I_HXX_
27#define _SMESH_MESH_I_HXX_
36#include <SALOME_GenericObj_i.hh>
37#include <SALOMEconfig.h>
38#include CORBA_SERVER_HEADER(SMESH_Gen)
39#include CORBA_SERVER_HEADER(SMESH_Mesh)
40#include CORBA_SERVER_HEADER(SMESH_Group)
41#include CORBA_SERVER_HEADER(SMESH_Hypothesis)
42#include CORBA_CLIENT_HEADER(GEOM_Gen)
55 public virtual POA_SMESH::SMESH_Mesh,
56 public virtual SALOME::GenericObj_i
68 void SetShape( GEOM::GEOM_Object_ptr theShapeObject );
70 CORBA::Boolean HasShapeToMesh();
72 GEOM::GEOM_Object_ptr GetShapeToMesh();
74 virtual void ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom);
76 CORBA::Boolean IsLoaded();
82 void ClearSubMesh(CORBA::Long ShapeID);
85 SMESH::SMESH_Hypothesis_ptr anHyp,
86 CORBA::String_out anErrorText);
89 SMESH::SMESH_Hypothesis_ptr anHyp);
95 SMESH::SMESH_subMesh_ptr GetSubMesh(GEOM::GEOM_Object_ptr aSubShape,
const char* theName);
97 void RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh );
99 SMESH::SMESH_Group_ptr CreateGroup(
SMESH::ElementType theElemType,
const char* theName );
103 GEOM::GEOM_Object_ptr theGeomObj );
107 SMESH::Filter_ptr theFilter );
109 void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup );
111 void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup );
115 CORBA::Long NbGroups();
117 SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
118 SMESH::SMESH_GroupBase_ptr theGroup2,
119 const char* theName );
122 const char* theName);
124 SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
125 SMESH::SMESH_GroupBase_ptr theGroup2,
126 const char* theName );
129 const char* theName );
131 SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
132 SMESH::SMESH_GroupBase_ptr theGroup2,
133 const char* theName );
137 const char* theName );
143 CORBA::Boolean theUnderlyingOnly );
146 CORBA::Boolean theCreateEdges,
147 CORBA::Boolean theUseExistingEdges );
149 SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroupOn );
153 SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
155 SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
157 CORBA::Boolean HasModificationsToDiscard();
170 int ImportUNVFile(
const char* theFileName );
172 int ImportSTLFile(
const char* theFileName );
175 bool theMakeRequiredGroups);
183 const int theMeshIndex,
184 std::string& theMeshName);
189 void SetAutoColor(CORBA::Boolean theAutoColor);
191 CORBA::Boolean GetAutoColor();
196 CORBA::Boolean HasDuplicatedGroupNamesMED();
201 char* GetVersionString(CORBA::Long minor, CORBA::Short nbDigits);
209 void ExportMED(
const char* file,
210 CORBA::Boolean auto_groups,
212 CORBA::Boolean overwrite,
213 CORBA::Boolean autoDimension =
true);
215 CORBA::LongLong ExportMEDCoupling(CORBA::Boolean auto_groups,
216 CORBA::Boolean autoDimension =
true);
218 void ExportDAT(
const char* file,
const CORBA::Boolean renumber );
219 void ExportUNV(
const char* file,
const CORBA::Boolean renumber );
220 void ExportSTL(
const char* file,
bool isascii );
222 void ExportStructuredCGNS(SMESH::SMESH_IDSource_ptr meshPart,
224 CORBA::Boolean overwrite);
226 void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
228 CORBA::Boolean overwrite,
229 CORBA::Boolean groupElemsByType);
230 void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
232 CORBA::Boolean withRequiredGroups);
235 template<
class SPECLS>
236 void ExportPartToMEDCommon(SPECLS& speCls,
237 SMESH::SMESH_IDSource_ptr meshPart,
238 CORBA::Boolean auto_groups,
239 CORBA::Boolean autoDim,
240 const GEOM::ListOfFields& fields,
241 const char* geomAssocFields,
242 CORBA::Double ZTolerance,
243 CORBA::Boolean saveNumbers );
245 void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
247 CORBA::Boolean auto_groups,
249 CORBA::Boolean overwrite,
250 CORBA::Boolean autoDim,
251 const GEOM::ListOfFields& fields,
252 const char* geomAssocFields,
253 CORBA::Double ZTolerance,
254 CORBA::Boolean saveNumbers );
256 void ExportPartToMESHIO(SMESH::SMESH_IDSource_ptr meshPart,
258 const char* selectedFilter,
259 const char* converter =
nullptr);
261 CORBA::LongLong ExportPartToMEDCoupling(SMESH::SMESH_IDSource_ptr meshPart,
262 CORBA::Boolean auto_groups,
263 CORBA::Boolean autoDim,
264 const GEOM::ListOfFields& fields,
265 const char* geomAssocFields,
266 CORBA::Double ZTolerance,
267 CORBA::Boolean saveNumbers);
269 void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
271 CORBA::Boolean renumber);
272 void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
274 CORBA::Boolean renumber);
275 void ExportPartToSTL(SMESH::SMESH_IDSource_ptr meshPart,
277 CORBA::Boolean isascii);
279 CORBA::Double GetComputeProgress();
281 SMESH::smIdType NbNodes();
283 SMESH::smIdType NbElements();
285 SMESH::smIdType Nb0DElements();
287 SMESH::smIdType NbBalls();
289 SMESH::smIdType NbEdges();
293 SMESH::smIdType NbFaces();
297 SMESH::smIdType NbTriangles();
301 SMESH::smIdType NbBiQuadTriangles();
303 SMESH::smIdType NbQuadrangles();
307 SMESH::smIdType NbBiQuadQuadrangles();
309 SMESH::smIdType NbPolygons();
313 SMESH::smIdType NbVolumes();
317 SMESH::smIdType NbTetras();
321 SMESH::smIdType NbHexas();
325 SMESH::smIdType NbTriQuadraticHexas();
327 SMESH::smIdType NbPyramids();
331 SMESH::smIdType NbPrisms();
335 SMESH::smIdType NbHexagonalPrisms();
337 SMESH::smIdType NbPolyhedrons();
339 SMESH::smIdType NbSubMesh();
374 const char* theGroupName);
382 SMESH::SMESH_Hypothesis_ptr anHyp,
383 std::string* anErrorText=0);
386 SMESH::SMESH_Hypothesis_ptr anHyp);
391 static void PrepareForWriting (
const char* file,
bool overwrite =
true);
395 SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
397 bool removeSubMesh(SMESH::SMESH_subMesh_ptr theSubMesh,
398 GEOM::GEOM_Object_ptr theSubShapeObject );
402 const int theID = -1,
403 const TopoDS_Shape& theShape = TopoDS_Shape(),
406 void removeGroup(
const int theId );
408 SMESH::SMESH_subMesh_ptr getSubMesh(
int shapeID);
411 const std::map<int, SMESH::SMESH_GroupBase_ptr>&
getGroups() {
return _mapGroups; }
414 void onHypothesisModified(
int theHypID,
bool updateIcons);
422 void CheckGeomModif(
bool isBreakLink =
false );
428 void CheckGeomGroupModif();
430 CORBA::LongLong GetMeshPtr();
435 void CreateGroupServants();
445 CORBA::Boolean IsComputedOK();
479 CORBA::Long GetShapeID(SMESH::smIdType
id);
486 CORBA::Long GetShapeIDForElem(SMESH::smIdType
id);
492 CORBA::Short GetElemNbNodes(SMESH::smIdType
id);
504 SMESH::smIdType GetElemNode(SMESH::smIdType
id, CORBA::Short index);
510 CORBA::Boolean IsMediumNode(SMESH::smIdType ide, SMESH::smIdType idn);
516 CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
522 CORBA::Long ElemNbEdges(SMESH::smIdType
id);
527 CORBA::Long ElemNbFaces(SMESH::smIdType
id);
552 CORBA::Boolean IsPoly(SMESH::smIdType
id);
557 CORBA::Boolean IsQuadratic(SMESH::smIdType
id);
562 CORBA::Double GetBallDiameter(SMESH::smIdType
id);
577 std::string FileInfoToString();
578 void FileInfoFromString(
const std::string& info);
589 void SetParameters (
const char* theParameters);
594 char* GetParameters();
604 CORBA::Boolean IsUnorderedSubMesh(CORBA::Long submeshID);
648 virtual SMESH::SMESH_Mesh_ptr GetMesh();
653 bool IsMeshInfoCorrect();
657 virtual SALOMEDS::TMPFile* GetVtkUgStream();
664 std::string generateMeshName( );
665 std::string prepareMeshNameAndGroups(
const char* file, CORBA::Boolean overwrite );
671 const GEOM::ListOfFields& fields,
672 const char* geomAssocFields);
677 void checkGroupNames();
684 const bool theIsDump);
701 std::map<int, SMESH::SMESH_Hypothesis_ptr>
_mapHypo;
726 void addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
727 CORBA::Object_ptr theSmeshObj);
731 void removeGeomGroupData(CORBA::Object_ptr theSmeshObj);
735 TopoDS_Shape newGroupShape(
TGeomGroupData & groupData,
int how );
boost::shared_ptr< SMDS_Iterator< const SMDS_MeshElement * > > SMDS_ElemIteratorPtr
Definition: SMDS_ElemIterator.hxx:43
#define SMESH_I_EXPORT
Definition: SMESH.hxx:39
SMESH::Controls::PredicatePtr SMESH_PredicatePtr
Definition: SMESH_Controls.hxx:81
std::list< TListOfInt > TListOfListOfInt
Definition: SMESH_Mesh.hxx:77
Definition: DriverMED_W_Field.h:40
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESH_Gen_i.hxx:99
Definition: SMESH_Group_i.hxx:53
Hypothesis_Status
Definition: SMESH_Hypothesis.hxx:51
Definition: SMESH_MeshEditor_i.hxx:50
Definition: SMESH_Mesh_i.hxx:57
int _id
Definition: SMESH_Mesh_i.hxx:697
SMESH_PreMeshInfo * _preMeshInfo
Definition: SMESH_Mesh_i.hxx:705
SMESH_Gen_i * GetGen()
Definition: SMESH_Mesh_i.hxx:168
std::map< int, SMESH::SMESH_subMesh_ptr > _mapSubMeshIor
Definition: SMESH_Mesh_i.hxx:699
std::map< int, SMESH_subMesh_i * > _mapSubMesh_i
Definition: SMESH_Mesh_i.hxx:660
std::list< TGeomGroupData > _geomGroupData
Definition: SMESH_Mesh_i.hxx:720
SMESH_Gen_i * _gen_i
Definition: SMESH_Mesh_i.hxx:696
std::map< int, SMESH::SMESH_Hypothesis_ptr > _mapHypo
Definition: SMESH_Mesh_i.hxx:701
SMESH_PreMeshInfo *& changePreMeshInfo()
Definition: SMESH_Mesh_i.hxx:707
const std::map< int, SMESH::SMESH_GroupBase_ptr > & getGroups()
Definition: SMESH_Mesh_i.hxx:411
SMESH::MedFileInfo_var _medFileInfo
Definition: SMESH_Mesh_i.hxx:704
SMESH_Mesh_i(const SMESH_Mesh_i &)
SMESH_MeshEditor_i * _editor
Definition: SMESH_Mesh_i.hxx:702
static int _idGenerator
Definition: SMESH_Mesh_i.hxx:695
SMESH_MeshEditor_i * _previewEditor
Definition: SMESH_Mesh_i.hxx:703
int _mainShapeTick
Definition: SMESH_Mesh_i.hxx:721
std::map< int, SMESH::SMESH_GroupBase_ptr > _mapGroups
Definition: SMESH_Mesh_i.hxx:700
std::map< int, ::SMESH_subMesh * > _mapSubMesh
Definition: SMESH_Mesh_i.hxx:661
int _nbInvalidHypos
Definition: SMESH_Mesh_i.hxx:698
int & MainShapeTick()
Persistence of geometry tick.
Definition: SMESH_Mesh_i.hxx:583
::SMESH_Mesh * _impl
Definition: SMESH_Mesh_i.hxx:692
Definition: SMESH_Mesh.hxx:80
Class loading and holding information of a mesh object (mesh, group, submesh) not yet loaded from HDF...
Definition: SMESH_PreMeshInfo.hxx:54
Definition: SMESH_subMesh_i.hxx:47
Hypothesis_Status
Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
Definition: SMESH_Mesh.idl:208
NB_COMMON_NODES_ENUM
Enumeration for CreateDimGroup()
Definition: SMESH_Mesh.idl:255
sequence< log_block > log_array
Definition: SMESH_Mesh.idl:91
sequence< ElementType > array_of_ElementType
Definition: SMESH_Mesh.idl:138
sequence< submesh_array > submesh_array_array
Definition: SMESH_Mesh.idl:335
EntityType
Enumeration of entity type used in mesh info array, it should be synchronised with enum SMDSAbs_Entit...
Definition: SMESH_Mesh.idl:174
sequence< SMESH_subMesh > submesh_array
Definition: SMESH_Mesh.idl:334
sequence< SMESH_IDSource > ListOfIDSources
Definition: SMESH_Mesh.idl:41
sequence< smIdType > smIdType_array
Definition: SMESH_Mesh.idl:45
GeometryType
Enumeration for element geometry type, like SMDSAbs_GeometryType in SMDSAbs_ElementType....
Definition: SMESH_Mesh.idl:144
ElementOrder
ElementOrder points out entities of what order are requested.
Definition: SMESH_Mesh.idl:163
@ ORDER_ANY
Definition: SMESH_Mesh.idl:164
ElementType
Enumeration for element type, like in SMDS.
Definition: SMESH_Mesh.idl:128
sequence< double > double_array
Definition: SMESH_Mesh.idl:43
sequence< string > string_array
Definition: SMESH_Mesh.idl:46
sequence< SMESH_Hypothesis > ListOfHypothesis
Definition: SMESH_Mesh.idl:37
sequence< SMESH_GroupBase > ListOfGroups
Definition: SMESH_Mesh.idl:39
DriverMED_ReadStatus
Enumeration for mesh read status (used by SMESH_Gen::CreateMeshesFrom*() methods)
Definition: SMESH_Mesh.idl:231
sequence< long > long_array
Definition: SMESH_Mesh.idl:44
Definition: SMESH_Gen.idl:118
Element location on a shape.
Definition: SMESH_Mesh.idl:119
A structure containing information about MED file.
Definition: SMESH_Mesh.idl:245
Node location on a shape.
Definition: SMESH_Mesh.idl:110
Definition: SMESH_Mesh_i.hxx:713
CORBA::Object_var _smeshObject
Definition: SMESH_Mesh_i.hxx:718
std::string _groupEntry
Definition: SMESH_Mesh_i.hxx:716
std::set< int > _indices
Definition: SMESH_Mesh_i.hxx:717