From 6699377892c4e3fe5d812439f83ce6f176fbcdfa Mon Sep 17 00:00:00 2001 From: pkv Date: Thu, 24 Oct 2013 13:12:25 +0400 Subject: [PATCH] 0024266: Wrong result obtained by 'bopargcheck' - method:IntTools_EdgeFace has been changed Standard_Boolean IntTools_EdgeFace::IsProjectable(const Standard_Real aT) const The checking the distance between the point on the curve projected point has been added. IntTools packages were modified Test cases for issue CR24266 --- src/IntTools/IntTools_EdgeFace.cxx | 44 ++++-------------------------- tests/bugs/modalg_5/bug24266 | 19 +++++++++++++ 2 files changed, 25 insertions(+), 38 deletions(-) create mode 100755 tests/bugs/modalg_5/bug24266 diff --git a/src/IntTools/IntTools_EdgeFace.cxx b/src/IntTools/IntTools_EdgeFace.cxx index 58fa4d6546..c653fc4dc2 100755 --- a/src/IntTools/IntTools_EdgeFace.cxx +++ b/src/IntTools/IntTools_EdgeFace.cxx @@ -413,53 +413,21 @@ void IntTools_EdgeFace::CheckData() //function : IsProjectable //purpose : //======================================================================= - Standard_Boolean IntTools_EdgeFace::IsProjectable(const Standard_Real t) const +Standard_Boolean IntTools_EdgeFace::IsProjectable(const Standard_Real aT) const { - Standard_Boolean bFlag; - Standard_Real Umin, Usup, Vmin, Vsup; - - Umin=myS.FirstUParameter(); - Usup=myS.LastUParameter(); - Vmin=myS.FirstVParameter(); - Vsup=myS.LastVParameter (); - - gp_Pnt P; - myC.D0(t, P); - GeomAPI_ProjectPointOnSurf aProjector; + Standard_Boolean bFlag; + gp_Pnt aPC; // - Standard_Real ULD = 0., VLD = 0.; - - GeomAPI_ProjectPointOnSurf& aLocProj = myContext->ProjPS(myFace); - aLocProj.Perform(P); - bFlag = aLocProj.IsDone(); - - if(bFlag) { - aLocProj.LowerDistanceParameters(ULD, VLD); - } + myC.D0(aT, aPC); + bFlag=myContext->IsValidPointForFace(aPC, myFace, myCriteria); // - - if (bFlag) { - bFlag=Standard_False; - - // - TopAbs_State aState; - gp_Pnt2d aP2d(ULD, VLD); - - aState = myContext->FClass2d(myFace).Perform(aP2d); - // - - if (aState==TopAbs_IN || aState==TopAbs_ON) { - bFlag=Standard_True; - } - } return bFlag; } - //======================================================================= //function : DistanceFunction //purpose : //======================================================================= - Standard_Real IntTools_EdgeFace::DistanceFunction(const Standard_Real t) +Standard_Real IntTools_EdgeFace::DistanceFunction(const Standard_Real t) { Standard_Real Umin, Usup, Vmin, Vsup, aD; // diff --git a/tests/bugs/modalg_5/bug24266 b/tests/bugs/modalg_5/bug24266 new file mode 100755 index 0000000000..398d1c14d2 --- /dev/null +++ b/tests/bugs/modalg_5/bug24266 @@ -0,0 +1,19 @@ +puts "============" +puts "OCC24266" +puts "============" +puts "" +###################################################### +# Wrong result obtained by 'bopargcheck' +###################################################### + +restore [locate_data_file bug24266_qx.brep] result + +set info [bopargcheck result] + +if { [regexp "Faulties, that can not be treated by BOP, are detected" ${info}] == 1 } { + puts "Error : Wrong result" +} else { + puts "OK : Good result" +} + +set 3dviewer 1