From: eap Date: Tue, 9 Mar 2010 07:17:04 +0000 (+0000) Subject: 0020693: EDF 1288 SMESH: Problem to recompute a mesh with a sub-mesh and a conversion... X-Git-Tag: V5_1_4a1~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4d1d960c7b45ef6803cbf3d5ca23009a4a957635;p=plugins%2Fnetgenplugin.git 0020693: EDF 1288 SMESH: Problem to recompute a mesh with a sub-mesh and a conversion linear-quadratic * Take into account all nodes on edge in case of mixed linear/quadratic mesh --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 5b2b2b8..eb00cc7 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -187,7 +187,7 @@ static TError AddSegmentsToMesh(netgen::Mesh& ngMesh, (new SMESH_ComputeError(COMPERR_BAD_INPUT_MESH, SMESH_Comment("Unexpected nb of points on wire ") << iW << ": " << uvPtVec.size()<<" != "<NbPoints())); - nbNodes += wire->NbSegments(); + nbNodes += wire->NbPoints(); } nodeVec.reserve( nbNodes ); @@ -206,11 +206,12 @@ static TError AddSegmentsToMesh(netgen::Mesh& ngMesh, { StdMeshers_FaceSidePtr wire = wires[ iW ]; const vector& uvPtVec = wire->GetUVPtStruct(); + const int nbSegments = wire->NbPoints() - 1; int firstPointID = ngMesh.GetNP() + 1; int edgeID = 1, posID = -2; bool isInternalEdge = false; - for ( int i = 0; i < wire->NbSegments(); ++i ) // loop on segments + for ( int i = 0; i < nbSegments; ++i ) // loop on segments { // Add the first point of a segment const SMDS_MeshNode * n = uvPtVec[ i ].node;