summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-07-24 00:31:02 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-07-24 00:31:02 +0000
commit590e801edf05b0063e54dbe36d785c88b65a264a (patch)
treedda3102ae644b223e095b4f408979a090bec0285 /src
parentFix bug on closed nodes in fillet-chamfer LPE (diff)
downloadinkscape-590e801edf05b0063e54dbe36d785c88b65a264a.tar.gz
inkscape-590e801edf05b0063e54dbe36d785c88b65a264a.zip
Fix a bug on type of 'fillet' on the closing node
(bzr r13341.1.97)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 1c3dc645c..eae37ad36 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -479,7 +479,7 @@ LPEFilletChamfer::doEffect_path(std::vector<Geom::Path> const &path_in)
Piecewise<D2<SBasis> > n = rot90(unitVector(der));
fillet_chamfer_values.set_pwd2(pwd2_in, n);
std::vector<Point> filletChamferData = fillet_chamfer_values.data();
- int counter = 0;
+ unsigned int counter = 0;
//from http://launchpadlibrarian.net/12692602/rcp.svg
const double K = (4.0 / 3.0) * (sqrt(2.0) - 1.0);
for (PathVector::const_iterator path_it = path_in.begin();
@@ -502,7 +502,7 @@ LPEFilletChamfer::doEffect_path(std::vector<Geom::Path> const &path_in)
curve_endit = path_it->end_open();
}
}
- int counterCurves = 0;
+ unsigned int counterCurves = 0;
while (curve_it1 != curve_endit) {
Coord it1_length = (*curve_it1).length(tolerance);
double time_it1, time_it2, time_it1_B, intpart;
@@ -604,7 +604,12 @@ LPEFilletChamfer::doEffect_path(std::vector<Geom::Path> const &path_in)
if (time_it1_B != gapHelper && time_it1_B != time_it1 + gapHelper) {
path_out.append(*knotCurve1);
}
- int type = abs(filletChamferData[counter + 1][Y]);
+ int type = 0;
+ if(path_it->closed() && curve_it2 == curve_endit){
+ type = abs(filletChamferData[counter - counterCurves][Y]);
+ } else {
+ type = abs(filletChamferData[counter + 1][Y]);
+ }
if (type == 3 || type == 4) {
if (type == 4) {
Geom::Point central = middle_point(startArcPoint, endArcPoint);