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)
40 #include CORBA_SERVER_HEADER(SALOME_GenericObj)
42 class SMESH_subMesh_ptr;
44 class SMESHGUI_StudyAPI {
50 SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy, SMESH::SMESH_Gen_ptr Gen);
52 ~SMESHGUI_StudyAPI ();
55 CORBA::Object_ptr StringToIOR(const char* IOR);
57 SALOMEDS::SObject_ptr AddNewMesh (SMESH::SMESH_Mesh_ptr M);
59 SALOMEDS::SObject_ptr AddNewHypothesis (SMESH::SMESH_Hypothesis_ptr H);
60 SALOMEDS::SObject_ptr AddNewAlgorithms (SMESH::SMESH_Hypothesis_ptr H);
62 SALOMEDS::SObject_ptr AddSubMeshOnShape (SALOMEDS::SObject_ptr SO_Mesh, SMESH::SMESH_subMesh_ptr SM, GEOM::shape_type ST);
64 SALOMEDS::SObject_ptr AddSubMeshOnShape (SALOMEDS::SObject_ptr SO_Mesh, SALOMEDS::SObject_ptr SO_GeomShape, SMESH::SMESH_subMesh_ptr SM, GEOM::shape_type ST);
66 void Update(SALOMEDS::Study_ptr aStudy);
68 void ModifiedMesh( SALOMEDS::SObject_ptr MorSM, bool right);
71 void SetShape (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_GeomShape);
72 GEOM::GEOM_Shape_ptr GetShapeOnMeshOrSubMesh(SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh);
74 void SetHypothesis (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_Hypothesis);
75 void SetAlgorithms (SALOMEDS::SObject_ptr SO_Mesh_Or_SubMesh, SALOMEDS::SObject_ptr SO_Algorithms);
77 void UnSetHypothesis (SALOMEDS::SObject_ptr SO_Applied_Hypothesis);
78 void UnSetAlgorithm (SALOMEDS::SObject_ptr SO_Applied_Algorithm);
80 void SetTagHypothesisRoot();
82 void SetName( SALOMEDS::SObject_ptr SO, const char* Name ) ;
86 SALOMEDS::SObject_ptr GetMeshOrSubmesh (SALOMEDS::SObject_ptr SO);
88 SALOMEDS::SObject_ptr FindObject(CORBA::Object_ptr theObject);
94 SALOMEDS::Study_var myStudy;
95 SALOMEDS::StudyBuilder_var myStudyBuilder;