Code

fix nodetype determination. fixes lpe spiro bug
authorjohanengelen <johanengelen@users.sourceforge.net>
Sat, 2 Aug 2008 20:48:51 +0000 (20:48 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sat, 2 Aug 2008 20:48:51 +0000 (20:48 +0000)
src/helper/geom-nodetype.cpp

index 54c4e4e889eba64b0bb9dc211e8e6e3d2c491da9..17266ad315348eb8e6c0e2d8ad3cd7126c4d9fb4 100644 (file)
@@ -31,7 +31,9 @@ NodeType get_nodetype(Curve const &c_incoming, Curve const &c_outgoing)
     if ( !are_near(c_incoming.pointAt(1), c_outgoing.pointAt(0)) )
         return NODE_NONE;
 
-    Geom::Point deriv_1 = c_incoming.unitTangentAt(1);
+    Geom::Curve *crv = c_incoming.reverse();
+    Geom::Point deriv_1 = -crv->unitTangentAt(0);
+    delete crv;
     Geom::Point deriv_2 = c_outgoing.unitTangentAt(0);
     double this_angle_L2 = Geom::L2(deriv_1);
     double next_angle_L2 = Geom::L2(deriv_2);