diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index 9b014a0169..30a6804107 100755 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -745,7 +745,8 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) //======================================================================= void IntTools_FaceFace::ComputeTolReached3d() { - Standard_Integer aNbLin; + Standard_Boolean bCase1; + Standard_Integer aNbLin, i; GeomAbs_SurfaceType aType1, aType2; // aNbLin=myIntersector.NbLines(); @@ -756,6 +757,9 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) aType1=myHS1->Surface().GetType(); aType2=myHS2->Surface().GetType(); // + bCase1=((aType1==GeomAbs_Plane && aType2==GeomAbs_SurfaceOfExtrusion) || + (aType2==GeomAbs_Plane && aType1==GeomAbs_SurfaceOfExtrusion)); + // if (aType1==GeomAbs_Cylinder && aType2==GeomAbs_Cylinder) { if (aNbLin==2){ Handle(IntPatch_Line) aIL1, aIL2; @@ -784,7 +788,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) } //ZZ if (aNbLin) {// Check the distances - Standard_Integer i, aNbP, j ; + Standard_Integer aNbP, j ; Standard_Real aT1, aT2, dT, aD2, aD2Max, aEps, aT11, aT12; // aD2Max=0.; @@ -882,7 +886,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) return; } // - Standard_Integer i, aNbP; + Standard_Integer aNbP; Standard_Real aT, aT1, aT2, dT, aUT, aVT, aUP, aVP; Standard_Real aDP, aDT, aDmax; gp_Pln aPln; @@ -937,7 +941,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) // else if ((aType1==GeomAbs_SurfaceOfRevolution && aType2==GeomAbs_Cylinder) || (aType2==GeomAbs_SurfaceOfRevolution && aType1==GeomAbs_Cylinder)) { - Standard_Integer i, j, aNbP; + Standard_Integer j, aNbP; Standard_Real aT, aT1, aT2, dT, aD2max, aD2; // aNbLin=mySeqOfCurve.Length(); @@ -985,7 +989,7 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) }//if((aType1==GeomAbs_SurfaceOfRevolution ... else if ((aType1==GeomAbs_Plane && aType2==GeomAbs_Sphere) || (aType2==GeomAbs_Plane && aType1==GeomAbs_Sphere)) { - Standard_Integer i, j, aNbP; + Standard_Integer j, aNbP; Standard_Real aT1, aT2, dT, aD2max, aD2, aEps, aT11, aT12; // aNbLin=mySeqOfCurve.Length(); @@ -1039,8 +1043,9 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) myTolReached3d=sqrt(aD2max); } }//else if ((aType1==GeomAbs_Plane && aType2==GeomAbs_Sphere) ... - else if (!myApprox) { - Standard_Integer i, aNbP, j ; + else if (!myApprox || bCase1) { + //else if (!myApprox) { + Standard_Integer aNbP, j; Standard_Real aT1, aT2, dT, aD2, aD2Max, aEps, aT11, aT12; // aD2Max=0.; @@ -1079,7 +1084,6 @@ void IntTools_FaceFace::SetList(IntSurf_ListOfPntOn2S& aListOfPnts) }//for (i=1; i<=aNbLin; ++i) { myTolReached3d=sqrt(aD2Max); } - //modified by NIZNHY-PKV Thu Aug 30 13:31:12 2012t } //======================================================================= //function : MakeCurve diff --git a/tests/bugs/modalg_5/bug24092 b/tests/bugs/modalg_5/bug24092 new file mode 100644 index 0000000000..9e7bbd1b76 --- /dev/null +++ b/tests/bugs/modalg_5/bug24092 @@ -0,0 +1,27 @@ +puts "============" +puts "OCC24092" +puts "============" +puts "" +###################################################### +# Boolean fuse fails +###################################################### + +restore [locate_data_file bug24092_fz2.brep] b1 +restore [locate_data_file bug24092_fz1196.brep] b2 + +bop b1 b2 +bopfuse result + +set square 155006 + +set nb_v_good 9 +set nb_e_good 15 +set nb_w_good 4 +set nb_f_good 4 +set nb_sh_good 1 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 34 + +set 2dviewer 0