From e7d8354cb48d29960ef8ffc159a3a1559204d928 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 9 Jul 2015 12:46:41 +0300 Subject: [PATCH] 23068: [CEA 1505] Be able to keep meshing in 2D after having merged the nodes in 1D --- src/NETGENPlugin/NETGENPluginBuilder.py | 6 ++++-- src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NETGENPlugin/NETGENPluginBuilder.py b/src/NETGENPlugin/NETGENPluginBuilder.py index 1035553..1a44269 100644 --- a/src/NETGENPlugin/NETGENPluginBuilder.py +++ b/src/NETGENPlugin/NETGENPluginBuilder.py @@ -32,6 +32,8 @@ except ImportError: noNETGENPlugin = 1 pass +LIBRARY = "libNETGENEngine.so" + #---------------------------- # Mesh algo type identifiers #---------------------------- @@ -104,7 +106,7 @@ class NETGEN_Algorithm(Mesh_Algorithm): def __init__(self, mesh, geom=0): Mesh_Algorithm.__init__(self) if noNETGENPlugin: print "Warning: NETGENPlugin module unavailable" - self.Create(mesh, geom, self.algoType, "libNETGENEngine.so") + self.Create(mesh, geom, self.algoType, LIBRARY) self.params = None pass @@ -163,7 +165,7 @@ class NETGEN_Algorithm(Mesh_Algorithm): self.mesh.RemoveHypothesis( self.params, self.geom ) self.params = None if not self.params: - self.params = self.Hypothesis(hypType, [],"libNETGENEngine.so",UseExisting=0) + self.params = self.Hypothesis(hypType, [], LIBRARY, UseExisting=0) return self.params diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 3a853a6..a8b57be 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -391,6 +391,8 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh, for ( int iW = 0; iW < nbWires; ++iW ) { const UVPtStructVec& points = wires[ iW ]->GetUVPtStruct(); + if ( points.empty() ) + return error( COMPERR_BAD_INPUT_MESH ); gp_Pnt pPrev = SMESH_TNodeXYZ( points[0].node ); for ( size_t i = 1; i < points.size(); ++i ) { -- 2.30.2