]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Fix bug when no hypothesis is defined.
authorgdd <gdd>
Tue, 23 Aug 2011 12:00:34 +0000 (12:00 +0000)
committergdd <gdd>
Tue, 23 Aug 2011 12:00:34 +0000 (12:00 +0000)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx

index 191a186e568fa08c050b8608c40c85a857263d47..ebae152640c506f056e7f5f7547b0b96f247b79c 100644 (file)
@@ -1592,7 +1592,9 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
     //return false;
   }
 
-  std::string GMFFileName = _hypothesis->GetGMFFile();
+  std::string GMFFileName = BLSURFPlugin_Hypothesis::GetDefaultGMFFile();
+  if (_hypothesis)
+    GMFFileName = _hypothesis->GetGMFFile();
   if (GMFFileName != "") {
 //     bool GMFFileMode = _hypothesis->GetGMFFileMode();
     bool asciiFound = (GMFFileName.find(".mesh",GMFFileName.length()-5) != std::string::npos);
index d425913e7cf6b3492284222515ff15af0357e0a7..feb9401bb5c29226923b4f0d10ff71dd6e616b61 100644 (file)
@@ -68,7 +68,8 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G
   _coordsEnfVertexMap(GetDefaultCoordsEnfVertexMap()),
   _faceEntryEnfVertexEntryListMap(GetDefaultFaceEntryEnfVertexEntryListMap()),
   _enfVertexEntryEnfVertexMap(GetDefaultEnfVertexEntryEnfVertexMap()),
-  _groupNameNodeIDMap(GetDefaultGroupNameNodeIDMap())
+  _groupNameNodeIDMap(GetDefaultGroupNameNodeIDMap()),
+  _GMFFileName(GetDefaultGMFFile())
 /* TODO GROUPS
  _groupNameEnfVertexListMap(GetDefaultGroupNameEnfVertexListMap()),
  _enfVertexGroupNameMap(GetDefaultEnfVertexGroupNameMap())
@@ -77,7 +78,6 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_G
   _name = "BLSURF_Parameters";
   _param_algo_dim = 2;
   
-  _GMFFileName = ""; // no GMF export
 //   _GMFFileMode = false; // GMF ascii mode
   
   // to disable writing boundaries
@@ -1590,3 +1590,8 @@ bool BLSURFPlugin_Hypothesis::GetDefaultDecimesh() {
 double BLSURFPlugin_Hypothesis::GetDefaultPreCADEpsNano() {
   return undefinedDouble(); //1e-4;
 }
+
+//======================================================================
+std::string BLSURFPlugin_Hypothesis::GetDefaultGMFFile() {
+  return "";
+}
index f6bdec6ec0fdc7ca94d4a0a0983424908785a8ce..9e47632ea4108e443379993be9b467e9a61b1707 100644 (file)
@@ -324,6 +324,7 @@ public:
 //   void SetGMFFile(const std::string& theFileName, bool isBinary);
   void SetGMFFile(const std::string& theFileName);
   std::string GetGMFFile() const { return _GMFFileName; }
+  static std::string GetDefaultGMFFile();
 //   bool GetGMFFileMode() const { return _GMFFileMode; }
   
   // Persistence