From 70d08ce5b2d4476c723049d668c669f4890accc0 Mon Sep 17 00:00:00 2001 From: aml Date: Thu, 11 Dec 2014 16:40:37 +0300 Subject: [PATCH] 0025558: It is impossible to restore attached shape Condition of adding one last knot corrected. Test-case for issue #25558 --- src/BSplCLib/BSplCLib.cxx | 4 ++-- tests/bugs/fclasses/bug25558 | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/fclasses/bug25558 diff --git a/src/BSplCLib/BSplCLib.cxx b/src/BSplCLib/BSplCLib.cxx index e53a28df93..77decf1daa 100644 --- a/src/BSplCLib/BSplCLib.cxx +++ b/src/BSplCLib/BSplCLib.cxx @@ -1698,8 +1698,8 @@ Standard_Boolean BSplCLib::PrepareInsertKnots { //gka for case when segments was produced on full period only one knot //was added in the end of curve - if(fabs(adeltaK1) <= Precision::PConfusion() && - fabs(adeltaK2) <= Precision::PConfusion()) + if(fabs(adeltaK1) <= gp::Resolution() && + fabs(adeltaK2) <= gp::Resolution()) ak++; } diff --git a/tests/bugs/fclasses/bug25558 b/tests/bugs/fclasses/bug25558 new file mode 100644 index 0000000000..ada62c3ba9 --- /dev/null +++ b/tests/bugs/fclasses/bug25558 @@ -0,0 +1,14 @@ +puts "========" +puts "OCC25558" +puts "========" +puts "" +############################################## +# It is impossible to restore attached shape +############################################## + +smallview + +restore [locate_data_file OCC25558_faulty.brep] a1 + +fit +set only_screen_axo 1