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
59 SMESH_Mesh_i(
const SMESH_Mesh_i&);
61 SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
63 CORBA::Long studyId );
65 virtual ~SMESH_Mesh_i();
69 void SetShape( GEOM::GEOM_Object_ptr theShapeObject )
70 throw (SALOME::SALOME_Exception);
72 CORBA::Boolean HasShapeToMesh()
73 throw (SALOME::SALOME_Exception);
75 GEOM::GEOM_Object_ptr GetShapeToMesh()
76 throw (SALOME::SALOME_Exception);
78 CORBA::Boolean IsLoaded()
79 throw (SALOME::SALOME_Exception);
82 throw (SALOME::SALOME_Exception);
85 throw (SALOME::SALOME_Exception);
87 void ClearSubMesh(CORBA::Long ShapeID)
88 throw (SALOME::SALOME_Exception);
91 SMESH::SMESH_Hypothesis_ptr anHyp,
92 CORBA::String_out anErrorText)
93 throw (SALOME::SALOME_Exception);
96 SMESH::SMESH_Hypothesis_ptr anHyp)
97 throw (SALOME::SALOME_Exception);
100 throw (SALOME::SALOME_Exception);
103 throw (SALOME::SALOME_Exception);
105 SMESH::SMESH_subMesh_ptr GetSubMesh(GEOM::GEOM_Object_ptr aSubShape,
const char* theName)
106 throw (SALOME::SALOME_Exception);
108 void RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh )
109 throw (SALOME::SALOME_Exception);
111 SMESH::SMESH_Group_ptr CreateGroup(
SMESH::ElementType theElemType,
const char* theName )
112 throw (SALOME::SALOME_Exception);
116 GEOM::GEOM_Object_ptr theGeomObj )
117 throw (SALOME::SALOME_Exception);
121 SMESH::Filter_ptr theFilter )
122 throw (SALOME::SALOME_Exception);
124 void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
125 throw (SALOME::SALOME_Exception);
127 void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup )
128 throw (SALOME::SALOME_Exception);
131 throw (SALOME::SALOME_Exception);
133 CORBA::Long NbGroups()
134 throw (SALOME::SALOME_Exception);
136 SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
137 SMESH::SMESH_GroupBase_ptr theGroup2,
138 const char* theName )
139 throw (SALOME::SALOME_Exception);
143 throw (SALOME::SALOME_Exception);
145 SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
146 SMESH::SMESH_GroupBase_ptr theGroup2,
147 const char* theName )
148 throw (SALOME::SALOME_Exception);
151 const char* theName )
152 throw (SALOME::SALOME_Exception);
154 SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
155 SMESH::SMESH_GroupBase_ptr theGroup2,
156 const char* theName )
157 throw (SALOME::SALOME_Exception);
161 const char* theName )
162 throw (SALOME::SALOME_Exception);
168 CORBA::Boolean theUnderlyingOnly )
169 throw (SALOME::SALOME_Exception);
172 SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroupOn )
173 throw (SALOME::SALOME_Exception);
176 throw (SALOME::SALOME_Exception);
178 SMESH::SMESH_MeshEditor_ptr GetMeshEditor()
throw (SALOME::SALOME_Exception);
180 SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer()
throw (SALOME::SALOME_Exception);
182 CORBA::Boolean HasModificationsToDiscard()
throw (SALOME::SALOME_Exception);
184 void ClearLog()
throw (SALOME::SALOME_Exception);
186 CORBA::Long GetId()
throw (SALOME::SALOME_Exception);
188 CORBA::Long GetStudyId()
throw (SALOME::SALOME_Exception);
197 int ImportUNVFile(
const char* theFileName )
198 throw (SALOME::SALOME_Exception);
200 int ImportSTLFile(
const char* theFileName )
201 throw (SALOME::SALOME_Exception);
204 bool theMakeRequiredGroups)
205 throw (SALOME::SALOME_Exception);
211 throw (SALOME::SALOME_Exception);
214 const int theMeshIndex,
215 std::string& theMeshName)
216 throw (SALOME::SALOME_Exception);
221 void SetAutoColor(CORBA::Boolean theAutoColor)
222 throw (SALOME::SALOME_Exception);
224 CORBA::Boolean GetAutoColor()
225 throw (SALOME::SALOME_Exception);
230 CORBA::Boolean HasDuplicatedGroupNamesMED();
234 char* GetVersionString(SMESH::
MED_VERSION version, CORBA::Short nbDigits);
236 void ExportToMEDX( const
char* file,
237 CORBA::Boolean auto_groups,
239 CORBA::Boolean overwrite,
240 CORBA::Boolean autoDimension=true) throw (SALOME::SALOME_Exception);
241 void ExportToMED ( const
char* file,
242 CORBA::Boolean auto_groups,
243 SMESH::
MED_VERSION version ) throw (SALOME::SALOME_Exception);
244 void ExportMED ( const
char* file,
245 CORBA::Boolean auto_groups ) throw (SALOME::SALOME_Exception);
247 void ExportSAUV( const
char* file, CORBA::Boolean auto_groups ) throw (SALOME::SALOME_Exception);
249 void ExportDAT( const
char* file ) throw (SALOME::SALOME_Exception);
250 void ExportUNV( const
char* file ) throw (SALOME::SALOME_Exception);
251 void ExportSTL( const
char* file,
bool isascii ) throw (SALOME::SALOME_Exception);
252 void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
254 CORBA::Boolean overwrite) throw (SALOME::SALOME_Exception);
255 void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
257 CORBA::Boolean withRequiredGroups) throw (SALOME::SALOME_Exception);
259 void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
261 CORBA::Boolean auto_groups,
263 CORBA::Boolean overwrite,
264 CORBA::Boolean autoDim,
265 const GEOM::ListOfFields& fields,
266 const
char* geomAssocFields) throw (SALOME::SALOME_Exception);
267 void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
268 const
char* file) throw (SALOME::SALOME_Exception);
269 void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
270 const
char* file) throw (SALOME::SALOME_Exception);
271 void ExportPartToSTL(SMESH::SMESH_IDSource_ptr meshPart,
273 CORBA::Boolean isascii) throw (SALOME::SALOME_Exception);
275 CORBA::Double GetComputeProgress();
277 CORBA::Long NbNodes()
278 throw (SALOME::SALOME_Exception);
280 CORBA::Long NbElements()
281 throw (SALOME::SALOME_Exception);
283 CORBA::Long Nb0DElements()
284 throw (SALOME::SALOME_Exception);
286 CORBA::Long NbBalls()
287 throw (SALOME::SALOME_Exception);
289 CORBA::Long NbEdges()
290 throw (SALOME::SALOME_Exception);
293 throw (SALOME::SALOME_Exception);
295 CORBA::Long NbFaces()
296 throw (SALOME::SALOME_Exception);
299 throw (SALOME::SALOME_Exception);
301 CORBA::Long NbTriangles()
302 throw (SALOME::SALOME_Exception);
304 CORBA::Long NbTrianglesOfOrder(SMESH::
ElementOrder order)
305 throw (SALOME::SALOME_Exception);
307 CORBA::Long NbBiQuadTriangles()
308 throw (SALOME::SALOME_Exception);
310 CORBA::Long NbQuadrangles()
311 throw (SALOME::SALOME_Exception);
313 CORBA::Long NbQuadranglesOfOrder(SMESH::
ElementOrder order)
314 throw (SALOME::SALOME_Exception);
316 CORBA::Long NbBiQuadQuadrangles()
317 throw (SALOME::SALOME_Exception);
319 CORBA::Long NbPolygons()
320 throw (SALOME::SALOME_Exception);
323 throw (SALOME::SALOME_Exception);
325 CORBA::Long NbVolumes()
326 throw (SALOME::SALOME_Exception);
329 throw (SALOME::SALOME_Exception);
331 CORBA::Long NbTetras()
332 throw (SALOME::SALOME_Exception);
335 throw (SALOME::SALOME_Exception);
337 CORBA::Long NbHexas()
338 throw (SALOME::SALOME_Exception);
341 throw (SALOME::SALOME_Exception);
343 CORBA::Long NbTriQuadraticHexas()
344 throw (SALOME::SALOME_Exception);
346 CORBA::Long NbPyramids()
347 throw (SALOME::SALOME_Exception);
349 CORBA::Long NbPyramidsOfOrder(SMESH::
ElementOrder order)
350 throw (SALOME::SALOME_Exception);
352 CORBA::Long NbPrisms()
353 throw (SALOME::SALOME_Exception);
356 throw (SALOME::SALOME_Exception);
358 CORBA::Long NbHexagonalPrisms()
359 throw (SALOME::SALOME_Exception);
361 CORBA::Long NbPolyhedrons()
362 throw (SALOME::SALOME_Exception);
364 CORBA::Long NbSubMesh()
365 throw (SALOME::SALOME_Exception);
368 throw (SALOME::SALOME_Exception);
371 throw (SALOME::SALOME_Exception);
374 throw (SALOME::SALOME_Exception);
376 SMESH::
ElementType GetElementType( CORBA::Long
id,
bool iselem )
377 throw (SALOME::SALOME_Exception);
379 SMESH::
EntityType GetElementGeomType( CORBA::Long
id )
380 throw (SALOME::SALOME_Exception);
383 throw (SALOME::SALOME_Exception);
388 SMESH::
long_array* GetSubMeshElementsId(CORBA::Long ShapeID)
389 throw (SALOME::SALOME_Exception);
396 SMESH::
long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all)
397 throw (SALOME::SALOME_Exception);
402 SMESH::
ElementType GetSubMeshElementType(CORBA::Long ShapeID)
403 throw (SALOME::SALOME_Exception);
408 SMESH::
ListOfGroups* MakeGroupsOfBadInputElements(
int theSubShapeID,
409 const
char* theGroupName)
410 throw (SALOME::SALOME_Exception);
415 SMESH::SMESH_Hypothesis_ptr anHyp,
416 std::
string* anErrorText=0);
419 SMESH::SMESH_Hypothesis_ptr anHyp);
424 static
void PrepareForWriting (const
char* file,
bool overwrite = true);
428 SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
430 bool removeSubMesh(SMESH::SMESH_subMesh_ptr theSubMesh,
431 GEOM::GEOM_Object_ptr theSubShapeObject );
433 SMESH::SMESH_GroupBase_ptr createGroup(SMESH::
ElementType theElemType,
435 const TopoDS_Shape& theShape = TopoDS_Shape(),
438 void removeGroup( const
int theId );
440 SMESH::SMESH_subMesh_ptr getSubMesh(
int shapeID);
443 const std::map<
int, SMESH::SMESH_GroupBase_ptr>& getGroups() {
return _mapGroups; }
446 void onHypothesisModified();
449 void checkMeshLoaded();
456 void CheckGeomModif();
462 void CheckGeomGroupModif();
464 CORBA::LongLong GetMeshPtr();
469 void CreateGroupServants();
502 CORBA::Long GetShapeID(CORBA::Long
id);
509 CORBA::Long GetShapeIDForElem(CORBA::Long
id);
515 CORBA::Long GetElemNbNodes(CORBA::Long
id);
527 CORBA::Long GetElemNode(CORBA::Long
id, CORBA::Long index);
533 CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
539 CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
545 CORBA::Long ElemNbEdges(CORBA::Long
id);
550 CORBA::Long ElemNbFaces(CORBA::Long
id);
569 CORBA::Boolean IsPoly(CORBA::Long
id);
574 CORBA::Boolean IsQuadratic(CORBA::Long
id);
579 CORBA::Double GetBallDiameter(CORBA::Long
id);
594 void SetParameters (
const char* theParameters);
599 char* GetParameters();
609 CORBA::Boolean IsUnorderedSubMesh(CORBA::Long submeshID);
653 virtual SMESH::SMESH_Mesh_ptr GetMesh();
658 bool IsMeshInfoCorrect();
662 virtual SALOMEDS::TMPFile* GetVtkUgStream();
668 std::string prepareMeshNameAndGroups(
const char* file, CORBA::Boolean overwrite );
673 void checkGroupNames();
680 const GEOM::ListOfFields& fields,
681 const char* geomAssocFields);
687 const bool theIsDump);
703 std::map<int, SMESH::SMESH_Hypothesis_ptr>
_mapHypo;
728 void addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
729 CORBA::Object_ptr theSmeshObj);
733 void removeGeomGroupData(CORBA::Object_ptr theSmeshObj);