diff --git a/src/IntTools/IntTools_FaceFace.cxx b/src/IntTools/IntTools_FaceFace.cxx index c01f4e3236..23f5eb83e6 100644 --- a/src/IntTools/IntTools_FaceFace.cxx +++ b/src/IntTools/IntTools_FaceFace.cxx @@ -819,11 +819,14 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, aCurve.SetTolerance(aTolC); } // - aCurve.SetCurve(new Geom_TrimmedCurve(newc, fprm, lprm)); if(myApprox1) { Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, myHS1->ChangeSurface().Surface(), newc, C2d); + + if (C2d.IsNull()) + continue; + aCurve.SetFirstCurve2d(new Geom2d_TrimmedCurve(C2d, fprm, lprm)); } // @@ -831,6 +834,10 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index, Handle (Geom2d_Curve) C2d; GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc, myHS2->ChangeSurface().Surface(), newc, C2d); + + if (C2d.IsNull()) + continue; + aCurve.SetSecondCurve2d(new Geom2d_TrimmedCurve(C2d, fprm, lprm)); } // diff --git a/tests/lowalgos/intss/bug29673 b/tests/lowalgos/intss/bug29673 new file mode 100644 index 0000000000..5e76e10894 --- /dev/null +++ b/tests/lowalgos/intss/bug29673 @@ -0,0 +1,17 @@ +puts "========" +puts "0029673: Ex-ception while Face-Face intersection" +puts "========" +puts "" + +restore [locate_data_file bug29673_f1.brep] f1 +restore [locate_data_file bug29673_f2.brep] f2 + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} [bopcurves f1 f2 -2d] full Toler NbCurv + +if {$Toler > 1.0e-7} { + puts "Error: too big tolerance" +} + +if {$NbCurv != 1} { + puts "Error: Please check NbCurves for intersector" +}