1 // Copyright (C) 2007-2020 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, or (at your option) any later version.
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>
52 #include <NCollection_DataMap.hxx>
58 class SALOME_LifeCycleCORBA;
60 // ===========================================================
61 // Study context - store study-connected objects references
62 // ==========================================================
63 class SMESH_I_EXPORT StudyContext
65 typedef NCollection_DataMap< int, std::string > TInt2StringMap;
66 typedef NCollection_DataMap< int, int > TInt2IntMap;
70 // register object in the internal map and return its id
71 int addObject( const std::string& theIOR );
72 // find the object id in the internal map by the IOR
73 int findId( const std::string& theIOR );
74 // get object's IOR by id
75 std::string getIORbyId( const int theId );
76 // get object's IOR by old id
77 std::string getIORbyOldId( const int theOldId );
78 // maps old object id to the new one (used when restoring data)
79 void mapOldToNew( const int oldId, const int newId );
80 // get old id by a new one
81 int getOldId( const int newId );
86 // get next free object identifier
87 int getNextId() { return mapIdToIOR.Extent() + 1; }
89 TInt2StringMap mapIdToIOR; // persistent-to-transient map
90 TInt2IntMap mapIdToId; // to translate object from persistent to transient form
93 // ===========================================================
94 // SMESH module's engine
95 // ==========================================================
96 class SMESH_I_EXPORT SMESH_Gen_i:
97 public virtual POA_SMESH::SMESH_Gen,
98 public virtual Engines_Component_i
101 // Get last created instance of the class
102 static SMESH_Gen_i* GetSMESHGen() { return mySMESHGen;}
104 static CORBA::ORB_var GetORB() { return myOrb;}
105 // Get SMESH module's POA object
106 static PortableServer::POA_var GetPOA() { return myPoa;}
107 // Get Naming Service object
108 static SALOME_NamingService* GetNS();
109 // Get SALOME_LifeCycleCORBA object
110 static SALOME_LifeCycleCORBA* GetLCC();
111 // Retrieve and get GEOM engine reference
112 static GEOM::GEOM_Gen_var GetGeomEngine( bool isShaper );
113 static GEOM::GEOM_Gen_var GetGeomEngine( GEOM::GEOM_Object_ptr );
114 // Get object of the CORBA reference
115 static PortableServer::ServantBase_var GetServant( CORBA::Object_ptr theObject );
116 // Get CORBA object corresponding to the SALOMEDS::SObject
117 static CORBA::Object_var SObjectToObject( SALOMEDS::SObject_ptr theSObject );
118 // Get the SALOMEDS::SObject corresponding to a CORBA object
119 static SALOMEDS::SObject_ptr ObjectToSObject(CORBA::Object_ptr theObject);
120 // Get the SALOMEDS::Study from naming service
121 static SALOMEDS::Study_var getStudyServant();
122 // Get GEOM Object corresponding to TopoDS_Shape
123 GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape& theShape );
124 // Get TopoDS_Shape corresponding to GEOM_Object
125 TopoDS_Shape GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject);
127 // Default constructor
129 // Standard constructor
130 SMESH_Gen_i( CORBA::ORB_ptr orb,
131 PortableServer::POA_ptr poa,
132 PortableServer::ObjectId* contId,
133 const char* instanceName,
134 const char* interfaceName );
136 virtual ~SMESH_Gen_i();
138 // *****************************************
140 // *****************************************
141 // Set a new Mesh object name
142 void SetName(const char* theIOR,
143 const char* theName);
145 //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc );
146 void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo );
149 void SetEmbeddedMode( CORBA::Boolean theMode );
150 // Check embedded mode
151 CORBA::Boolean IsEmbeddedMode();
153 // Set enable publishing in the study
154 void SetEnablePublish( CORBA::Boolean theIsEnablePublish );
156 // Check enable publishing
157 CORBA::Boolean IsEnablePublish();
162 // Do provide info on objects
163 bool hasObjectInfo();
165 // Return an information for a given object
166 char* getObjectInfo(const char* entry);
168 // Create hypothesis/algorithm of given type
169 SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const char* theHypType,
170 const char* theLibName);
172 SMESH::SMESH_Hypothesis_ptr CreateHypothesisByAverageLength( const char* theHypType,
173 const char* theLibName,
174 CORBA::Double theAverageLength,
175 CORBA::Boolean theQuadDominated);
177 // Return hypothesis of given type holding parameter values of the existing mesh
178 SMESH::SMESH_Hypothesis_ptr
179 GetHypothesisParameterValues (const char* theHypType,
180 const char* theLibName,
181 SMESH::SMESH_Mesh_ptr theMesh,
182 GEOM::GEOM_Object_ptr theGeom,
183 const SMESH::HypInitParams& theWay);
186 * Returns True if a hypothesis is assigned to a sole sub-mesh in a current Study
188 CORBA::Boolean GetSoleSubMeshUsingHyp( SMESH::SMESH_Hypothesis_ptr theHyp,
189 SMESH::SMESH_Mesh_out theMesh,
190 GEOM::GEOM_Object_out theShape);
195 * Sets number of segments per diagonal of boundary box of geometry by which
196 * default segment length of appropriate 1D hypotheses is defined
198 void SetBoundaryBoxSegmentation( CORBA::Long theNbSegments );
200 * \brief Sets default number of segments per edge
202 void SetDefaultNbSegments(CORBA::Long theNbSegments);
207 virtual void SetOption(const char*, const char*);
209 Return an option value
211 virtual char* GetOption(const char*);
214 * To load full mesh data from study at hyp modification or not
216 bool ToForgetMeshDataOnHypModif() const { return myToForgetMeshDataOnHypModif; }
219 // Create empty mesh on a shape
220 SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject );
223 SMESH::SMESH_Mesh_ptr CreateEmptyMesh();
225 // Create a mesh and import data from an UNV file
226 SMESH::SMESH_Mesh_ptr CreateMeshesFromUNV( const char* theFileName );
228 // Create mesh(es) and import data from MED file
229 SMESH::mesh_array* CreateMeshesFromMED( const char* theFileName,
230 SMESH::DriverMED_ReadStatus& theStatus );
232 // Create mesh(es) and import data from MED file
233 SMESH::mesh_array* CreateMeshesFromSAUV( const char* theFileName,
234 SMESH::DriverMED_ReadStatus& theStatus );
236 // Create a mesh and import data from a STL file
237 SMESH::SMESH_Mesh_ptr CreateMeshesFromSTL( const char* theFileName );
239 // Create mesh(es) and import data from CGNS file
240 SMESH::mesh_array* CreateMeshesFromCGNS( const char* theFileName,
241 SMESH::DriverMED_ReadStatus& theStatus );
243 // Create a mesh and import data from a GMF file
244 SMESH::SMESH_Mesh_ptr CreateMeshesFromGMF( const char* theFileName,
245 CORBA::Boolean theMakeRequiredGroups,
246 SMESH::ComputeError_out theError);
248 // Copy a part of mesh
249 SMESH::SMESH_Mesh_ptr CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
250 const char* meshName,
251 CORBA::Boolean toCopyGroups,
252 CORBA::Boolean toKeepIDs);
254 // Create a mesh by copying definitions of another mesh to a given geometry
255 CORBA::Boolean CopyMeshWithGeom( SMESH::SMESH_Mesh_ptr sourceMesh,
256 GEOM::GEOM_Object_ptr newGeometry,
257 const char* meshName,
258 CORBA::Boolean toCopyGroups,
259 CORBA::Boolean toReuseHypotheses,
260 CORBA::Boolean toCopyElements,
261 SMESH::SMESH_Mesh_out newMesh,
262 SMESH::ListOfGroups_out newGroups,
263 SMESH::submesh_array_out newSubmeshes,
264 SMESH::ListOfHypothesis_out newHypotheses,
265 SMESH::string_array_out invalidEntries);
267 // Compute mesh on a shape
268 CORBA::Boolean Compute( SMESH::SMESH_Mesh_ptr theMesh,
269 GEOM::GEOM_Object_ptr theShapeObject );
271 // Cancel Compute mesh on a shape
272 void CancelCompute( SMESH::SMESH_Mesh_ptr theMesh,
273 GEOM::GEOM_Object_ptr theShapeObject );
276 * \brief Return errors of mesh computation
278 SMESH::compute_error_array* GetComputeErrors(SMESH::SMESH_Mesh_ptr theMesh,
279 GEOM::GEOM_Object_ptr theShapeObject );
282 * Evaluate mesh on a shape and
283 * returns statistic of mesh elements
284 * Result array of number enityties
286 SMESH::long_array* Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
287 GEOM::GEOM_Object_ptr theShapeObject);
289 // Returns true if mesh contains enough data to be computed
290 CORBA::Boolean IsReadyToCompute( SMESH::SMESH_Mesh_ptr theMesh,
291 GEOM::GEOM_Object_ptr theShapeObject );
294 * Calculate Mesh as preview till indicated dimension on shape
295 * First, verify list of hypothesis associated with the subShape.
296 * Return mesh preview structure
298 SMESH::MeshPreviewStruct* Precompute( SMESH::SMESH_Mesh_ptr theMesh,
299 GEOM::GEOM_Object_ptr theSubObject,
300 SMESH::Dimension theDimension,
301 SMESH::long_array& theShapesId );
303 // Returns errors of hypotheses definition
304 SMESH::algo_error_array* GetAlgoState( SMESH::SMESH_Mesh_ptr theMesh,
305 GEOM::GEOM_Object_ptr theSubObject );
307 // Return mesh elements preventing computation of a subshape
308 SMESH::MeshPreviewStruct* GetBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
309 CORBA::Short theSubShapeID );
311 // Create groups of elements preventing computation of a sub-shape
312 SMESH::ListOfGroups* MakeGroupsOfBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
313 CORBA::Short theSubShapeID,
314 const char* theGroupName);
316 // Get sub-shapes unique ID's list
317 SMESH::long_array* GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject,
318 const SMESH::object_array& theListOfSubShape );
320 // Return geometrical object the given element is built on. Publish it in study.
321 GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
322 CORBA::Long theElementID,
323 const char* theGeomName);
325 // Return geometrical object the given element is built on. Don't publish it in study.
326 GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
327 CORBA::Long theElementID);
329 // Concatenate the given meshes into one mesh
330 SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray,
331 CORBA::Boolean uniteIdenticalGroups,
332 CORBA::Boolean mergeNodesAndElements,
333 CORBA::Double mergeTolerance,
334 CORBA::Boolean commonGroups,
335 SMESH::SMESH_Mesh_ptr meshToAppendTo);
337 // Concatenate the given meshes into one mesh
338 SMESH::SMESH_Mesh_ptr Concatenate(const SMESH::ListOfIDSources& meshesArray,
339 CORBA::Boolean uniteIdenticalGroups,
340 CORBA::Boolean mergeNodesAndElements,
341 CORBA::Double mergeTolerance,
342 SMESH::SMESH_Mesh_ptr meshToAppendTo);
344 // Concatenate the given meshes into one mesh
345 // Create the groups of all elements from initial meshes
346 SMESH::SMESH_Mesh_ptr ConcatenateWithGroups(const SMESH::ListOfIDSources& meshesArray,
347 CORBA::Boolean uniteIdenticalGroups,
348 CORBA::Boolean mergeNodesAndElements,
349 CORBA::Double mergeTolerance,
350 SMESH::SMESH_Mesh_ptr meshToAppendTo);
352 // Get version of MED format being used.
353 char* GetMEDFileVersion();
355 // Get MED version of the file by its name
356 char* GetMEDVersion(const char* theFileName);
358 // Check compatibility of file with MED format being used, read only.
359 CORBA::Boolean CheckCompatibility(const char* theFileName);
361 // Check compatibility of file with MED format being used, for append on write.
362 CORBA::Boolean CheckWriteCompatibility(const char* theFileName);
364 // Get names of meshes defined in file with the specified name
365 SMESH::string_array* GetMeshNames(const char* theFileName);
367 // ****************************************************
368 // Interface inherited methods (from SALOMEDS::Driver)
369 // ****************************************************
372 SALOMEDS::TMPFile* Save( SALOMEDS::SComponent_ptr theComponent,
376 bool Load( SALOMEDS::SComponent_ptr theComponent,
377 const SALOMEDS::TMPFile& theStream,
380 // Save SMESH data in ASCII format
381 SALOMEDS::TMPFile* SaveASCII( SALOMEDS::SComponent_ptr theComponent,
384 // Load SMESH data in ASCII format
385 bool LoadASCII( SALOMEDS::SComponent_ptr theComponent,
386 const SALOMEDS::TMPFile& theStream,
390 // Create filter manager
391 SMESH::FilterManager_ptr CreateFilterManager();
393 // Return a pattern mesher
394 SMESH::SMESH_Pattern_ptr GetPattern();
396 // Create measurement instance
397 SMESH::Measurements_ptr CreateMeasurements();
399 // Clears study-connected data when it is closed
400 void Close( SALOMEDS::SComponent_ptr theComponent );
402 // Get component data type
403 char* ComponentDataType();
405 // Transform data from transient form to persistent
406 char* IORToLocalPersistentID( SALOMEDS::SObject_ptr theSObject,
407 const char* IORString,
408 CORBA::Boolean isMultiFile,
409 CORBA::Boolean isASCII );
410 // Transform data from persistent form to transient
411 char* LocalPersistentIDToIOR( SALOMEDS::SObject_ptr theSObject,
412 const char* aLocalPersistentID,
413 CORBA::Boolean isMultiFile,
414 CORBA::Boolean isASCII );
416 // Returns true if object can be published in the study
417 bool CanPublishInStudy( CORBA::Object_ptr theIOR );
418 // Publish object in the study
419 SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::SObject_ptr theSObject,
420 CORBA::Object_ptr theObject,
421 const char* theName );
423 // Copy-paste methods - returns true if object can be copied to the clipboard
424 CORBA::Boolean CanCopy( SALOMEDS::SObject_ptr /*theObject*/ ) { return false; }
425 // Copy-paste methods - copy object to the clipboard
426 SALOMEDS::TMPFile* CopyFrom( SALOMEDS::SObject_ptr /*theObject*/, CORBA::Long& /*theObjectID*/ ) { return NULL; }
427 // Copy-paste methods - returns true if object can be pasted from the clipboard
428 CORBA::Boolean CanPaste( const char* /*theComponentName*/, CORBA::Long /*theObjectID*/ ) { return false; }
429 // Copy-paste methods - paste object from the clipboard
430 SALOMEDS::SObject_ptr PasteInto( const SALOMEDS::TMPFile& /*theStream*/,
431 CORBA::Long /*theObjectID*/,
432 SALOMEDS::SObject_ptr /*theObject*/ ) {
433 SALOMEDS::SObject_var aResultSO;
434 return aResultSO._retn();
438 // Version information
441 virtual char* getVersion();
447 virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished,
448 CORBA::Boolean isMultiFile,
449 CORBA::Boolean& isValidScript);
451 void AddToPythonScript (const TCollection_AsciiString& theString);
453 void RemoveLastFromPythonScript();
457 TCollection_AsciiString DumpPython_impl (Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
458 Resource_DataMapOfAsciiStringAsciiString& theNames,
461 bool isHistoricalDump,
463 TCollection_AsciiString& theSavedTrace);
465 TCollection_AsciiString GetNewPythonLines();
467 void CleanPythonTrace();
469 static int CountInPyDump(const TCollection_AsciiString& text);
471 // *****************************************
473 // *****************************************
476 GEOM_Client* GetShapeReader();
479 static long GetHypothesisRootTag();
480 static long GetAlgorithmsRootTag();
481 static long GetRefOnShapeTag();
482 static long GetRefOnAppliedHypothesisTag();
483 static long GetRefOnAppliedAlgorithmsTag();
484 static long GetSubMeshOnVertexTag();
485 static long GetSubMeshOnEdgeTag();
486 static long GetSubMeshOnFaceTag();
487 static long GetSubMeshOnSolidTag();
488 static long GetSubMeshOnCompoundTag();
489 static long GetSubMeshOnWireTag();
490 static long GetSubMeshOnShellTag();
491 static long GetNodeGroupsTag();
492 static long GetEdgeGroupsTag();
493 static long GetFaceGroupsTag();
494 static long GetVolumeGroupsTag();
495 static long Get0DElementsGroupsTag();
496 static long GetBallElementsGroupsTag();
498 // publishing methods
499 SALOMEDS::SComponent_ptr PublishComponent();
500 SALOMEDS::SObject_ptr PublishMesh (SMESH::SMESH_Mesh_ptr theMesh,
501 const char* theName = 0);
502 SALOMEDS::SObject_ptr PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp,
503 const char* theName = 0);
504 SALOMEDS::SObject_ptr PublishSubMesh (SMESH::SMESH_Mesh_ptr theMesh,
505 SMESH::SMESH_subMesh_ptr theSubMesh,
506 GEOM::GEOM_Object_ptr theShapeObject,
507 const char* theName = 0);
508 SALOMEDS::SObject_ptr PublishGroup (SMESH::SMESH_Mesh_ptr theMesh,
509 SMESH::SMESH_GroupBase_ptr theGroup,
510 GEOM::GEOM_Object_ptr theShapeObject,
511 const char* theName = 0);
512 void UpdateIcons(SMESH::SMESH_Mesh_ptr theMesh);
513 void HighLightInvalid(CORBA::Object_ptr theObject, bool isInvalid);
514 bool IsInvalid(SALOMEDS::SObject_ptr theObject);
515 bool AddHypothesisToShape(SMESH::SMESH_Mesh_ptr theMesh,
516 GEOM::GEOM_Object_ptr theShapeObject,
517 SMESH::SMESH_Hypothesis_ptr theHyp);
518 bool RemoveHypothesisFromShape(SMESH::SMESH_Mesh_ptr theMesh,
519 GEOM::GEOM_Object_ptr theShapeObject,
520 SMESH::SMESH_Hypothesis_ptr theHyp);
521 SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh,
522 GEOM::GEOM_Object_ptr theShape);
523 static void SetName(SALOMEDS::SObject_ptr theSObject,
525 const char* theDefaultName = 0);
527 static void SetPixMap(SALOMEDS::SObject_ptr theSObject,
528 const char* thePixMap);
531 StudyContext* GetStudyContext();
533 // Register an object in a StudyContext; return object id
534 int RegisterObject(CORBA::Object_ptr theObject);
536 // Return id of registered object
537 CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
539 // Return an object that previously had an oldID
540 template<class TInterface>
541 typename TInterface::_var_type GetObjectByOldId( const int oldID )
543 if ( myStudyContext ) {
544 std::string ior = myStudyContext->getIORbyOldId( oldID );
546 return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() ));
548 return TInterface::_nil();
552 * \brief Find SObject for an algo
554 SALOMEDS::SObject_ptr GetAlgoSO(const ::SMESH_Algo* algo);
556 void UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters);
557 char* GetParameters(CORBA::Object_ptr theObject);
558 //char* ParseParameters(const char* theParameters);
559 const std::vector< int >& GetLastParamIndices() const { return myLastParamIndex; }
560 const std::vector< std::string >& GetLastParameters() const { return myLastParameters; }
561 const std::string & GetLastObjEntry() const { return myLastObj; }
562 std::vector< std::string > GetAllParameters(const std::string& theObjectEntry) const;
564 // Move objects to the specified position
565 void Move( const SMESH::sobject_list& what,
566 SALOMEDS::SObject_ptr where,
569 CORBA::Boolean IsApplicable ( const char* theAlgoType,
570 const char* theLibName,
571 GEOM::GEOM_Object_ptr theShapeObject,
572 CORBA::Boolean toCheckAll);
574 SMESH::long_array* GetInsideSphere( SMESH::SMESH_IDSource_ptr meshPart,
575 SMESH::ElementType theElemType,
581 SMESH::long_array* GetInsideBox( SMESH::SMESH_IDSource_ptr meshPart,
582 SMESH::ElementType theElemType,
588 CORBA::Double theZ2);
590 SMESH::long_array* GetInsideCylinder( SMESH::SMESH_IDSource_ptr meshPart,
591 SMESH::ElementType theElemType,
599 CORBA::Double theR );
601 SMESH::long_array* GetInside( SMESH::SMESH_IDSource_ptr meshPart,
602 SMESH::ElementType theElemType,
603 GEOM::GEOM_Object_ptr theGeom,
604 CORBA::Double theTolerance );
607 // Get hypothesis creator
608 GenericHypothesisCreator_i* getHypothesisCreator( const char* theHypName,
609 const char* theLibName,
610 std::string& thePlatformLibName);
611 // Create hypothesis of given type
612 SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,
613 const char* theLibName);
614 // Create empty mesh on shape
615 SMESH::SMESH_Mesh_ptr createMesh();
618 bool isGeomModifIcon( SMESH::SMESH_Mesh_ptr mesh );
620 // Create a sub-mesh on a geometry that is not a sub-shape of the main shape
621 // for the case where a valid sub-shape not found by CopyMeshWithGeom()
622 SMESH::SMESH_subMesh_ptr createInvalidSubMesh( SMESH::SMESH_Mesh_ptr mesh,
623 GEOM::GEOM_Object_ptr strangerGeom,
626 void highLightInvalid( SALOMEDS::SObject_ptr theSObject, bool isInvalid );
628 SMESH::mesh_array* CreateMeshesFromMEDorSAUV( const char* theFileName,
629 SMESH::DriverMED_ReadStatus& theStatus,
630 const char* theCommandNameForPython,
631 const char* theFileNameForPython);
633 std::vector<long> _GetInside(SMESH::SMESH_IDSource_ptr meshPart,
634 SMESH::ElementType ElemType,
635 const TopoDS_Shape& Shape,
636 double* Tolerance = NULL);
639 static GEOM::GEOM_Gen_var myGeomGen;
640 static CORBA::ORB_var myOrb; // ORB reference
641 static PortableServer::POA_var myPoa; // POA reference
642 static SALOME_NamingService* myNS; // Naming Service
643 static SALOME_LifeCycleCORBA* myLCC; // Life Cycle CORBA
644 static SMESH_Gen_i* mySMESHGen; // Point to last created instance of the class
645 ::SMESH_Gen myGen; // SMESH_Gen local implementation
647 // hypotheses managing
648 std::map<std::string, GenericHypothesisCreator_i*> myHypCreatorMap;
650 StudyContext* myStudyContext; // study context
652 GEOM_Client* myShapeReader; // Shape reader
653 CORBA::Boolean myIsEmbeddedMode; // Current mode
654 CORBA::Boolean myIsEnablePublish; // Enable publishing
656 // Default color of groups
657 std::string myDefaultGroupColor;
659 // To load full mesh data from study at hyp modification or not
660 bool myToForgetMeshDataOnHypModif;
662 // Dump Python: trace of API methods calls
663 Handle(TColStd_HSequenceOfAsciiString) myPythonScript;
664 bool myIsHistoricalPythonDump;
665 std::vector< int > myLastParamIndex;
666 std::vector< std::string > myLastParameters;
667 std::string myLastObj;
675 DownCast(CORBA::Object_ptr theArg)
677 return dynamic_cast<T>(SMESH_Gen_i::GetServant(theArg).in());
681 * \brief Function used in SMESH_CATCH to convert a caught exception to
682 * SALOME::SALOME_Exception
684 inline void throwCorbaException(const char* excText)
686 THROW_SALOME_CORBA_EXCEPTION( excText, SALOME::INTERNAL_ERROR );