-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 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
_shapeType = (1 << TopAbs_FACE);
_compatibleHypothesis.push_back("ImportSource2D");
- _requireDescretBoundary = false;
+ _requireDiscreteBoundary = false;
}
//=============================================================================
}
}
if ( !nodesOnBoundary )
- break; // error: free internal link
+ {
+ error("free internal link"); // just for an easier debug
+ break;
+ }
if ( bndShapes.front().ShapeType() == TopAbs_EDGE &&
bndShapes.front() != bndShapes.back() )
- break; // error: link nodes on different geom edges
+ // link nodes on different geom edges
+ return error(COMPERR_BAD_INPUT_MESH, "Source nodes mismatch target vertices");
// find geom edge the link is on
if ( bndShapes.back().ShapeType() != TopAbs_EDGE )
bndShapes.front(),
theMesh, TopAbs_EDGE );
if ( geomEdge.IsNull() )
- break; // vertices belong to different edges -> error: free internal link
+ {
+ error("free internal link");
+ break; // vertices belong to different edges
+ }
bndShapes.push_back( geomEdge );
}
}
else if ( nbFaces > 2 )
{
- return error( "Non-manifold source mesh");
+ return error( COMPERR_BAD_INPUT_MESH, "Non-manifold source mesh");
}
}
isFaceMeshed = ( link2Nb == linkCount.end() && !linkCount.empty());
if ( nbEdges < 2 )
return false; // weird
if ( nbEdges > 2 )
- return error( "Source elements overlap one another");
+ return error( COMPERR_BAD_INPUT_MESH, "Source elements overlap one another");
}
}
}
if ( !isFaceMeshed )
- return error( "Source elements don't cover totally the geometrical face" );
+ return error( COMPERR_BAD_INPUT_MESH,
+ "Source elements don't cover totally the geometrical face" );
if ( helper.HasSeam() )
{