From ee5ee7db3ba1a2ca5999a1603ccc6a67bb77fec0 Mon Sep 17 00:00:00 2001 From: emv Date: Thu, 25 Dec 2014 18:00:32 +0300 Subject: [PATCH] 0025625: Boolean COMMON cannot be built class BOPTools_AlgoTools2D method void BOPTools_AlgoTools2D::Make2D (const TopoDS_Edge& aE, const TopoDS_Face& aF, Handle(Geom2d_Curve)& aC2D, Standard_Real& aFirst, Standard_Real& aLast, Standard_Real& aToler) Perform projection with the tolerance of the edge. Test case for issue CR25625 --- src/BOPTools/BOPTools_AlgoTools2D.cxx | 2 +- tests/bugs/modalg_5/bug25625 | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_5/bug25625 diff --git a/src/BOPTools/BOPTools_AlgoTools2D.cxx b/src/BOPTools/BOPTools_AlgoTools2D.cxx index 712caa7eab..78c0539dd8 100644 --- a/src/BOPTools/BOPTools_AlgoTools2D.cxx +++ b/src/BOPTools/BOPTools_AlgoTools2D.cxx @@ -540,7 +540,7 @@ void BOPTools_AlgoTools2D::Make2D (const TopoDS_Edge& aE, } // - aToler=.5*BRep_Tool::Tolerance(aE); + aToler = BRep_Tool::Tolerance(aE); BOPTools_AlgoTools2D::MakePCurveOnFace(aF, C3D2, f3d, l3d, aC2D, aToler); // aFirst = f3d; diff --git a/tests/bugs/modalg_5/bug25625 b/tests/bugs/modalg_5/bug25625 new file mode 100644 index 0000000000..dcc82e2318 --- /dev/null +++ b/tests/bugs/modalg_5/bug25625 @@ -0,0 +1,27 @@ +puts "================" +puts "OCC25625" +puts "================" +puts "" +#################################### +# Boolean COMMON cannot be built +#################################### + +restore [locate_data_file bug25625_shape1_fix.brep] b1 +restore [locate_data_file bug25625_shape2_fix.brep] b2 + +bop b1 b2 +bopcommon result + +set square 0.985997 + +set nb_v_good 10 +set nb_e_good 11 +set nb_w_good 2 +set nb_f_good 2 +set nb_sh_good 1 +set nb_sol_good 0 +set nb_compsol_good 0 +set nb_compound_good 1 +set nb_shape_good 27 + +set 2dviewer 1 -- 2.39.5