From 88496597ee6717b1814f16ecf4f34d2c1cd40e37 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 8 May 2014 11:50:54 +0400 Subject: [PATCH] No more SetSurfaceCurvature() but SetUseSurfaceCurvature() And fix SIGSEGV if SetUseSurfaceCurvature(False) + Optimize(True) --- src/NETGENPlugin/NETGENPluginBuilder.py | 8 ++++---- src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NETGENPlugin/NETGENPluginBuilder.py b/src/NETGENPlugin/NETGENPluginBuilder.py index c4056df..9c2fc8f 100644 --- a/src/NETGENPlugin/NETGENPluginBuilder.py +++ b/src/NETGENPlugin/NETGENPluginBuilder.py @@ -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. diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 9ef97d7..6c54aac 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -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; -- 2.39.2