From: eap Date: Mon, 4 Feb 2013 11:41:26 +0000 (+0000) Subject: 0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm X-Git-Tag: pluginMGCleaner~139 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fae3ba8fdd41565daf49efcfdbc87955c69ce6c0;p=modules%2Fsmesh.git 0021893: EDF 2133 SMESH : Improvement of 3D extrusion algorithm fix ~faceQuadStruct() as same side can repeat in vector< StdMeshers_FaceSide*> --- diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index c3c217eca..5146d08d2 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -959,7 +959,6 @@ FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & MESSAGE (myHelper->GetMeshDS()->ShapeToIndex(quad->side[i]->Edge(e)) << " "); MESSAGE (")\n"); } - //cout << endl; #endif if (!nbSides) nbSides = nbEdgesInWire.front(); @@ -1187,10 +1186,20 @@ StdMeshers_Quadrangle_2D::CheckAnd2Dcompute (SMESH_Mesh & aMesh, faceQuadStruct::~faceQuadStruct() { - for (int i = 0; i < side.size(); i++) { - if (side[i]) delete side[i]; + for (size_t i = 0; i < side.size(); i++) { + if (side[i]) { + delete side[i]; + for (size_t j = i+1; j < side.size(); j++) + if ( side[i] == side[j] ) + side[j] = 0; + } + } + side.clear(); + + if (uv_grid) { + delete [] uv_grid; + uv_grid = 0; } - if (uv_grid) delete [] uv_grid; } namespace @@ -1527,13 +1536,9 @@ bool StdMeshers_Quadrangle_2D::ComputeQuadPref (SMESH_Mesh & aMesh, UpdateDegenUV( quad ); // arrays for normalized params - //cout<<"Dump B:"<X()<<","<Y()<<","<Z()<<")"<X()<<","<Y()<<","<Z()<<")"; - // } - // cout<