def test_check_values(self): test_points = [(0.0, 0.0), (1., 2.), (3., 1.), (5., 3.)] spline = CubicSpline(test_points) result = spline.approximate(50) for p1, p2 in zip(result, expected): self.assertAlmostEqual(p1[0], p2[0], places=6) self.assertAlmostEqual(p1[1], p2[1], places=6)
def __dxftags__(self): spline = CubicSpline(self.points) polyline = Polyline(spline.approximate(self.segments), layer=self.layer, color=self.color, linetype=self.linetype) return polyline.__dxftags__()
def __dxftags__(self): spline = CubicSpline(self.points) polyline = Polyline(spline.approximate(self.segments), layer = self.layer, color=self.color, linetype = self.linetype) return polyline.__dxftags__()
def _build_curve(self): spline = CubicSpline(self.points) polyline = Polyline( spline.approximate(self.segments), layer=self.layer, color=self.color, linetype=self.linetype ) return polyline