// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// VISU OBJECT : interactive object for VISU entities implementation
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
- enum TSourceId {eRestoredComponent = -2, eRestoredFile = -1, eFile = 1, eComponent = 2};
- Result_i(SALOMEDS::Study_ptr theStudy, const TSourceId& aSourceId = eFile);
+ enum ESourceId {eRestoredComponent = -2, eRestoredFile = -1, eFile = 1, eComponent = 2};
+ enum ECreationId {eImportFile, eCopyAndImportFile, eImportMed, eImportMedField};
+
+ Result_i(SALOMEDS::Study_ptr theStudy,
+ const ESourceId& theSourceId,
+ const ECreationId& theCreationId);
+
virtual Storable* Create(const char* theFileName);
virtual Storable* Create(SALOMEDS::SObject_ptr theMedSObject);
virtual Storable* Create(SALOME_MED::FIELD_ptr theField);
virtual Storable* Create(const char* theFileName);
virtual Storable* Create(SALOMEDS::SObject_ptr theMedSObject);
virtual Storable* Create(SALOME_MED::FIELD_ptr theField);
- virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject,
- const Storable::TRestoringMap& theMap, const string& thePrefix)
- throw(std::logic_error&);
- static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
+
+ virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject,
+ const Storable::TRestoringMap& theMap,
+ const std::string& thePrefix);
+
+ static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
+ const std::string& thePrefix,
+ const Storable::TRestoringMap& theMap);
+
const SALOMEDS::SObject_var& GetSObject() const;
const SALOMEDS::Study_var& GetStudyDocument() const;
const SALOMEDS::SComponent_var& GetSComponent() const;
const SALOMEDS::SObject_var& GetSObject() const;
const SALOMEDS::Study_var& GetStudyDocument() const;
const SALOMEDS::SComponent_var& GetSComponent() const;
+ // Info on structured mesh contained in TInput
+ public:
+ typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis;
+ const std::vector< float >* GetAxisInfo(const std::string& theMeshName,
+ TAxis theAxis,
+ gp_Dir& thePlaneNormal);
+ // Return i,j or k values and cutting plane normal for theAxis.
+ // In the case of any problems, return NULL pointer
+ private:
+ struct TGridInfo {
+ std::vector< float > myComponets[ 3 ];
+ gp_Dir myAxis [ 3 ];
+ };
+ map< string, TGridInfo > myMeshName2GridInfoMap;