Code

Rename LPE: mirror reflect --> mirror symmetry
[inkscape.git] / src / live_effects / lpe-knot.cpp
index 245b6df0f8577e9c2f76f43d259513c2c6a83225..678bbf8ba070a0aaad8c2b9f69e8f36e5b507fce 100644 (file)
  */
 
 #include "live_effects/lpe-knot.h"
-#include "display/curve.h"
-#include <libnr/n-art-bpath.h>
 
 #include <2geom/path.h>
-//#include <2geom/sbasis.h>
-//#include <2geom/sbasis-geometric.h>
-//#include <2geom/bezier-to-sbasis.h>
-//#include <2geom/sbasis-to-bezier.h>
 #include <2geom/d2.h>
-//#include <2geom/sbasis-math.h>
-//#include <2geom/piecewise.h>
 #include <2geom/crossing.h>
 #include <2geom/path-intersection.h>
 
@@ -32,7 +24,7 @@ namespace LivePathEffect {
 LPEKnot::LPEKnot(LivePathEffectObject *lpeobject) :
     Effect(lpeobject),
     // initialise your parameters here:
-    interruption_width(_("Interruption width"), _("Howmuch the lower strand is obscured by the upper."), "interruption_width", &wr, this, 10)
+    interruption_width(_("Gap width"), _("The width of the gap in the path where it self-intersects"), "interruption_width", &wr, this, 10)
 {
     // register all your parameters here, so Inkscape knows which parameters this effect has:
     registerParameter( dynamic_cast<Parameter *>(&interruption_width) );
@@ -70,7 +62,7 @@ findShadowedTime(Geom::Path &patha,
     if(curveidx == pathb.size() && timeoncurve == 0) { curveidx--; timeoncurve = 0.99999;}
     assert(curveidx >= 0 && curveidx < pathb.size());
     
-    std::vector<Point> MV = pathb[unsigned(curveidx)].pointAndDerivatives(timeoncurve,2);
+    std::vector<Point> MV = pathb[unsigned(curveidx)].pointAndDerivatives(timeoncurve,1);
     Point T = unit_vector(MV.at(1));
     Point N = T.cw();
     Point A = MV.at(0)-10*width*T, B = MV.at(0)+10*width*T;