From c85efd9949049fdfda8b1decde5cb1e112893e17 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 10 Apr 2012 22:46:16 +0200 Subject: more 2geom fix (bzr r11215) --- src/2geom/sbasis-geometric.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/2geom/sbasis-geometric.cpp b/src/2geom/sbasis-geometric.cpp index b228a8ca0..74827e27c 100644 --- a/src/2geom/sbasis-geometric.cpp +++ b/src/2geom/sbasis-geometric.cpp @@ -1,9 +1,3 @@ -#include <2geom/sbasis-geometric.h> -#include <2geom/sbasis.h> -#include <2geom/sbasis-math.h> -//#include <2geom/solver.h> -#include <2geom/sbasis-geometric.h> - /** Geometric operators on D2 (1D->2D). * Copyright 2007 JF Barraud * Copyright 2007 N Hurst @@ -21,6 +15,12 @@ * **/ +#include <2geom/sbasis-geometric.h> +#include <2geom/sbasis.h> +#include <2geom/sbasis-math.h> +//#include <2geom/solver.h> +#include <2geom/sbasis-geometric.h> + //namespace Geom{ using namespace Geom; using namespace std; @@ -409,6 +409,9 @@ Geom::arc_length_parametrization(D2 const &M, Piecewise s = arcLengthSb(Piecewise >(M),tol); for (unsigned i=0; i < s.size();i++){ double t0=s.cuts[i],t1=s.cuts[i+1]; + if ( are_near(s(t0),s(t1)) ) { + continue; + } D2 sub_M = compose(M,Linear(t0,t1)); D2 sub_u; for (unsigned dim=0;dim<2;dim++){ -- cgit v1.2.3