]> SALOME platform Git repositories - modules/visu.git/blob - src/ENGINE/VISU_Engine_i.hh
Salome HOME
Issue 0020085: EDF 874 VISU : Visualize evolution of a variable at a given location
[modules/visu.git] / src / ENGINE / VISU_Engine_i.hh
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 #ifndef __VISU_ENGINE_I_H__
23 #define __VISU_ENGINE_I_H__
24
25 // IDL headers
26 #include "SALOMEconfig.h"
27 #include CORBA_SERVER_HEADER(VISU_Gen)
28 #include CORBA_SERVER_HEADER(MED)
29 #include CORBA_SERVER_HEADER(SALOME_Session)
30 #include CORBA_SERVER_HEADER(SALOMEDS)
31 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
32
33 #include "SALOME_Component_i.hxx"
34
35 namespace VISU
36 {
37   class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
38                      public virtual ::Engines_Component_i
39   {
40     VISU_Gen_var myVisuGen;
41     VISU_Gen_i();
42     VISU_Gen_i(const VISU::VISU_Gen_i &);
43   public:
44     VISU_Gen_i(SALOME::Session_ptr session,
45                CORBA::ORB_ptr orb,
46                PortableServer::POA_ptr poa,
47                PortableServer::ObjectId * contId, 
48                const char *instanceName, 
49                const char *interfaceName);
50     virtual ~VISU_Gen_i();
51
52     virtual char* GetID();
53     virtual VISU::VISUType GetType();
54
55     virtual void SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
56     virtual SALOMEDS::Study_ptr GetCurrentStudy();
57
58     virtual ViewManager_ptr GetViewManager();
59
60     virtual SALOMEDS::SObject_ptr ImportTables(const char* theFileName);
61     virtual CORBA::Boolean ExportTableToFile(SALOMEDS::SObject_ptr theTable, const char* theFileName);
62
63     //Create Result
64     virtual Result_ptr ImportFile(const char* theFileName);
65     virtual Result_ptr CreateResult(const char* theFileName);
66     virtual Result_ptr CopyAndImportFile(const char* theFileName);
67     virtual Result_ptr ImportMed(SALOMEDS::SObject_ptr theMedSObject);
68     virtual Result_ptr ImportMedField(SALOME_MED::FIELD_ptr theField);
69
70     //Create Presentation Of Submeshes
71     virtual Mesh_ptr MeshOnEntity(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity);
72     virtual Mesh_ptr FamilyMeshOnEntity(Result_ptr theResult, const char* theMeshName,
73                                         VISU::Entity theEntity, const char* theFamilyName);
74     virtual Mesh_ptr GroupMesh(Result_ptr theResult, const char* theMeshName, const char* theGroupName);
75
76     //Rename Presentation Of Submeshes
77     virtual void RenameEntityInStudy(Result_ptr theResult, const char* theMeshName,
78                                      VISU::Entity theEntity, const char* theNewName);
79     virtual void RenameFamilyInStudy(Result_ptr theResult, const char* theMeshName, VISU::Entity theEntity,
80                                      const char* theFamilyName, const char* theNewName);
81     virtual void RenameGroupInStudy (Result_ptr theResult, const char* theMeshName,
82                                      const char* theGroupName, const char* theNewName);
83
84     //Create Presentation Of Results
85     virtual 
86     ScalarMap_ptr
87     ScalarMapOnField(Result_ptr theResult, 
88                      const char* theMeshName, 
89                      VISU::Entity theEntity,
90                      const char* theFieldName, 
91                      CORBA::Long theIteration);
92
93     virtual 
94     GaussPoints_ptr 
95     GaussPointsOnField(Result_ptr theResult, 
96                        const char* theMeshName, 
97                        VISU::Entity theEntity,
98                        const char* theFieldName, 
99                        CORBA::Long theIteration);
100
101     virtual 
102     DeformedShape_ptr
103     DeformedShapeOnField(Result_ptr theResult, 
104                          const char* theMeshName, 
105                          VISU::Entity theEntity,
106                          const char* theFieldName, 
107                          CORBA::Long theIteration);
108
109     virtual 
110     Vectors_ptr
111     VectorsOnField(Result_ptr theResult, 
112                    const char* theMeshName, 
113                    VISU::Entity theEntity,
114                    const char* theFieldName, 
115                    CORBA::Long theIteration);
116
117     virtual
118     IsoSurfaces_ptr
119     IsoSurfacesOnField(Result_ptr theResult, 
120                        const char* theMeshName, 
121                        VISU::Entity theEntity,
122                        const char* theFieldName, 
123                        CORBA::Long theIteration);
124
125     virtual
126     CutPlanes_ptr
127     CutPlanesOnField(Result_ptr theResult, 
128                      const char* theMeshName, 
129                      VISU::Entity theEntity,
130                      const char* theFieldName, 
131                      CORBA::Long theIteration);
132
133     virtual
134     CutLines_ptr
135     CutLinesOnField(Result_ptr theResult, 
136                     const char* theMeshName, 
137                     VISU::Entity theEntity,
138                     const char* theFieldName, 
139                     CORBA::Long theIteration);
140
141     virtual
142     CutSegment_ptr
143     CutSegmentOnField(Result_ptr theResult, 
144                       const char* theMeshName, 
145                       VISU::Entity theEntity,
146                       const char* theFieldName, 
147                       CORBA::Long theIteration);
148
149     virtual
150     StreamLines_ptr 
151     StreamLinesOnField(Result_ptr theResult, 
152                        const char* theMeshName, 
153                        VISU::Entity theEntity,
154                        const char* theFieldName, 
155                        CORBA::Long theIteration);
156
157     virtual
158     Plot3D_ptr
159     Plot3DOnField(Result_ptr theResult, 
160                   const char* theMeshName, 
161                   VISU::Entity theEntity,
162                   const char* theFieldName, 
163                   CORBA::Long theIteration);
164
165     //This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
166     virtual
167     DeformedShapeAndScalarMap_ptr
168     ScalarMapOnDeformedShapeOnField(Result_ptr theResult, 
169                                     const char* theMeshName, 
170                                     VISU::Entity theEntity,
171                                     const char* theFieldName, 
172                                     CORBA::Long theIteration);
173
174     virtual
175     DeformedShapeAndScalarMap_ptr
176     DeformedShapeAndScalarMapOnField(Result_ptr theResult, 
177                                      const char* theMeshName, 
178                                      VISU::Entity theEntity,
179                                      const char* theFieldName, 
180                                      CORBA::Long theIteration);
181     
182     //Create Digital Presentation
183     virtual Table_ptr CreateTable(const char* theTableEntry);
184     virtual Curve_ptr CreateCurve(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow);
185     virtual Curve_ptr CreateCurveWithZ(Table_ptr theTable, CORBA::Long theHRow, CORBA::Long theVRow, CORBA::Long theZRow);
186     virtual Container_ptr CreateContainer();
187     virtual Animation_ptr CreateAnimation(View3D_ptr theView3d);
188     virtual Evolution_ptr CreateEvolution(XYPlot_ptr theXYPlot);
189     
190     virtual void DeleteResult(Result_ptr theResult);
191     virtual void DeletePrs3d(Prs3d_ptr thePrs3d);
192
193     // inherited methods from SALOMEDS::Driver
194     virtual SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent,
195                                     const char* theURL,
196                                     bool isMultiFile);
197     virtual SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent,
198                                          const char* theURL,
199                                          bool isMultiFile);
200     virtual bool Load(SALOMEDS::SComponent_ptr,
201                       const SALOMEDS::TMPFile &,
202                       const char* theURL,
203                       bool isMultiFile);
204     virtual bool LoadASCII(SALOMEDS::SComponent_ptr,
205                            const SALOMEDS::TMPFile &,
206                            const char* theURL,
207                            bool isMultiFile);
208
209     virtual void Close(SALOMEDS::SComponent_ptr IORSComponent); 
210
211     virtual char* ComponentDataType();
212
213     virtual char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
214                                          const char* IORString,
215                                          CORBA::Boolean isMultiFile,
216                                          CORBA::Boolean isASCII);
217     virtual char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
218                                          const char* aLocalPersistentID,
219                                          CORBA::Boolean isMultiFile,
220                                          CORBA::Boolean isASCII);
221
222     virtual bool CanPublishInStudy(CORBA::Object_ptr theIOR);
223     virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy,
224                                                  SALOMEDS::SObject_ptr theSObject,
225                                                  CORBA::Object_ptr theObject,
226                                                  const char* theName) throw (SALOME::SALOME_Exception);
227
228     CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
229     SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID);
230     CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID);
231     SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream,
232                                     CORBA::Long theObjectID,
233                                     SALOMEDS::SObject_ptr theObject);
234
235     // inherited methods from Engines::Component
236     virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
237                                          CORBA::Boolean theIsPublished,
238                                          CORBA::Boolean& theIsValidScript);   
239
240     virtual
241     VISU::ColoredPrs3dCache_ptr
242     GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);
243     
244
245
246     virtual CORBA::Long CreateClippingPlane(CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
247                                             CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
248                                             CORBA::Boolean isAuto, const char* name);
249
250     virtual void EditClippingPlane(CORBA::Long id, CORBA::Double X,CORBA::Double  Y, CORBA::Double Z, 
251                                    CORBA::Double dX, CORBA::Double dY, CORBA::Double dZ, 
252                                    CORBA::Boolean isAuto, const char* name);
253
254     /* Returns clipping plane by its Id */
255     virtual VISU::ClippingPlane* GetClippingPlane(CORBA::Long id);
256     
257     /* Deletes clipping plane by its Id */
258     virtual CORBA::Boolean DeleteClippingPlane(CORBA::Long id);
259     
260     /* Applyes a clipping plane with Id to presentation thePrs */
261     virtual CORBA::Boolean ApplyClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
262     
263     /* Detaches a clipping plane with Id from presentation thePrs */
264     virtual CORBA::Boolean DetachClippingPlane(Prs3d_ptr thePrs, CORBA::Long id);
265     
266     /* Get number of clipping planes */
267     virtual CORBA::Long GetClippingPlanesNb();
268
269     /* Convert a set of VTK files to the MED file */
270     virtual CORBA::Boolean VTK2MED( const VISU::string_array& theVTKFiles,
271                                     const char* theMEDFile,
272                                     const char* theMeshName,
273                                     const VISU::double_array& theTStamps );
274   };
275 };
276
277
278 #endif