Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright information
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Import_1D2D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Import_1D2D.cxx
b/src/StdMeshers/StdMeshers_Import_1D2D.cxx
index b5486304e8b90fb091e6b10070720cdaf3a806c0..8180f0a027ff93a692f6e7155cd949443c4f0902 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Import_1D2D.cxx
+++ b/
src/StdMeshers/StdMeshers_Import_1D2D.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
1
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
2
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-95,7
+95,7
@@
StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen
_shapeType = (1 << TopAbs_FACE);
_compatibleHypothesis.push_back("ImportSource2D");
_shapeType = (1 << TopAbs_FACE);
_compatibleHypothesis.push_back("ImportSource2D");
- _requireD
escret
Boundary = false;
+ _requireD
iscrete
Boundary = false;
}
//=============================================================================
}
//=============================================================================
@@
-420,25
+420,27
@@
bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
}
}
if ( !nodesOnBoundary )
}
}
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() )
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 )
{
// find geom edge by two vertices
// find geom edge the link is on
if ( bndShapes.back().ShapeType() != TopAbs_EDGE )
{
// find geom edge by two vertices
- TopoDS_Shape geomEdge;
- PShapeIteratorPtr edgeIt = helper.GetAncestors( bndShapes.back(), theMesh, TopAbs_EDGE );
- while ( edgeIt->more() )
+ TopoDS_Shape geomEdge = helper.GetCommonAncestor( bndShapes.back(),
+ bndShapes.front(),
+ theMesh, TopAbs_EDGE );
+ if ( geomEdge.IsNull() )
{
{
- geomEdge = *(edgeIt->next());
- if ( !helper.IsSubShape( bndShapes.front(), geomEdge ))
- geomEdge.Nullify();
+ error("free internal link");
+ break; // vertices belong to different edges
}
}
- if ( geomEdge.IsNull() )
- break; // vertices belong to different edges -> error: free internal link
bndShapes.push_back( geomEdge );
}
bndShapes.push_back( geomEdge );
}
@@
-470,7
+472,7
@@
bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
}
else if ( nbFaces > 2 )
{
}
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());
}
}
isFaceMeshed = ( link2Nb == linkCount.end() && !linkCount.empty());
@@
-496,12
+498,13
@@
bool StdMeshers_Import_1D2D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape &
if ( nbEdges < 2 )
return false; // weird
if ( nbEdges > 2 )
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 )
}
}
}
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() )
{
if ( helper.HasSeam() )
{