]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
No more SetSurfaceCurvature() but SetUseSurfaceCurvature()
authoreap <eap@opencascade.com>
Thu, 8 May 2014 07:50:54 +0000 (11:50 +0400)
committereap <eap@opencascade.com>
Thu, 8 May 2014 07:50:54 +0000 (11:50 +0400)
 And fix SIGSEGV if SetUseSurfaceCurvature(False) + Optimize(True)

src/NETGENPlugin/NETGENPluginBuilder.py
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx

index c4056dfccb6a09a3947d73f7652021032d714e22..9c2fc8fb1fc592e6d3f6fd5ba91d8d87fac8176e 100644 (file)
@@ -346,10 +346,10 @@ class NETGEN_2D_Only_Algorithm(NETGEN_Algorithm):
         hyp = self.Hypothesis("LengthFromEdges", UseExisting=1, CompareMethod=self.CompareEqualHyp)
         return hyp
         
-    ## Sets @c SurfaceCurvature flag
-    #  @param toAllow new value of the @c SurfaceCurvature parameter (@c True by default)
-    def SetSurfaceCurvature(self, toAllow=True):
-        if self.Parameters(): self.params.SetSurfaceCurvature(toAllow)
+    ## Sets @c UseSurfaceCurvature flag
+    #  @param toUse new value of the @c UseSurfaceCurvature parameter (@c True by default)
+    def SetUseSurfaceCurvature(self, toUse=True):
+        if self.Parameters(): self.params.SetUseSurfaceCurvature(toUse)
         pass
 
     ## Sets @c QuadAllowed flag.
index 9ef97d765f06d42ed083bae280697fcdcb191890..6c54aac394430684e16033129026101c135aaa65 100644 (file)
@@ -363,6 +363,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh&         aMesh,
     startWith = MESHCONST_MESHSURFACE;
     endWith   = MESHCONST_OPTSURFACE;
 
+    netgen::mparam.uselocalh = true; // needed while optimization
     try {
       OCC_CATCH_SIGNALS;