1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESH_Gen_i.hxx
23 // Author : Paul RASCLE, EDF
26 #ifndef _SMESH_GEN_I_HXX_
27 #define _SMESH_GEN_I_HXX_
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SMESH_Gen)
33 #include CORBA_SERVER_HEADER(SMESH_Mesh)
34 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
35 #include CORBA_CLIENT_HEADER(GEOM_Gen)
36 #include CORBA_CLIENT_HEADER(SALOMEDS)
37 #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
39 #include "SMESH_Gen.hxx"
40 #include "SMESH_Mesh_i.hxx"
41 #include "SMESH_Hypothesis_i.hxx"
43 #include <SALOME_Component_i.hxx>
44 #include <SALOME_NamingService.hxx>
45 #include <Utils_CorbaException.hxx>
47 #include <GEOM_Client.hxx>
49 #include <TCollection_AsciiString.hxx>
50 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
51 #include <TColStd_HSequenceOfAsciiString.hxx>
57 class SALOME_LifeCycleCORBA;
59 // ===========================================================
60 // Study context - stores study-connected objects references
61 // ==========================================================
62 class SMESH_I_EXPORT StudyContext
73 // register object in the internal map and return its id
74 int addObject( string theIOR )
76 int nextId = getNextId();
77 mapIdToIOR[ nextId ] = theIOR;
80 // find the object id in the internal map by the IOR
81 int findId( string theIOR )
83 map<int, string>::iterator imap;
84 for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) {
85 if ( imap->second == theIOR )
90 // get object's IOR by id
91 string getIORbyId( const int theId )
93 if ( mapIdToIOR.find( theId ) != mapIdToIOR.end() )
94 return mapIdToIOR[ theId ];
97 // get object's IOR by old id
98 string getIORbyOldId( const int theOldId )
100 if ( mapIdToId.find( theOldId ) != mapIdToId.end() )
101 return getIORbyId( mapIdToId[ theOldId ] );
104 // maps old object id to the new one (used when restoring data)
105 void mapOldToNew( const int oldId, const int newId ) {
106 mapIdToId[ oldId ] = newId;
108 // get old id by a new one
109 int getOldId( const int newId ) {
110 map<int, int>::iterator imap;
111 for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) {
112 if ( imap->second == newId )
119 // get next free object identifier
123 while( mapIdToIOR.find( id ) != mapIdToIOR.end() )
128 map<int, string> mapIdToIOR; // persistent-to-transient map
129 map<int, int> mapIdToId; // used to translate object from persistent to transient form
132 // ===========================================================
133 // SMESH module's engine
134 // ==========================================================
135 class SMESH_I_EXPORT SMESH_Gen_i:
136 public virtual POA_SMESH::SMESH_Gen,
137 public virtual Engines_Component_i
140 // Get last created instance of the class
141 static SMESH_Gen_i* GetSMESHGen() { return mySMESHGen;}
143 static CORBA::ORB_var GetORB() { return myOrb;}
144 // Get SMESH module's POA object
145 static PortableServer::POA_var GetPOA() { return myPoa;}
146 // Get Naming Service object
147 static SALOME_NamingService* GetNS();
148 // Get SALOME_LifeCycleCORBA object
149 static SALOME_LifeCycleCORBA* GetLCC();
150 // Retrieve and get GEOM engine reference
151 static GEOM::GEOM_Gen_var GetGeomEngine();
152 // Get object of the CORBA reference
153 static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject );
154 // Get CORBA object corresponding to the SALOMEDS::SObject
155 static CORBA::Object_var SObjectToObject( SALOMEDS::SObject_ptr theSObject );
156 // Get the SALOMEDS::SObject corresponding to a CORBA object
157 static SALOMEDS::SObject_ptr ObjectToSObject(SALOMEDS::Study_ptr theStudy,
158 CORBA::Object_ptr theObject);
159 // Get GEOM Object correspoding to TopoDS_Shape
160 GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape& theShape );
161 // Get TopoDS_Shape correspoding to GEOM_Object
162 TopoDS_Shape GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject);
164 // Default constructor
166 // Standard constructor
167 SMESH_Gen_i( CORBA::ORB_ptr orb,
168 PortableServer::POA_ptr poa,
169 PortableServer::ObjectId* contId,
170 const char* instanceName,
171 const char* interfaceName );
173 virtual ~SMESH_Gen_i();
175 // *****************************************
177 // *****************************************
178 // Set a new Mesh object name
179 void SetName(const char* theIOR,
180 const char* theName);
182 //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
183 void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
186 void SetEmbeddedMode( CORBA::Boolean theMode );
188 CORBA::Boolean IsEmbeddedMode();
191 void SetCurrentStudy( SALOMEDS::Study_ptr theStudy );
193 SALOMEDS::Study_ptr GetCurrentStudy();
195 // Create hypothesis/algorothm of given type
196 SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const char* theHypType,
197 const char* theLibName)
198 throw ( SALOME::SALOME_Exception );
200 // Return hypothesis of given type holding parameter values of the existing mesh
201 SMESH::SMESH_Hypothesis_ptr GetHypothesisParameterValues (const char* theHypType,
202 const char* theLibName,
203 SMESH::SMESH_Mesh_ptr theMesh,
204 GEOM::GEOM_Object_ptr theGeom,
205 CORBA::Boolean byMesh)
206 throw ( SALOME::SALOME_Exception );
211 * Sets number of segments per diagonal of boundary box of geometry by which
212 * default segment length of appropriate 1D hypotheses is defined
214 void SetBoundaryBoxSegmentation( CORBA::Long theNbSegments ) throw ( SALOME::SALOME_Exception );
216 * \brief Sets default number of segments per edge
218 void SetDefaultNbSegments(CORBA::Long theNbSegments) throw ( SALOME::SALOME_Exception );
223 virtual void SetOption(const char*, const char*);
225 Return an option value
227 virtual char* GetOption(const char*);
230 * To load full mesh data from study at hyp modification or not
232 bool ToForgetMeshDataOnHypModif() const { return myToForgetMeshDataOnHypModif; }
235 // Create empty mesh on a shape
236 SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject )
237 throw ( SALOME::SALOME_Exception );
240 SMESH::SMESH_Mesh_ptr CreateEmptyMesh()
241 throw ( SALOME::SALOME_Exception );
243 // Create a mesh and import data from an UNV file
244 SMESH::SMESH_Mesh_ptr CreateMeshesFromUNV( const char* theFileName )
245 throw ( SALOME::SALOME_Exception );
247 // Create mesh(es) and import data from MED file
248 SMESH::mesh_array* CreateMeshesFromMED( const char* theFileName,
249 SMESH::DriverMED_ReadStatus& theStatus )
250 throw ( SALOME::SALOME_Exception );
252 // Create mesh(es) and import data from MED file
253 SMESH::mesh_array* CreateMeshesFromSAUV( const char* theFileName,
254 SMESH::DriverMED_ReadStatus& theStatus )
255 throw ( SALOME::SALOME_Exception );
257 // Create a mesh and import data from a STL file
258 SMESH::SMESH_Mesh_ptr CreateMeshesFromSTL( const char* theFileName )
259 throw ( SALOME::SALOME_Exception );
261 // Create mesh(es) and import data from CGNS file
262 SMESH::mesh_array* CreateMeshesFromCGNS( const char* theFileName,
263 SMESH::DriverMED_ReadStatus& theStatus )
264 throw ( SALOME::SALOME_Exception );
266 // Create a mesh and import data from a GMF file
267 SMESH::SMESH_Mesh_ptr CreateMeshesFromGMF( const char* theFileName,
268 CORBA::Boolean theMakeRequiredGroups,
269 SMESH::ComputeError_out theError)
270 throw ( SALOME::SALOME_Exception );
272 // Copy a part of mesh
273 SMESH::SMESH_Mesh_ptr CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
274 const char* meshName,
275 CORBA::Boolean toCopyGroups,
276 CORBA::Boolean toKeepIDs);
278 // Compute mesh on a shape
279 CORBA::Boolean Compute( SMESH::SMESH_Mesh_ptr theMesh,
280 GEOM::GEOM_Object_ptr theShapeObject )
281 throw ( SALOME::SALOME_Exception );
283 // Cancel Compute mesh on a shape
284 void CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
285 GEOM::GEOM_Object_ptr theShapeObject );
288 * \brief Return errors of mesh computation
290 SMESH::compute_error_array* GetComputeErrors(SMESH::SMESH_Mesh_ptr theMesh,
291 GEOM::GEOM_Object_ptr theShapeObject )
292 throw ( SALOME::SALOME_Exception );
295 * Evaluate mesh on a shape and
296 * returns statistic of mesh elements
297 * Result array of number enityties
299 SMESH::long_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
300 GEOM::GEOM_Object_ptr theShapeObject)
301 throw ( SALOME::SALOME_Exception );
303 // Returns true if mesh contains enough data to be computed
304 CORBA::Boolean IsReadyToCompute( SMESH::SMESH_Mesh_ptr theMesh,
305 GEOM::GEOM_Object_ptr theShapeObject )
306 throw ( SALOME::SALOME_Exception );
309 * Calculate Mesh as preview till indicated dimension on shape
310 * First, verify list of hypothesis associated with the subShape.
311 * Return mesh preview structure
313 SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh,
314 GEOM::GEOM_Object_ptr theSubObject,
315 SMESH::Dimension theDimension,
316 SMESH::long_array& theShapesId )
317 throw ( SALOME::SALOME_Exception );
319 // Returns errors of hypotheses definintion
320 SMESH::algo_error_array* GetAlgoState( SMESH::SMESH_Mesh_ptr theMesh,
321 GEOM::GEOM_Object_ptr theSubObject )
322 throw ( SALOME::SALOME_Exception );
324 // Return mesh elements preventing computation of a subshape
325 SMESH::MeshPreviewStruct* GetBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
326 CORBA::Short theSubShapeID )
327 throw ( SALOME::SALOME_Exception );
329 // Create groups of elements preventing computation of a sub-shape
330 SMESH::ListOfGroups* MakeGroupsOfBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
331 CORBA::Short theSubShapeID,
332 const char* theGroupName)
333 throw ( SALOME::SALOME_Exception );
335 // Get sub-shapes unique ID's list
336 SMESH::long_array* GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject,
337 const SMESH::object_array& theListOfSubShape )
338 throw ( SALOME::SALOME_Exception );
340 // Return geometrical object the given element is built on. Publish it in study.
341 GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
342 CORBA::Long theElementID,
343 const char* theGeomName)
344 throw ( SALOME::SALOME_Exception );
346 // Return geometrical object the given element is built on. Don't publish it in study.
347 GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
348 CORBA::Long theElementID)
349 throw ( SALOME::SALOME_Exception );
351 // Concatenate the given meshes into one mesh
352 SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::mesh_array& theMeshesArray,
353 CORBA::Boolean theUniteIdenticalGroups,
354 CORBA::Boolean theMergeNodesAndElements,
355 CORBA::Double theMergeTolerance,
356 CORBA::Boolean theCommonGroups)
357 throw ( SALOME::SALOME_Exception );
359 // Concatenate the given meshes into one mesh
360 SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::mesh_array& theMeshesArray,
361 CORBA::Boolean theUniteIdenticalGroups,
362 CORBA::Boolean theMergeNodesAndElements,
363 CORBA::Double theMergeTolerance)
364 throw ( SALOME::SALOME_Exception );
366 // Concatenate the given meshes into one mesh
367 // Create the groups of all elements from initial meshes
368 SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::mesh_array& theMeshesArray,
369 CORBA::Boolean theUniteIdenticalGroups,
370 CORBA::Boolean theMergeNodesAndElements,
371 CORBA::Double theMergeTolerance)
372 throw ( SALOME::SALOME_Exception );
374 // Get MED version of the file by its name
375 CORBA::Boolean GetMEDVersion(const char* theFileName,
376 SMESH::MED_VERSION& theVersion);
378 // Get names of meshes defined in file with the specified name
379 SMESH::string_array* GetMeshNames(const char* theFileName);
381 // ****************************************************
382 // Interface inherited methods (from SALOMEDS::Driver)
383 // ****************************************************
386 SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
390 bool Load( SALOMEDS::SComponent_ptr theComponent,
391 const SALOMEDS::TMPFile& theStream,
394 // Save SMESH data in ASCII format
395 SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent,
398 // Load SMESH data in ASCII format
399 bool LoadASCII( SALOMEDS::SComponent_ptr theComponent,
400 const SALOMEDS::TMPFile& theStream,
404 // Create filter manager
405 SMESH::FilterManager_ptr CreateFilterManager();
407 // Return a pattern mesher
408 SMESH::SMESH_Pattern_ptr GetPattern();
410 // Create measurement instance
411 SMESH::Measurements_ptr CreateMeasurements();
413 // Clears study-connected data when it is closed
414 void Close( SALOMEDS::SComponent_ptr theComponent );
416 // Get component data type
417 char* ComponentDataType();
419 // Transform data from transient form to persistent
420 char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject,
421 const char* IORString,
422 CORBA::Boolean isMultiFile,
423 CORBA::Boolean isASCII );
424 // Transform data from persistent form to transient
425 char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject,
426 const char* aLocalPersistentID,
427 CORBA::Boolean isMultiFile,
428 CORBA::Boolean isASCII );
430 // Returns true if object can be published in the study
431 bool CanPublishInStudy( CORBA::Object_ptr theIOR );
432 // Publish object in the study
433 SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr theStudy,
434 SALOMEDS::SObject_ptr theSObject,
435 CORBA::Object_ptr theObject,
436 const char* theName )
437 throw ( SALOME::SALOME_Exception );
439 // Copy-paste methods - returns true if object can be copied to the clipboard
440 CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr theObject ) { return false; }
441 // Copy-paste methods - copy object to the clipboard
442 SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID ) { return false; }
443 // Copy-paste methods - returns true if object can be pasted from the clipboard
444 CORBA::Boolean CanPaste( const char* theComponentName, CORBA::Long theObjectID ) { return false; }
445 // Copy-paste methods - paste object from the clipboard
446 SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& theStream,
447 CORBA::Long theObjectID,
448 SALOMEDS::SObject_ptr theObject ) {
449 SALOMEDS::SObject_var aResultSO;
450 return aResultSO._retn();
454 // Version information
457 virtual char* getVersion();
463 virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy,
464 CORBA::Boolean isPublished,
465 CORBA::Boolean isMultiFile,
466 CORBA::Boolean& isValidScript);
468 void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString);
470 void RemoveLastFromPythonScript (int theStudyID);
472 void SavePython (SALOMEDS::Study_ptr theStudy);
474 TCollection_AsciiString DumpPython_impl (SALOMEDS::Study_ptr theStudy,
475 Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
476 Resource_DataMapOfAsciiStringAsciiString& theNames,
479 bool isHistoricalDump,
481 const TCollection_AsciiString& theSavedTrace);
483 TCollection_AsciiString GetNewPythonLines (int theStudyID);
485 void CleanPythonTrace (int theStudyID);
488 // *****************************************
490 // *****************************************
493 GEOM_Client* GetShapeReader();
496 static long GetHypothesisRootTag();
497 static long GetAlgorithmsRootTag();
498 static long GetRefOnShapeTag();
499 static long GetRefOnAppliedHypothesisTag();
500 static long GetRefOnAppliedAlgorithmsTag();
501 static long GetSubMeshOnVertexTag();
502 static long GetSubMeshOnEdgeTag();
503 static long GetSubMeshOnFaceTag();
504 static long GetSubMeshOnSolidTag();
505 static long GetSubMeshOnCompoundTag();
506 static long GetSubMeshOnWireTag();
507 static long GetSubMeshOnShellTag();
508 static long GetNodeGroupsTag();
509 static long GetEdgeGroupsTag();
510 static long GetFaceGroupsTag();
511 static long GetVolumeGroupsTag();
512 static long Get0DElementsGroupsTag();
513 static long GetBallElementsGroupsTag();
515 // publishing methods
516 SALOMEDS::SComponent_ptr PublishComponent(SALOMEDS::Study_ptr theStudy);
517 SALOMEDS::SObject_ptr PublishMesh (SALOMEDS::Study_ptr theStudy,
518 SMESH::SMESH_Mesh_ptr theMesh,
519 const char* theName = 0);
520 SALOMEDS::SObject_ptr PublishHypothesis (SALOMEDS::Study_ptr theStudy,
521 SMESH::SMESH_Hypothesis_ptr theHyp,
522 const char* theName = 0);
523 SALOMEDS::SObject_ptr PublishSubMesh (SALOMEDS::Study_ptr theStudy,
524 SMESH::SMESH_Mesh_ptr theMesh,
525 SMESH::SMESH_subMesh_ptr theSubMesh,
526 GEOM::GEOM_Object_ptr theShapeObject,
527 const char* theName = 0);
528 SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr theStudy,
529 SMESH::SMESH_Mesh_ptr theMesh,
530 SMESH::SMESH_GroupBase_ptr theGroup,
531 GEOM::GEOM_Object_ptr theShapeObject,
532 const char* theName = 0);
533 bool AddHypothesisToShape(SALOMEDS::Study_ptr theStudy,
534 SMESH::SMESH_Mesh_ptr theMesh,
535 GEOM::GEOM_Object_ptr theShapeObject,
536 SMESH::SMESH_Hypothesis_ptr theHyp);
537 bool RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy,
538 SMESH::SMESH_Mesh_ptr theMesh,
539 GEOM::GEOM_Object_ptr theShapeObject,
540 SMESH::SMESH_Hypothesis_ptr theHyp);
541 SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr theStudy,
542 SMESH::SMESH_Mesh_ptr theMesh,
543 GEOM::GEOM_Object_ptr theShape);
544 static void SetName(SALOMEDS::SObject_ptr theSObject,
546 const char* theDefaultName = 0);
548 static void SetPixMap(SALOMEDS::SObject_ptr theSObject,
549 const char* thePixMap);
552 StudyContext* GetCurrentStudyContext();
554 // Register an object in a StudyContext; return object id
555 int RegisterObject(CORBA::Object_ptr theObject);
557 // Return id of registered object
558 CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
560 // Return an object that previously had an oldID
561 template<class TInterface>
562 typename TInterface::_var_type GetObjectByOldId( const int oldID )
564 if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) {
565 string ior = myStudyContext->getIORbyOldId( oldID );
567 return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() ));
569 return TInterface::_nil();
572 // Get current study ID
573 int GetCurrentStudyID();
576 * \brief Find SObject for an algo
578 SALOMEDS::SObject_ptr GetAlgoSO(const ::SMESH_Algo* algo);
580 void UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters);
581 char* GetParameters(CORBA::Object_ptr theObject);
582 //char* ParseParameters(const char* theParameters);
583 const std::vector< int >& GetLastParamIndices() const { return myLastParamIndex; }
584 const std::vector< std::string >& GetLastParameters() const { return myLastParameters; }
585 const std::string & GetLastObjEntry() const { return myLastObj; }
586 std::vector< std::string > GetAllParameters(const std::string& theObjectEntry) const;
588 // Move objects to the specified position
589 void Move( const SMESH::sobject_list& what,
590 SALOMEDS::SObject_ptr where,
594 // Create hypothesis of given type
595 SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,
596 const char* theLibName)
597 throw ( SALOME::SALOME_Exception );
599 // Create empty mesh on shape
600 SMESH::SMESH_Mesh_ptr createMesh()
601 throw ( SALOME::SALOME_Exception );
603 static void loadGeomData( SALOMEDS::SComponent_ptr theCompRoot );
605 SMESH::mesh_array* CreateMeshesFromMEDorSAUV( const char* theFileName,
606 SMESH::DriverMED_ReadStatus& theStatus,
607 const char* theCommandNameForPython,
608 const char* theFileNameForPython);
610 void setCurrentStudy( SALOMEDS::Study_ptr theStudy,
611 bool theStudyIsBeingClosed=false);
614 static GEOM::GEOM_Gen_var myGeomGen;
615 static CORBA::ORB_var myOrb; // ORB reference
616 static PortableServer::POA_var myPoa; // POA reference
617 static SALOME_NamingService* myNS; // Naming Service
618 static SALOME_LifeCycleCORBA* myLCC; // Life Cycle CORBA
619 static SMESH_Gen_i* mySMESHGen; // Point to last created instance of the class
620 ::SMESH_Gen myGen; // SMESH_Gen local implementation
622 // hypotheses managing
623 map<string, GenericHypothesisCreator_i*> myHypCreatorMap;
625 map<int, StudyContext*> myStudyContextMap; // Map of study context objects
627 GEOM_Client* myShapeReader; // Shape reader
628 SALOMEDS::Study_var myCurrentStudy; // Current study
629 CORBA::Boolean myIsEmbeddedMode; // Current mode
631 // To load full mesh data from study at hyp modification or not
632 bool myToForgetMeshDataOnHypModif;
634 // Dump Python: trace of API methods calls
635 std::map < int, Handle(TColStd_HSequenceOfAsciiString) > myPythonScripts;
636 bool myIsHistoricalPythonDump;
637 std::vector< int > myLastParamIndex;
638 std::vector< std::string > myLastParameters;
639 std::string myLastObj;
647 DownCast(CORBA::Object_ptr theArg)
649 return dynamic_cast<T>(SMESH_Gen_i::GetServant(theArg).in());
653 * \brief Function used in SMESH_CATCH to convert a caught exception to
654 * SALOME::SALOME_Exception
656 inline void throwCorbaException(const char* excText)
658 THROW_SALOME_CORBA_EXCEPTION( excText, SALOME::INTERNAL_ERROR );