diff --git a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx index 6c6d3ce24b..f2c974b5be 100644 --- a/src/IntCurvesFace/IntCurvesFace_Intersector.cxx +++ b/src/IntCurvesFace/IntCurvesFace_Intersector.cxx @@ -42,7 +42,7 @@ #include #include #include -#include +#include // static void ComputeSamplePars(const Handle(Adaptor3d_HSurface)& Hsurface, const Standard_Integer nbsu, @@ -259,16 +259,12 @@ void IntCurvesFace_Intersector::InternalCall(const IntCurveSurface_HInter &HICS, for(; anExp.More(); anExp.Next()) { TopoDS_Edge anE = TopoDS::Edge(anExp.Current()); - Standard_Real curtol = BRep_Tool::Tolerance(anE); - Standard_Real tol2d = Max(Hsurface->UResolution(curtol), Hsurface->VResolution(curtol)); - tol2d = Max(tol2d, Tol); Standard_Real f, l; - Handle(Geom2d_Curve) aPC = BRep_Tool::CurveOnSurface(anE, face, f, l); - Geom2dAPI_ProjectPointOnCurve aProj(Puv, aPC, f, l); - if(aProj.NbPoints() > 0) + Handle(Geom_Curve) aPC = BRep_Tool::Curve (anE, f, l); + GeomAPI_ProjectPointOnCurve aProj (HICSPointindex.Pnt(), aPC, f, l); + if (aProj.NbPoints() > 0) { - Standard_Real d = aProj.LowerDistance(); - if(d <= tol2d) + if (aProj.LowerDistance() <= maxtol3d) { //Nearest edge is found, state is really ON currentstate = TopAbs_ON; diff --git a/tests/bugs/modalg_7/bug30903 b/tests/bugs/modalg_7/bug30903 new file mode 100644 index 0000000000..df4d5a7f1f --- /dev/null +++ b/tests/bugs/modalg_7/bug30903 @@ -0,0 +1,12 @@ +puts "=======================================================" +puts "0030903: Bug in IntCurvesFace_ShapeIntersector" +puts "=======================================================" +puts "" + +pload QAcommands + +restore [locate_data_file bug30903_shell.brep] s + +if {![regexp "status = -1" [OCC17424 s 132.319855705359 32.8066746022481 -61.4897311243957 0 -0.634115797726033 -0.77323809727294 -1]]} { + puts "Error: there must be no intersection point" +}