1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0023982: Wire explorer raises exception

Add test case for this fix
This commit is contained in:
ifv 2013-05-31 17:10:17 +04:00
parent 80482e0178
commit a0f8845f56
2 changed files with 184 additions and 154 deletions

View File

@ -505,6 +505,23 @@ void BRepTools_WireExplorer::Next()
Standard_Real aEPm = GetNextParamOnPC(aPCurve,aPEb,dfFPar,dfLPar,myTolU,myTolV,isrevese);
aPCurve->D0 (aEPm, aPEe);
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
{
//seems to be very short curve
gp_Vec2d aD;
aPCurve->D1(aEPm, aPEe, aD);
if( E.Orientation() == TopAbs_REVERSED )
aPEe.SetXY(aPEb.XY()-aD.XY());
else
aPEe.SetXY(aPEb.XY()+aD.XY());
if(aPEb.SquareDistance(aPEe) <= gp::Resolution())
{
it.Next();
k++;
continue;
}
}
gp_Vec2d anEDir(aPEb, aPEe);
dfCurAngle = Abs( anEDir.Angle(anERefDir) );
}

13
tests/bugs/moddata_3/bug23982 Executable file
View File

@ -0,0 +1,13 @@
puts "================"
puts "OCC23982"
puts "================"
puts ""
#######################################################
## Wire explorer raises exception
#######################################################
restore [locate_data_file bug23982_Cowl_965.brep] result
explode result w
wexplo result_1 result