Salome HOME
refs #430: incorrect coordinates in dump polyline
[modules/hydro.git] / src / HYDROData / test_HYDROData_BSplineOperation.cxx
index f5310176fb5bfbf9d1a1a895e71f6e809f0d821a..51bf3693276fc6fe6cc4eef0aecfa571558018cf 100644 (file)
@@ -4,6 +4,8 @@
 #include <gp_Pnt.hxx>
 #include <QTransform>
 
+const double LOCAL_SELECTION_TOLERANCE = 0.0001;
+
 void test_HYDROData_BSplineOperation::testCurve()
 {
   // prepare points: function of sin(x)
@@ -14,7 +16,7 @@ void test_HYDROData_BSplineOperation::testCurve()
     aPoints.Append( aPoint );
   }
   // compute BSpline
-  HYDROData_BSplineOperation aBSpline( aPoints, false );
+  HYDROData_BSplineOperation aBSpline( aPoints, false, LOCAL_SELECTION_TOLERANCE );
   
   Handle(Geom_BSplineCurve) aBS = aBSpline.Curve();
   CPPUNIT_ASSERT( !aBS.IsNull() );
@@ -44,11 +46,12 @@ void test_HYDROData_BSplineOperation::testPath()
   }
 
   // convert to QPainterPath
-  HYDROData_BSplineOperation aBSpline( aPoints, false );
+  HYDROData_BSplineOperation aBSpline( aPoints, false, LOCAL_SELECTION_TOLERANCE );
 
   CPPUNIT_ASSERT( !aBSpline.Curve().IsNull() );
 
-  QPainterPath aPath = aBSpline.ComputePath();
+  QPainterPath aPath;
+  aBSpline.ComputePath( aPath );
   CPPUNIT_ASSERT( !aPath.isEmpty() );
   
   /*