X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_MEFISTO_2D.cxx;h=cb4e61fc161b2a9531355add902b62fcc010982a;hp=b08d352f2fdf22d074d4a84491f2dd25bc138c19;hb=0d7f46098b39551095228408c011e0b7fa3e2d0d;hpb=c7f9c58cafd2a2acf775e7565f362873bbb8828a diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx index b08d352f2..cb4e61fc1 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx @@ -34,6 +34,7 @@ #include "SMESH_subMesh.hxx" #include "SMESH_Block.hxx" #include "SMESH_MesherHelper.hxx" +#include "SMESH_Comment.hxx" #include "StdMeshers_FaceSide.hxx" #include "StdMeshers_MaxElementArea.hxx" @@ -180,8 +181,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh TopoDS_Face F = TopoDS::Face(aShape.Oriented(TopAbs_FORWARD)); // helper builds quadratic mesh if necessary - myTool = new SMESH_MesherHelper(aMesh); - auto_ptr helperDeleter( myTool ); + SMESH_MesherHelper helper(aMesh); + myTool = &helper; _quadraticMesh = myTool->IsQuadraticSubMesh(aShape); const bool ignoreMediumNodes = _quadraticMesh; @@ -209,10 +210,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh { wireEdges.splice(wireEdges.end(), wireEdges, wireEdges.begin(), ++wireEdges.begin()); - if ( from->IsSame( wireEdges.front() )) { - MESSAGE( "No nodes on vertices on wire " << iW+1); - return false; - } + if ( from->IsSame( wireEdges.front() )) + return error(COMPERR_BAD_INPUT_MESH,"No nodes on vertices"); } StdMeshers_FaceSide* wire = new StdMeshers_FaceSide( F, wireEdges, &aMesh, true, ignoreMediumNodes); @@ -222,7 +221,8 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh from = to; } if ( wires[0]->NbSegments() < 3 ) // ex: a circle with 2 segments - return false; + return error(COMPERR_BAD_INPUT_MESH, + SMESH_Comment("Too few segments")<NbSegments()); if (_hypLengthFromEdges && _edgeLength < DBL_MIN ) _edgeLength = 100; @@ -283,7 +283,7 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh } else { - MESSAGE("Error in Triangulation"); + error(ierr,"Error in Triangulation (aptrte())"); } } if (nudslf != NULL) delete[]nudslf; @@ -512,12 +512,12 @@ bool StdMeshers_MEFISTO_2D::LoadPoints(TWireVector & wires, { const vector& uvPtVec = wires[ iW ]->GetUVPtStruct(isXConst,constValue); if ( uvPtVec.size() != wires[ iW ]->NbPoints() ) { - MESSAGE("Wrong nb UVPtStruct: "<::const_iterator uvPt = uvPtVec.begin();