From d42d186778f1b19e6e839b86ce79b992df0964cf Mon Sep 17 00:00:00 2001 From: jgv Date: Thu, 20 Jun 2013 15:46:20 +0400 Subject: [PATCH] 0023998: Bad result of intersection of two faces: curve has a loop Add test case for this fix --- src/IntWalk/IntWalk_PWalking_4.gxx | 45 ++++++++++++------------------ tests/bugs/modalg_5/bug23998 | 32 +++++++++++++++++++++ 2 files changed, 50 insertions(+), 27 deletions(-) create mode 100755 tests/bugs/modalg_5/bug23998 diff --git a/src/IntWalk/IntWalk_PWalking_4.gxx b/src/IntWalk/IntWalk_PWalking_4.gxx index b04f7136ce..26c35e15ac 100755 --- a/src/IntWalk/IntWalk_PWalking_4.gxx +++ b/src/IntWalk/IntWalk_PWalking_4.gxx @@ -146,38 +146,29 @@ Standard_Boolean IntWalk_PWalking:: { if (!DejaReparti) { // recherche si ligne fermee - Standard_Real u,v,up,vp; + Standard_Real u,v; const IntSurf_PntOn2S& POn2S1=line->Value(1); + //On S1 POn2S1.ParametersOnS1(u,v); - gp_Pnt2d P1uv(u,v); + gp_Pnt2d P1uvS1(u,v); previousPoint.ParametersOnS1(u,v); - up=u; vp=v; - gp_Pnt2d Prevuv(u,v); + gp_Pnt2d PrevuvS1(u,v); myIntersectionOn2S.Point().ParametersOnS1(u,v); - gp_Pnt2d myIntersuv(u,v); - Standard_Boolean close2d = (P1uv.XY()-Prevuv.XY())* - (P1uv.XY()-myIntersuv.XY()) <0.0; - - const gp_Pnt &P1 = line->Value(1).Value(); - close = (P1.XYZ() - previousPoint.Value().XYZ())* - (P1.XYZ() - myIntersectionOn2S.Point().Value().XYZ()) < 0; - if(close != close2d) { -#ifdef DEB - cout<<"\n PWalking_4 TestArret - close2d"<