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 );
221 void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
223 CORBA::Boolean overwrite,
224 CORBA::Boolean groupElemsByType);
225 void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
227 CORBA::Boolean withRequiredGroups);
230 template<
class SPECLS>
231 void ExportPartToMEDCommon(SPECLS& speCls,
232 SMESH::SMESH_IDSource_ptr meshPart,
233 CORBA::Boolean auto_groups,
234 CORBA::Boolean autoDim,
235 const GEOM::ListOfFields& fields,
236 const char* geomAssocFields,
237 CORBA::Double ZTolerance,
238 CORBA::Boolean saveNumbers );
240 void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
242 CORBA::Boolean auto_groups,
244 CORBA::Boolean overwrite,
245 CORBA::Boolean autoDim,
246 const GEOM::ListOfFields& fields,
247 const char* geomAssocFields,
248 CORBA::Double ZTolerance,
249 CORBA::Boolean saveNumbers );
251 CORBA::LongLong ExportPartToMEDCoupling(SMESH::SMESH_IDSource_ptr meshPart,
252 CORBA::Boolean auto_groups,
253 CORBA::Boolean autoDim,
254 const GEOM::ListOfFields& fields,
255 const char* geomAssocFields,
256 CORBA::Double ZTolerance,
257 CORBA::Boolean saveNumbers);
259 void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
261 CORBA::Boolean renumber);
262 void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
264 CORBA::Boolean renumber);
265 void ExportPartToSTL(SMESH::SMESH_IDSource_ptr meshPart,
267 CORBA::Boolean isascii);
269 CORBA::Double GetComputeProgress();
271 SMESH::smIdType NbNodes();
273 SMESH::smIdType NbElements();
275 SMESH::smIdType Nb0DElements();
277 SMESH::smIdType NbBalls();
279 SMESH::smIdType NbEdges();
283 SMESH::smIdType NbFaces();
287 SMESH::smIdType NbTriangles();
291 SMESH::smIdType NbBiQuadTriangles();
293 SMESH::smIdType NbQuadrangles();
297 SMESH::smIdType NbBiQuadQuadrangles();
299 SMESH::smIdType NbPolygons();
303 SMESH::smIdType NbVolumes();
307 SMESH::smIdType NbTetras();
311 SMESH::smIdType NbHexas();
315 SMESH::smIdType NbTriQuadraticHexas();
317 SMESH::smIdType NbPyramids();
321 SMESH::smIdType NbPrisms();
325 SMESH::smIdType NbHexagonalPrisms();
327 SMESH::smIdType NbPolyhedrons();
329 SMESH::smIdType NbSubMesh();
364 const char* theGroupName);
372 SMESH::SMESH_Hypothesis_ptr anHyp,
373 std::string* anErrorText=0);
376 SMESH::SMESH_Hypothesis_ptr anHyp);
381 static void PrepareForWriting (
const char* file,
bool overwrite =
true);
385 SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
387 bool removeSubMesh(SMESH::SMESH_subMesh_ptr theSubMesh,
388 GEOM::GEOM_Object_ptr theSubShapeObject );
392 const int theID = -1,
393 const TopoDS_Shape& theShape = TopoDS_Shape(),
396 void removeGroup(
const int theId );
398 SMESH::SMESH_subMesh_ptr getSubMesh(
int shapeID);
401 const std::map<int, SMESH::SMESH_GroupBase_ptr>&
getGroups() {
return _mapGroups; }
404 void onHypothesisModified(
int theHypID,
bool updateIcons);
412 void CheckGeomModif(
bool isBreakLink =
false );
418 void CheckGeomGroupModif();
420 CORBA::LongLong GetMeshPtr();
425 void CreateGroupServants();
469 CORBA::Long GetShapeID(SMESH::smIdType
id);
476 CORBA::Long GetShapeIDForElem(SMESH::smIdType
id);
482 CORBA::Short GetElemNbNodes(SMESH::smIdType
id);
494 SMESH::smIdType GetElemNode(SMESH::smIdType
id, CORBA::Short index);
500 CORBA::Boolean IsMediumNode(SMESH::smIdType ide, SMESH::smIdType idn);
506 CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
512 CORBA::Long ElemNbEdges(SMESH::smIdType
id);
517 CORBA::Long ElemNbFaces(SMESH::smIdType
id);
542 CORBA::Boolean IsPoly(SMESH::smIdType
id);
547 CORBA::Boolean IsQuadratic(SMESH::smIdType
id);
552 CORBA::Double GetBallDiameter(SMESH::smIdType
id);
567 std::string FileInfoToString();
568 void FileInfoFromString(
const std::string& info);
579 void SetParameters (
const char* theParameters);
584 char* GetParameters();
594 CORBA::Boolean IsUnorderedSubMesh(CORBA::Long submeshID);
638 virtual SMESH::SMESH_Mesh_ptr GetMesh();
643 bool IsMeshInfoCorrect();
647 virtual SALOMEDS::TMPFile* GetVtkUgStream();
654 std::string generateMeshName( );
655 std::string prepareMeshNameAndGroups(
const char* file, CORBA::Boolean overwrite );
661 const GEOM::ListOfFields& fields,
662 const char* geomAssocFields);
667 void checkGroupNames();
674 const bool theIsDump);
691 std::map<int, SMESH::SMESH_Hypothesis_ptr>
_mapHypo;
716 void addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
717 CORBA::Object_ptr theSmeshObj);
721 void removeGeomGroupData(CORBA::Object_ptr theSmeshObj);
725 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:68
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:687
int & MainShapeTick()
Persistence of geometry tick.
Definition: SMESH_Mesh_i.hxx:573
SMESH_PreMeshInfo * _preMeshInfo
Definition: SMESH_Mesh_i.hxx:695
std::map< int, SMESH::SMESH_subMesh_ptr > _mapSubMeshIor
Definition: SMESH_Mesh_i.hxx:689
std::map< int, SMESH_subMesh_i * > _mapSubMesh_i
Definition: SMESH_Mesh_i.hxx:650
std::list< TGeomGroupData > _geomGroupData
Definition: SMESH_Mesh_i.hxx:710
SMESH_Gen_i * _gen_i
Definition: SMESH_Mesh_i.hxx:686
std::map< int, SMESH::SMESH_Hypothesis_ptr > _mapHypo
Definition: SMESH_Mesh_i.hxx:691
SMESH_PreMeshInfo *& changePreMeshInfo()
Definition: SMESH_Mesh_i.hxx:697
SMESH::MedFileInfo_var _medFileInfo
Definition: SMESH_Mesh_i.hxx:694
SMESH_Mesh_i(const SMESH_Mesh_i &)
SMESH_MeshEditor_i * _editor
Definition: SMESH_Mesh_i.hxx:692
static int _idGenerator
Definition: SMESH_Mesh_i.hxx:685
SMESH_MeshEditor_i * _previewEditor
Definition: SMESH_Mesh_i.hxx:693
SMESH_Gen_i * GetGen()
Definition: SMESH_Mesh_i.hxx:168
int _mainShapeTick
Definition: SMESH_Mesh_i.hxx:711
std::map< int, SMESH::SMESH_GroupBase_ptr > _mapGroups
Definition: SMESH_Mesh_i.hxx:690
std::map< int, ::SMESH_subMesh * > _mapSubMesh
Definition: SMESH_Mesh_i.hxx:651
int _nbInvalidHypos
Definition: SMESH_Mesh_i.hxx:688
const std::map< int, SMESH::SMESH_GroupBase_ptr > & getGroups()
Definition: SMESH_Mesh_i.hxx:401
::SMESH_Mesh * _impl
Definition: SMESH_Mesh_i.hxx:682
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:332
sequence< SMESH_IDSource > ListOfIDSources
Definition: SMESH_Mesh.idl:40
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:36
sequence< SMESH_GroupBase > ListOfGroups
Definition: SMESH_Mesh.idl:38
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:703
CORBA::Object_var _smeshObject
Definition: SMESH_Mesh_i.hxx:708
std::string _groupEntry
Definition: SMESH_Mesh_i.hxx:706
std::set< int > _indices
Definition: SMESH_Mesh_i.hxx:707