summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-05-11 20:27:45 +0000
committerjabiertxof <info@marker.es>2016-05-11 20:27:45 +0000
commitb03cc6d03c9cfa57ebee8c70412e96c5d92f4f83 (patch)
treef415fc8013a6905b0771cd50a46d1a2899fbcf2e /src/live_effects
parentupdate to trunk (diff)
downloadinkscape-b03cc6d03c9cfa57ebee8c70412e96c5d92f4f83.tar.gz
inkscape-b03cc6d03c9cfa57ebee8c70412e96c5d92f4f83.zip
pre-remove of subpath update satellites
(bzr r13645.1.132)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp28
-rw-r--r--src/live_effects/parameter/satellitesarray.cpp1
2 files changed, 14 insertions, 15 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index ab1cf41e3..7379efcf6 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -410,22 +410,21 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
}
}
//if are diferent sizes call to poinwise recalculate
- //todo: fire a reverse satellites on reverse path. Maybe a new method
- //like "are_similar" to avoid precission issues on reverse a pointwise
- //and after convert to Pathvector
+ //TODO: Update the satellite data in paths modified, Goal 0.93
if (pointwise && number_nodes != pointwise->getTotalSatellites()) {
- std::cout << "gasdfgffffffffffffffffffffffffffffffffffffffffffffffffff\n";
+ pointwise->setSatellites(satellites);
Satellite satellite(satellites[0][0].satellite_type);
satellite.setIsTime(satellites[0][0].is_time);
satellite.setHasMirror(satellites[0][0].has_mirror);
pointwise->recalculateForNewPwd2(pwd2, pathv, satellite);
+ satellites_param.setPointwise(pointwise);
} else {
pointwise = new Pointwise();
pointwise->setPwd2(pwd2);
pointwise->setSatellites(satellites);
+ satellites_param.setPointwise(pointwise);
+ refreshKnots();
}
- satellites_param.setPointwise(pointwise);
- refreshKnots();
} else {
g_warning("LPE Fillet can only be applied to shapes (not groups).");
}
@@ -477,16 +476,15 @@ LPEFilletChamfer::doEffect_path(Geom::PathVector const &path_in)
}
continue;
}
+ if (curve_next_index && *curve_next_index != pathv[path].size() - 1 && pathv[path][*curve_next_index].isDegenerate()) {
+ curve_next_index = *curve_next_index + 1;
+ }
Geom::Curve const &curve_it2 = pathv[path][*curve_next_index];
-// if (curve != pathv[path].size() && (*curve_it2).isDegenerate()) {
-// ++curve_it2;
-// }
-// if ((*curve_it1).isDegenerate()) {
-// ++curve_it1;
-// counter_curves++;
-// time0 = 0.0;
-// continue;
-// }
+ if ((*curve_it1).isDegenerate()) {
+ curve++;
+ time0 = 0.0;
+ continue;
+ }
Satellite satellite = satellites[path][*curve_next_index];
if (!curve) { //curve == 0
if (!path_it->closed()) {
diff --git a/src/live_effects/parameter/satellitesarray.cpp b/src/live_effects/parameter/satellitesarray.cpp
index 9f14a1d5b..8e6ba0b41 100644
--- a/src/live_effects/parameter/satellitesarray.cpp
+++ b/src/live_effects/parameter/satellitesarray.cpp
@@ -339,6 +339,7 @@ Geom::Point FilletChamferKnotHolderEntity::knot_get() const
return Geom::Point(Geom::infinity(), Geom::infinity());
}
Geom::PathVector pathv = pointwise->getPV();
+
if (pathv[_index].size() <= subindex){ //We know this path is open and is last satellite. Hide it
_pparam->_vector[_index][subindex].hidden = true;
return Geom::Point(Geom::infinity(), Geom::infinity());