1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : VISU_GEN_i.h file
6 // Author : Alexey Petrov
10 #ifndef __VISU_GEN_I_H__
11 #define __VISU_GEN_I_H__
13 #include "VISUConfig.hh"
15 #include "SALOME_Component_i.hxx"
16 #include "SALOME_NamingService.hxx"
24 CreatColoredPrs3d(ColoredPrs3d_i* theColoredPrs3d,
25 const char* theMeshName,
26 VISU::Entity theEntity,
27 const char* theFieldName,
28 CORBA::Double theIteration);
30 class VISU_Gen_i : public virtual POA_VISU::VISU_Gen,
31 public virtual ::Engines_Component_i,
34 SALOMEDS::Study_var myStudyDocument;
36 VISU_Gen_i(const VISU::VISU_Gen_i &);
38 VISU_Gen_i(CORBA::ORB_ptr theORB,
39 PortableServer::POA_ptr thePOA,
40 SALOME_NamingService* theNamingService,
42 virtual ~VISU_Gen_i();
50 GetType() { return VISU::TVISUGEN;};
54 SetCurrentStudy(SALOMEDS::Study_ptr theStudy);
66 ImportTables(const char* theFileName);
70 ExportTableToFile(SALOMEDS::SObject_ptr theTable,
71 const char* theFileName );
76 ImportFile(const char* theFileName);
80 CreateResult(const char* theFileName);
84 CopyAndImportFile(const char* theFileName);
88 ImportMed(SALOMEDS::SObject_ptr theMedSObject);
92 ImportMedField(SALOME_MED::FIELD_ptr theField);
95 //Create Presentation Of Submeshes
98 MeshOnEntity(Result_ptr theResult,
99 const char* theMeshName,
100 VISU::Entity theEntity);
104 FamilyMeshOnEntity(Result_ptr theResult,
105 const char* theMeshName,
106 VISU::Entity theEntity,
107 const char* theFamilyName);
111 GroupMesh(Result_ptr theResult,
112 const char* theMeshName,
113 const char* theGroupName);
115 //Create 3D collored Presentation Of Different Types
116 template<typename TPrs3d_i> TPrs3d_i*
117 CreatePrs3d(Result_ptr theResult,
118 const char* theMeshName,
119 VISU::Entity theEntity,
120 const char* theFieldName,
121 CORBA::Double theIteration,
122 bool theAddToStudy = true)
124 if(myStudyDocument->GetProperties()->IsLocked())
127 typedef typename TPrs3d_i::TInterface TPrs3d;
128 typename TPrs3d::_var_type aPrs3d;
130 if(Result_i* aResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
131 if(TPrs3d_i::IsPossible(aResult,theMeshName,theEntity,theFieldName,int(theIteration))){
132 TPrs3d_i* aPresent = new TPrs3d_i(aResult,theAddToStudy);
133 if(CreatColoredPrs3d(aPresent,theMeshName,theEntity,theFieldName,theIteration))
135 aPresent->_remove_ref();
141 template<typename TPrs3d_i> typename TPrs3d_i::TInterface::_var_type
142 Prs3dOnField(Result_ptr theResult,
143 const char* theMeshName,
144 VISU::Entity theEntity,
145 const char* theFieldName,
146 CORBA::Double theIteration,
147 bool theAddToStudy = true)
149 typedef typename TPrs3d_i::TInterface TPrs3d;
150 typename TPrs3d::_var_type aPrs3d;
151 if(TPrs3d_i* aPrs3d = CreatePrs3d<TPrs3d_i>(theResult,theMeshName,theEntity,theFieldName,theIteration,theAddToStudy))
152 return aPrs3d->_this();
153 return TPrs3d::_nil();
158 ScalarMapOnField(Result_ptr theResult,
159 const char* theMeshName,
160 VISU::Entity theEntity,
161 const char* theFieldName,
162 CORBA::Double theIteration);
166 GaussPointsOnField(Result_ptr theResult,
167 const char* theMeshName,
168 VISU::Entity theEntity,
169 const char* theFieldName,
170 CORBA::Double theIteration);
174 DeformedShapeOnField(Result_ptr theResult,
175 const char* theMeshName,
176 VISU::Entity theEntity,
177 const char* theFieldName,
178 CORBA::Double theIteration);
181 ScalarMapOnDeformedShape_ptr
182 ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
183 const char* theMeshName,
184 VISU::Entity theEntity,
185 const char* theFieldName,
186 CORBA::Double theIteration);
189 VectorsOnField(Result_ptr theResult,
190 const char* theMeshName,
191 VISU::Entity theEntity,
192 const char* theFieldName,
193 CORBA::Double theIteration);
197 IsoSurfacesOnField(Result_ptr theResult,
198 const char* theMeshName,
199 VISU::Entity theEntity,
200 const char* theFieldName,
201 CORBA::Double theIteration);
205 CutPlanesOnField(Result_ptr theResult,
206 const char* theMeshName,
207 VISU::Entity theEntity,
208 const char* theFieldName,
209 CORBA::Double theIteration);
213 CutLinesOnField(Result_ptr theResult,
214 const char* theMeshName,
215 VISU::Entity theEntity,
216 const char* theFieldName,
217 CORBA::Double theIteration);
221 StreamLinesOnField(Result_ptr theResult,
222 const char* theMeshName,
223 VISU::Entity theEntity,
224 const char* theFieldName,
225 CORBA::Double theIteration);
229 Plot3DOnField(Result_ptr theResult,
230 const char* theMeshName,
231 VISU::Entity theEntity,
232 const char* theFieldName,
233 CORBA::Double theIteration);
235 //Create Digital Presentation
238 CreateTable(const char* theTableEntry);
242 CreateCurve(Table_ptr theTable,
244 CORBA::Long theVRow);
252 CreateAnimation(View3D_ptr theView3d);
256 DeleteResult(Result_ptr theResult);
260 DeletePrs3d(Prs3d_ptr thePrs3d);
262 // inherited methods from Engines::Component
265 DumpPython(CORBA::Object_ptr theStudy,
266 CORBA::Boolean theIsPublished,
267 CORBA::Boolean& theIsValidScript);
269 // inherited methods from SALOMEDS::Driver
272 Save(SALOMEDS::SComponent_ptr theComponent,
278 SaveASCII(SALOMEDS::SComponent_ptr theComponent,
284 Load(SALOMEDS::SComponent_ptr,
285 const SALOMEDS::TMPFile &,
291 LoadASCII(SALOMEDS::SComponent_ptr,
292 const SALOMEDS::TMPFile &,
298 Close(SALOMEDS::SComponent_ptr IORSComponent);
306 IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
307 const char* IORString,
308 CORBA::Boolean isMultiFile,
309 CORBA::Boolean isASCII);
313 LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
314 const char* aLocalPersistentID,
315 CORBA::Boolean isMultiFile,
316 CORBA::Boolean isASCII);
320 CanPublishInStudy(CORBA::Object_ptr theIOR);
323 SALOMEDS::SObject_ptr
324 PublishInStudy(SALOMEDS::Study_ptr theStudy,
325 SALOMEDS::SObject_ptr theSObject,
326 CORBA::Object_ptr theObject,
327 const char* theName) throw (SALOME::SALOME_Exception);
330 CanCopy(SALOMEDS::SObject_ptr theObject);
333 CopyFrom(SALOMEDS::SObject_ptr theObject,
334 CORBA::Long& theObjectID);
337 CanPaste(const char* theComponentName,
338 CORBA::Long theObjectID);
340 SALOMEDS::SObject_ptr
341 PasteInto(const SALOMEDS::TMPFile& theStream,
342 CORBA::Long theObjectID,
343 SALOMEDS::SObject_ptr theObject);