From 84d39c06fa79d4227c1bc415e36e3924f7ff64c6 Mon Sep 17 00:00:00 2001 From: ifv Date: Mon, 16 May 2022 11:37:40 +0300 Subject: [PATCH] 0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5 BRepExtrema/BRepExtrema_ExtCF.cxx - set correct using BRepAdaptor_Curve in Extrema tests/bugs/modalg_8/bug32973 - new test case added --- src/BRepExtrema/BRepExtrema_ExtCF.cxx | 2 +- tests/bugs/modalg_8/bug32973 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_8/bug32973 diff --git a/src/BRepExtrema/BRepExtrema_ExtCF.cxx b/src/BRepExtrema/BRepExtrema_ExtCF.cxx index 4009b81001..44e2c2fa3e 100644 --- a/src/BRepExtrema/BRepExtrema_ExtCF.cxx +++ b/src/BRepExtrema/BRepExtrema_ExtCF.cxx @@ -81,7 +81,7 @@ void BRepExtrema_ExtCF::Perform(const TopoDS_Edge& E, const TopoDS_Face& F2) BRepAdaptor_Curve Curv(E); Handle(BRepAdaptor_Curve) HC = new BRepAdaptor_Curve(Curv); - myExtCS.Perform(HC->Curve(), U1, U2); + myExtCS.Perform(*HC, U1, U2); if(!myExtCS.IsDone()) return; diff --git a/tests/bugs/modalg_8/bug32973 b/tests/bugs/modalg_8/bug32973 new file mode 100644 index 0000000000..3702a2fb9d --- /dev/null +++ b/tests/bugs/modalg_8/bug32973 @@ -0,0 +1,13 @@ +puts "=============================================================================================" +puts "0032973: Modeling Algorithms - Regression in BRepExtrema_DistShapeShape compared with 7.5" +puts "=============================================================================================" +puts "" + +restore [locate_data_file bug29313_Nozzle45.brep] s1 +restore [locate_data_file bug29313_RobotArm6.brep] s2 + +distmini d s1 s2 +set Tol 1.e-7 +checkreal ddd [dval d_val] 2185.9739179983058 $Tol $Tol +compound s1 s2 d d2 res +checkview -display res -2d -path ${imagedir}/${test_image}.png