1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : VISU_Gen_i.hh
21 // Author : Alexey Petrov
24 #ifndef __VISU_GEN_I_H__
25 #define __VISU_GEN_I_H__
27 #include "VISUConfig.hh"
30 #include "SALOME_Component_i.hxx"
31 #include "SALOME_NamingService.hxx"
32 #include "VISU_ColoredPrs3d_i.hh"
38 //----------------------------------------------------------------------------
39 class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
40 public virtual ::Engines_Component_i,
43 SALOMEDS::Study_var myStudyDocument;
44 VISU_Gen_i(const VISU::VISU_Gen_i &);
46 VISU_Gen_i(CORBA::ORB_ptr theORB,
47 PortableServer::POA_ptr thePOA,
48 SALOME_NamingService* theNamingService,
60 GetType() { return VISU::TVISUGEN;};
64 SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
76 ImportTables(const char* theFileName);
80 ExportTableToFile(SALOMEDS::SObject_ptr theTable,
81 const char* theFileName );
86 ImportFile(const char* theFileName);
90 CreateResult(const char* theFileName);
94 CopyAndImportFile(const char* theFileName);
98 ImportMed(SALOMEDS::SObject_ptr theMedSObject);
102 ImportMedField(SALOME_MED::FIELD_ptr theField);
105 //Rename Presentation Of Submeshes
107 RenameMeshInStudy(Result_ptr theResult,
108 const std::string& theMeshName,
109 int theEntity, // -1 for group indication
110 const std::string& theSubMeshName, // Family or Group name
111 const std::string& theNewName);
114 RenameEntityInStudy(Result_ptr theResult,
115 const char* theMeshName,
116 VISU::Entity theEntity,
117 const char* theNewName);
120 RenameFamilyInStudy(Result_ptr theResult,
121 const char* theMeshName,
122 VISU::Entity theEntity,
123 const char* theFamilyName,
124 const char* theNewName);
127 RenameGroupInStudy(Result_ptr theResult,
128 const char* theMeshName,
129 const char* theGroupName,
130 const char* theNewName);
132 //Create Presentation Of Submeshes
135 MeshOnEntity(Result_ptr theResult,
136 const char* theMeshName,
137 VISU::Entity theEntity);
141 FamilyMeshOnEntity(Result_ptr theResult,
142 const char* theMeshName,
143 VISU::Entity theEntity,
144 const char* theFamilyName);
148 GroupMesh(Result_ptr theResult,
149 const char* theMeshName,
150 const char* theGroupName);
153 CreatePrs3d(VISUType theType,
154 SALOMEDS::Study_ptr theStudy);
158 ScalarMapOnField(Result_ptr theResult,
159 const char* theMeshName,
160 VISU::Entity theEntity,
161 const char* theFieldName,
162 CORBA::Long theIteration);
166 GaussPointsOnField(Result_ptr theResult,
167 const char* theMeshName,
168 VISU::Entity theEntity,
169 const char* theFieldName,
170 CORBA::Long theIteration);
174 DeformedShapeOnField(Result_ptr theResult,
175 const char* theMeshName,
176 VISU::Entity theEntity,
177 const char* theFieldName,
178 CORBA::Long theIteration);
181 ScalarMapOnDeformedShape_ptr
182 ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
183 const char* theMeshName,
184 VISU::Entity theEntity,
185 const char* theFieldName,
186 CORBA::Long theIteration);
189 VectorsOnField(Result_ptr theResult,
190 const char* theMeshName,
191 VISU::Entity theEntity,
192 const char* theFieldName,
193 CORBA::Long theIteration);
197 IsoSurfacesOnField(Result_ptr theResult,
198 const char* theMeshName,
199 VISU::Entity theEntity,
200 const char* theFieldName,
201 CORBA::Long theIteration);
205 CutPlanesOnField(Result_ptr theResult,
206 const char* theMeshName,
207 VISU::Entity theEntity,
208 const char* theFieldName,
209 CORBA::Long theIteration);
213 CutLinesOnField(Result_ptr theResult,
214 const char* theMeshName,
215 VISU::Entity theEntity,
216 const char* theFieldName,
217 CORBA::Long theIteration);
221 StreamLinesOnField(Result_ptr theResult,
222 const char* theMeshName,
223 VISU::Entity theEntity,
224 const char* theFieldName,
225 CORBA::Long theIteration);
229 Plot3DOnField(Result_ptr theResult,
230 const char* theMeshName,
231 VISU::Entity theEntity,
232 const char* theFieldName,
233 CORBA::Long theIteration);
235 //Create Digital Presentation
238 CreateTable(const char* theTableEntry);
242 CreateCurve(Table_ptr theTable,
244 CORBA::Long theVRow);
247 CreateCurveWithZ(Table_ptr theTable,
250 CORBA::Long theZRow);
258 CreateAnimation(View3D_ptr theView3d);
262 DeleteResult(Result_ptr theResult);
266 DeletePrs3d(Prs3d_ptr thePrs3d);
268 // inherited methods from Engines::Component
271 DumpPython(CORBA::Object_ptr theStudy,
272 CORBA::Boolean theIsPublished,
273 CORBA::Boolean& theIsValidScript);
275 // inherited methods from SALOMEDS::Driver
278 Save(SALOMEDS::SComponent_ptr theComponent,
284 SaveASCII(SALOMEDS::SComponent_ptr theComponent,
290 Load(SALOMEDS::SComponent_ptr,
291 const SALOMEDS::TMPFile &,
297 LoadASCII(SALOMEDS::SComponent_ptr,
298 const SALOMEDS::TMPFile &,
304 Close(SALOMEDS::SComponent_ptr IORSComponent);
312 IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
313 const char* IORString,
314 CORBA::Boolean isMultiFile,
315 CORBA::Boolean isASCII);
319 LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
320 const char* aLocalPersistentID,
321 CORBA::Boolean isMultiFile,
322 CORBA::Boolean isASCII);
326 CanPublishInStudy(CORBA::Object_ptr theIOR);
329 SALOMEDS::SObject_ptr
330 PublishInStudy(SALOMEDS::Study_ptr theStudy,
331 SALOMEDS::SObject_ptr theSObject,
332 CORBA::Object_ptr theObject,
333 const char* theName) throw (SALOME::SALOME_Exception);
336 CanCopy(SALOMEDS::SObject_ptr theObject);
339 CopyFrom(SALOMEDS::SObject_ptr theObject,
340 CORBA::Long& theObjectID);
343 CanPaste(const char* theComponentName,
344 CORBA::Long theObjectID);
346 SALOMEDS::SObject_ptr
347 PasteInto(const SALOMEDS::TMPFile& theStream,
348 CORBA::Long theObjectID,
349 SALOMEDS::SObject_ptr theObject);
352 VISU::ColoredPrs3dCache_ptr
353 GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy);