1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0022717: Exception during sewing

This commit is contained in:
AMA
2011-12-29 11:41:55 +00:00
committed by bugmaster
parent dc161d81d3
commit dfc06d1f07
4 changed files with 10 additions and 5 deletions

View File

@@ -668,14 +668,15 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
Handle(Geom2d_Curve) C;
Handle(Geom_Surface) S;
TopLoc_Location L;
Standard_Real first, last;
Standard_Real first = 0., last = 0.;
BRep_Tool::CurveOnSurface ( sbwd->Edge(i), C, S, L, first, last );
if ( C.IsNull() )
if ( C.IsNull() || Abs (last - first) < Precision::PConfusion())
{
SendWarning ( sbwd->Edge ( i ), Message_Msg ( "FixWire.FixCurve3d.Removed" ) );// Incomplete edge (with no pcurves or 3d curve) removed
sbwd->Remove ( i-- );
nb--;
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
FixConnected (i + 1, Precision());
}
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
}