mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
PAL10500. Take into account degenerated edges
This commit is contained in:
parent
590a56bae0
commit
f0cefe4519
@ -101,14 +101,16 @@ static void computeLengths( const SMESH_Mesh* theMesh,
|
|||||||
for ( int i = 1; i <= edgeMap.Extent(); ++i )
|
for ( int i = 1; i <= edgeMap.Extent(); ++i )
|
||||||
{
|
{
|
||||||
TopoDS_Edge edge = TopoDS::Edge( edgeMap(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 )
|
if ( L < DBL_MIN ) continue;
|
||||||
Lmax = L;
|
|
||||||
if ( L < Lmin )
|
if ( L > Lmax ) Lmax = L;
|
||||||
Lmin = L;
|
if ( L < Lmin ) Lmin = L;
|
||||||
|
|
||||||
// remember i-th edge length
|
// remember i-th edge length
|
||||||
theTShapeToLengthMap.insert( theTShapeToLengthMap.end(),
|
theTShapeToLengthMap.insert( make_pair( getTShape( edge ), L ));
|
||||||
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 =
|
map<const TopoDS_TShape*, double>::iterator tshape_length =
|
||||||
_TShapeToLength.find( getTShape( anEdge ));
|
_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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user