#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
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
// -----------------------------------------------
if ( !srcMesh ) srcMesh = & theMesh;
SMESH_subMesh* srcFaceSM = srcMesh->GetSubMesh( srcFace );
- typedef StdMeshers_ProjectionUtils SPU;
+ namespace SPU = StdMeshers_ProjectionUtils;
SPU::TShapeShapeMap shape2ShapeMap;
SPU::InitVertexAssociation( _sourceHypo, shape2ShapeMap );
if ( !SPU::FindSubShapeAssociation( theShape, &theMesh, srcFace, srcMesh, shape2ShapeMap))
#define RETURN_BAD_RESULT(msg) { MESSAGE(")-: Error: " << msg); return false; }
-typedef StdMeshers_ProjectionUtils TAssocTool;
+namespace TAssocTool = StdMeshers_ProjectionUtils;
+//typedef StdMeshers_ProjectionUtils TAssocTool;
//=======================================================================
//function : StdMeshers_Projection_2D
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( srcFace );
SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( tgtFace );
+ string srcMeshError;
if ( tgtMesh == srcMesh ) {
- if ( !TAssocTool::MakeComputed( srcSubMesh ) || !srcSubMesh->IsMeshComputed() )
- return error(COMPERR_BAD_INPUT_MESH,"Source mesh not computed");
+ if ( !TAssocTool::MakeComputed( srcSubMesh ))
+ 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 );
// ===========
// Projection
// cout << msg << " ("<< p.X() << "; " <<p.Y() << "; " <<p.Z() << ") " <<endl;\
// }
-typedef StdMeshers_ProjectionUtils TAssocTool;
+namespace TAssocTool = StdMeshers_ProjectionUtils;
//=======================================================================
SMESH_subMesh* srcSubMesh = srcMesh->GetSubMesh( _sourceHypo->GetSource3DShape() );
//SMESH_subMesh* tgtSubMesh = tgtMesh->GetSubMesh( aShape );
- if ( tgtMesh == srcMesh && !aShape.IsSame( _sourceHypo->GetSource3DShape() )) {
+ string srcMeshError;
+ if ( tgtMesh == srcMesh && !aShape.IsSame( _sourceHypo->GetSource3DShape() )) {
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();
}
// Find 2 pairs of corresponding vertices