TopExp::MapShapes( aMesh.GetShapeToMesh(), TopAbs_EDGE, edgeMap );
for ( int iE = 1; iE <= edgeMap.Extent(); ++iE )
{
- SMESHDS_SubMesh* smDS = aMesh.GetMeshDS()->MeshElements( edgeMap( iE ));
+ const TopoDS_Shape& edge = edgeMap( iE );
+ if ( SMESH_Algo::isDegenerated( TopoDS::Edge( edge )))
+ continue;
+ SMESHDS_SubMesh* smDS = aMesh.GetMeshDS()->MeshElements( edge );
if ( !smDS ) continue;
SMDS_ElemIteratorPtr segIt = smDS->GetElements();
while ( segIt->more() )
SMESH_TNodeXYZ n2 = seg->GetNode(1);
gp_XYZ p = 0.5 * ( n1 + n2 );
netgen::Point3d pi(p.X(), p.Y(), p.Z());
- ngMesh->RestrictLocalH( pi, ( n1 - n2 ).Modulus() );
+ ngMesh->RestrictLocalH( pi, Max(( n1 - n2 ).Modulus(), netgen::mparam.minh ));
}
}