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

0028694: IGES reader produces too small edge covered by its vertices

Methods IsUClosed() and IsVClosed() are changed (check distance to middle point is added).
This commit is contained in:
skl
2018-08-09 12:26:20 +03:00
committed by bugmaster
parent 2382618330
commit 65bb82f241
4 changed files with 901 additions and 727 deletions

View File

@@ -1918,7 +1918,7 @@ static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
const Standard_Real VResolution)
{
TopoDS_Vertex Vf = seg.FirstVertex();
if ( ! Vf.IsSame ( seg.LastVertex() ) ) return Standard_False;
if ( ! Vf.IsSame ( seg.LastVertex() ) ) return 0;
gp_Pnt pnt = BRep_Tool::Pnt(Vf);
Standard_Real tol = BRep_Tool::Tolerance(Vf);
@@ -1929,7 +1929,7 @@ static Standard_Integer IsShortSegment (const ShapeFix_WireSegment &seg,
Handle(ShapeExtend_WireData) sbwd = seg.WireData();
for ( Standard_Integer i=1; i <= sbwd->NbEdges(); i++ ) {
TopoDS_Edge edge = sbwd->Edge ( i );
if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return Standard_False;
if ( ! Vf.IsSame ( sae.LastVertex ( edge ) ) ) return 0;
Handle(Geom2d_Curve) c2d;
Standard_Real f, l;
if ( ! sae.PCurve ( edge, myFace, c2d, f, l ) ) continue;