1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_StudyAPI.h
25 // Author : Yves FRICAUD
29 #ifndef _INCLUDE_SMESHGUI_StudyAPI_
30 #define _INCLUDE_SMESHGUI_StudyAPI_
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Gen)
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
37 #include CORBA_SERVER_HEADER(GEOM_Shape)
38 #include CORBA_SERVER_HEADER(SALOMEDS)
39 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
41 class SMESH_subMesh_ptr;
43 class SMESHGUI_StudyAPI {
49 SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy, SMESH::SMESH_Gen_ptr Gen);
51 ~SMESHGUI_StudyAPI ();
54 CORBA::Object_ptr StringToIOR(const char* IOR);
56 SALOMEDS::SObject_ptr AddNewMesh (SMESH::SMESH_Mesh_ptr M);
58 SALOMEDS::SObject_ptr AddNewHypothesis (SMESH::SMESH_Hypothesis_ptr H);
59 SALOMEDS::SObject_ptr AddNewAlgorithms (SMESH::SMESH_Hypothesis_ptr H);
61 SALOMEDS::SObject_ptr AddSubMeshOnShape (SALOMEDS::SObject_ptr SO_Mesh, SMESH::SMESH_subMesh_ptr SM, GEOM::shape_type ST);
63 SALOMEDS::SObject_ptr AddSubMeshOnShape (SALOMEDS::SObject_ptr SO_Mesh, SALOMEDS::SObject_ptr SO_GeomShape, SMESH::SMESH_subMesh_ptr SM, GEOM::shape_type ST);
65 void Update(SMESH::SMESH_Gen_ptr Gen);
67 void ModifiedMesh( SALOMEDS::SObject_ptr MorSM, bool right);
70 void SetShape (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_GeomShape);
71 GEOM::GEOM_Shape_ptr GetShapeOnMeshOrSubMesh(SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh);
73 void SetHypothesis (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_Hypothesis);
74 void SetAlgorithms (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_Algorithms);
76 void UnSetHypothesis (SALOMEDS::SObject_ptr SO_Applied_Hypothesis);
77 void UnSetAlgorithm (SALOMEDS::SObject_ptr SO_Applied_Algorithm);
79 void SetTagHypothesisRoot();
81 void SetName( SALOMEDS::SObject_ptr SO, const char* Name ) ;
85 SALOMEDS::SObject_ptr GetMeshOrSubmesh (SALOMEDS::SObject_ptr SO);
87 SALOMEDS::SObject_ptr FindMesh (SMESH::SMESH_Mesh_ptr M);
89 SALOMEDS::SObject_ptr FindHypothesisOrAlgorithms (SMESH::SMESH_Hypothesis_ptr H);
91 SALOMEDS::SObject_ptr FindSubMesh (SMESH::SMESH_subMesh_ptr SM);
93 //SALOMEDS::ListOfSObject_ptr FindMesh (SALOMEDS_SObject_ptr SO_GeomShape);
94 //SALOMEDS_SObject_ptr FindSubMesh (SALOMEDS_SObject_ptr SO_Mesh, SALOMEDS_SObject_ptr SO_GeomShape);
100 SALOMEDS::Study_var myStudy;
101 SALOMEDS::StudyBuilder_var myStudyBuilder;
102 SALOMEDS::SComponent_var mySComponentMesh;