]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
restore "QuadranglePreference" hyp as it can be used by NETGEN 2D
authoreap <eap@opencascade.com>
Fri, 8 Jul 2011 11:42:47 +0000 (11:42 +0000)
committereap <eap@opencascade.com>
Fri, 8 Jul 2011 11:42:47 +0000 (11:42 +0000)
together with "Max. Elemet Area" for example

src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx

index c35e86a563021e8e24f9694659f78d0a5e53c096..31b8dceea78669c0bcc0855ec22b47bbd08aed02 100644 (file)
@@ -36,6 +36,7 @@
 #include "StdMeshers_FaceSide.hxx"
 #include "StdMeshers_MaxElementArea.hxx"
 #include "StdMeshers_LengthFromEdges.hxx"
+#include "StdMeshers_QuadranglePreference.hxx"
 
 #include <Precision.hxx>
 #include <Standard_ErrorHandler.hxx>
@@ -87,14 +88,7 @@ NETGENPlugin_NETGEN_2D_ONLY::NETGENPlugin_NETGEN_2D_ONLY(int hypId, int studyId,
 
   _compatibleHypothesis.push_back("MaxElementArea");
   _compatibleHypothesis.push_back("LengthFromEdges");
-  //_compatibleHypothesis.push_back("QuadranglePreference");
-  _compatibleHypothesis.push_back("QuadrangleParams"); /* QuadranglePreference was removed and
-                                                          it is converted into QuadrangleParams
-                                                          at reading an old study; so we use
-                                                          QuadrangleParams insead of
-                                                          QuadranglePreference for backward
-                                                          compatibility
-                                                        */
+  _compatibleHypothesis.push_back("QuadranglePreference");
   _compatibleHypothesis.push_back("NETGEN_Parameters_2D");
 
   _hypMaxElementArea = 0;
@@ -149,10 +143,10 @@ bool NETGENPlugin_NETGEN_2D_ONLY::CheckHypothesis (SMESH_Mesh&         aMesh,
       _hypMaxElementArea = static_cast<const StdMeshers_MaxElementArea*> (hyp);
     else if ( hypName == "LengthFromEdges" )
       _hypLengthFromEdges = static_cast<const StdMeshers_LengthFromEdges*> (hyp);
+    else if ( hypName == "QuadranglePreference" )
+      _hypQuadranglePreference = static_cast<const StdMeshers_QuadranglePreference*>(hyp);
     else if ( hypName == "NETGEN_Parameters_2D" )
       _hypParameters = static_cast<const NETGENPlugin_Hypothesis_2D*>(hyp);
-    else if ( hypName == "QuadrangleParams" )
-      _hypQuadranglePreference = hyp;
     else {
       aStatus = HYP_INCOMPATIBLE;
       return false;