From 89aebdea8d6f4d15cfc50e9458cd8e2e25022326 Mon Sep 17 00:00:00 2001 From: msv Date: Fri, 25 Nov 2016 12:40:25 +0300 Subject: [PATCH] 0027033: Modeling -- ensure stable result of area calculation The method BRepGProp_Face::LKnots has been corrected to make proper initialization of the output data for the case of a circle. Added test case bugs/modalg_6/bug27033 --- src/BRepGProp/BRepGProp_Face.cxx | 2 +- tests/bugs/modalg_6/bug27033 | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_6/bug27033 diff --git a/src/BRepGProp/BRepGProp_Face.cxx b/src/BRepGProp/BRepGProp_Face.cxx index 4484d214b1..bf3e6797c9 100644 --- a/src/BRepGProp/BRepGProp_Face.cxx +++ b/src/BRepGProp/BRepGProp_Face.cxx @@ -470,7 +470,7 @@ void BRepGProp_Face::LKnots(TColStd_Array1OfReal& Knots) const break; case GeomAbs_Circle: case GeomAbs_Ellipse: - Knots(1) = 0.0; Knots(2) = M_PI*2.0/3.0; Knots(3) = M_PI*4.0/3.0; Knots(2) = M_PI*6.0/3.0; + Knots(1) = 0.0; Knots(2) = M_PI*2.0/3.0; Knots(3) = M_PI*4.0/3.0; Knots(4) = M_PI*6.0/3.0; break; case GeomAbs_Parabola: case GeomAbs_Hyperbola: diff --git a/tests/bugs/modalg_6/bug27033 b/tests/bugs/modalg_6/bug27033 new file mode 100644 index 0000000000..c2d05b2822 --- /dev/null +++ b/tests/bugs/modalg_6/bug27033 @@ -0,0 +1,16 @@ +puts "=========" +puts "OCC27033" +puts "=========" +puts "" +############################################################# +# Modeling -- ensure stable result of area calculation +############################################################# + +pload XDE +stepread [locate_data_file OCC11856.stp] a * + +for {set i 1} {$i < 100} {incr i} { + checkprops a_1 -s 647779 -eps 0.1 +} + +checkview -display a_1 -2d -path ${imagedir}/${test_image}.png \ No newline at end of file