Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
590a56b
)
PAL10500. Take into account degenerated edges
author
eap
<eap@opencascade.com>
Mon, 14 Nov 2005 09:22:24 +0000
(09:22 +0000)
committer
eap
<eap@opencascade.com>
Mon, 14 Nov 2005 09:22:24 +0000
(09:22 +0000)
src/StdMeshers/StdMeshers_AutomaticLength.cxx
patch
|
blob
|
history
diff --git
a/src/StdMeshers/StdMeshers_AutomaticLength.cxx
b/src/StdMeshers/StdMeshers_AutomaticLength.cxx
index 36ae6bec58e3668e2b5fd495ecae92302421b149..01e8398abdf8d0640834d55b255dafe69d31ad74 100644
(file)
--- a/
src/StdMeshers/StdMeshers_AutomaticLength.cxx
+++ b/
src/StdMeshers/StdMeshers_AutomaticLength.cxx
@@
-101,14
+101,16
@@
static void computeLengths( const SMESH_Mesh* theMesh,
for ( int i = 1; i <= edgeMap.Extent(); ++i )
{
TopoDS_Edge edge = TopoDS::Edge( edgeMap(i) );
for ( int i = 1; i <= edgeMap.Extent(); ++i )
{
TopoDS_Edge edge = TopoDS::Edge( edgeMap(i) );
+ //if ( BRep_Tool::Degenerated( edge )) continue;
+
Standard_Real L = SMESH_Algo::EdgeLength( edge );
Standard_Real L = SMESH_Algo::EdgeLength( edge );
- if ( L > Lmax )
- Lmax = L;
- if ( L < Lmin )
- Lmin = L;
+ if ( L < DBL_MIN ) continue;
+
+ if ( L > Lmax ) Lmax = L;
+ if ( L < Lmin ) Lmin = L;
+
// remember i-th edge length
// remember i-th edge length
- theTShapeToLengthMap.insert( theTShapeToLengthMap.end(),
- make_pair( getTShape( edge ), L ));
+ theTShapeToLengthMap.insert( make_pair( getTShape( edge ), L ));
}
// Compute S0
}
// Compute S0
@@
-175,7
+177,10
@@
double StdMeshers_AutomaticLength::GetLength(const SMESH_Mesh* theMesh,
map<const TopoDS_TShape*, double>::iterator tshape_length =
_TShapeToLength.find( getTShape( anEdge ));
map<const TopoDS_TShape*, double>::iterator tshape_length =
_TShapeToLength.find( getTShape( anEdge ));
- ASSERT( tshape_length != _TShapeToLength.end() );
+
+ if ( tshape_length == _TShapeToLength.end() )
+ return 1; // it is a dgenerated edge
+
return tshape_length->second;
}
return tshape_length->second;
}