diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-06-26 15:58:32 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-06-26 15:58:32 +0000 |
| commit | a5d2901e1f17879bc65e23b3ff26f8c304658ce4 (patch) | |
| tree | c722b0a68529cd3c3b0d6af03fca2f078d744857 /src | |
| parent | update to trunk (diff) | |
| download | inkscape-a5d2901e1f17879bc65e23b3ff26f8c304658ce4.tar.gz inkscape-a5d2901e1f17879bc65e23b3ff26f8c304658ce4.zip | |
removed reverse path, commented why
(bzr r13645.1.97)
Diffstat (limited to 'src')
| -rw-r--r-- | src/helper/geom-pointwise.cpp | 14 | ||||
| -rw-r--r-- | src/helper/geom-pointwise.h | 1 | ||||
| -rw-r--r-- | src/live_effects/lpe-fillet-chamfer.cpp | 3 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/helper/geom-pointwise.cpp b/src/helper/geom-pointwise.cpp index dc95ffda4..5f6c0d29e 100644 --- a/src/helper/geom-pointwise.cpp +++ b/src/helper/geom-pointwise.cpp @@ -83,11 +83,7 @@ void Pointwise::setStart() */ void Pointwise::recalculateForNewPwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Geom::PathVector const B, Satellite const S) { - Geom::PathVector const reversed = path_from_piecewise(remove_short_cuts(reverse(_pwd2), 0.1), 0.001); - Geom::PathVector const original = path_from_piecewise(remove_short_cuts(reverse(A), 0.1), 0.001); - if (reversed == original) { - pwd2Reverse(A); - } else if (_pwd2.size() > A.size()) { + if (_pwd2.size() > A.size()) { pwd2Sustract(A); } else if (_pwd2.size() < A.size()) { pwd2Append(A, S); @@ -116,14 +112,6 @@ void Pointwise::pwd2Sustract(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A) setSatellites(sats); } -/** Reverse a path - */ -void Pointwise::pwd2Reverse(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A){ - std::reverse(_satellites.begin(), _satellites.end()); - setPwd2(A); - setSatellites(_satellites); -} - /** Append nodes/subpaths to current pointwise */ void Pointwise::pwd2Append(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Satellite const S) diff --git a/src/helper/geom-pointwise.h b/src/helper/geom-pointwise.h index 79504ecff..d83b54b79 100644 --- a/src/helper/geom-pointwise.h +++ b/src/helper/geom-pointwise.h @@ -54,7 +54,6 @@ public: void setStart(); void recalculateForNewPwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Geom::PathVector const B, Satellite const S); - void pwd2Reverse(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A); void pwd2Sustract(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A); void pwd2Append(Geom::Piecewise<Geom::D2<Geom::SBasis> > const A, Satellite const S); void subpathToBack(size_t subpath); diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp index cc21d99cc..eaf1c6a08 100644 --- a/src/live_effects/lpe-fillet-chamfer.cpp +++ b/src/live_effects/lpe-fillet-chamfer.cpp @@ -429,6 +429,9 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem) path_info->set(original_pathv); size_t number_curves = path_info->size(); //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 if (pointwise && number_curves != sats.size()) { Satellite sat(sats[0].satellite_type); sat.setIsTime(sats[0].is_time); |
