X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Projection_1D.cxx;h=89ab784ad339df2f4a727d94f188fd96a737a65f;hb=c9c3fe8924452af01274d358e5d6d391b1b27375;hp=778b57c0e605d36495fe5dd7b72b1b9f3ff2921a;hpb=bd4e115a78b52e3fbc016e5e30bb0e19b2a9e7d6;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Projection_1D.cxx b/src/StdMeshers/StdMeshers_Projection_1D.cxx index 778b57c0e..89ab784ad 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_1D.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : implementaion of SMESH idl descriptions +// SMESH SMESH : implementation of SMESH idl descriptions // File : StdMeshers_Projection_1D.cxx // Module : SMESH // Created : Fri Oct 20 11:37:07 2006 @@ -57,15 +57,16 @@ using namespace std; #define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; } -typedef StdMeshers_ProjectionUtils TAssocTool; +//typedef StdMeshers_ProjectionUtils TAssocTool; +namespace TAssocTool = StdMeshers_ProjectionUtils; //======================================================================= //function : StdMeshers_Projection_1D //purpose : //======================================================================= -StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_1D_Algo(hypId, studyId, gen) +StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, SMESH_Gen* gen) + :SMESH_1D_Algo(hypId, gen) { _name = "Projection_1D"; _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type @@ -238,14 +239,18 @@ bool StdMeshers_Projection_1D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcEdge ); //SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtEdge ); + string srcMeshError; if ( tgtMesh == srcMesh ) { if ( !TAssocTool::MakeComputed( srcSubMesh )) - return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed"); + srcMeshError = TAssocTool::SourceNotComputedError( srcSubMesh, this ); } else { if ( !srcSubMesh->IsMeshComputed() ) - return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed"); + srcMeshError = TAssocTool::SourceNotComputedError(); } + if ( !srcMeshError.empty() ) + return error(COMPERR_BAD_INPUT_MESH, srcMeshError ); + // ----------------------------------------------- // Find out nodes distribution on the source edge // -----------------------------------------------