diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-patternalongpath.cpp | 25 | ||||
| -rw-r--r-- | src/live_effects/lpe-sketch.cpp | 22 |
2 files changed, 1 insertions, 46 deletions
diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp index eab3dd80e..d36050a7f 100644 --- a/src/live_effects/lpe-patternalongpath.cpp +++ b/src/live_effects/lpe-patternalongpath.cpp @@ -88,31 +88,6 @@ LPEPatternAlongPath::~LPEPatternAlongPath() } - -//TODO: does this already exist in 2Geom? if not, move this there... -static -std::vector<Geom::Piecewise<Geom::D2<Geom::SBasis> > > -split_at_discontinuities (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwsbin, double tol = .0001) -{ - using namespace Geom; - std::vector<Piecewise<D2<SBasis> > > ret; - unsigned piece_start = 0; - for (unsigned i=0; i<pwsbin.segs.size(); i++){ - if (i==(pwsbin.segs.size()-1) || L2(pwsbin.segs[i].at1()- pwsbin.segs[i+1].at0()) > tol){ - Piecewise<D2<SBasis> > piece; - piece.cuts.push_back(pwsbin.cuts[piece_start]); - for (unsigned j = piece_start; j<i+1; j++){ - piece.segs.push_back(pwsbin.segs[j]); - piece.cuts.push_back(pwsbin.cuts[j+1]); - } - ret.push_back(piece); - piece_start = i+1; - } - } - return ret; -} - - Geom::Piecewise<Geom::D2<Geom::SBasis> > LPEPatternAlongPath::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in) { diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp index bb3fb3162..5ad9ed648 100644 --- a/src/live_effects/lpe-sketch.cpp +++ b/src/live_effects/lpe-sketch.cpp @@ -134,27 +134,7 @@ addLinearEnds (Geom::Piecewise<Geom::D2<Geom::SBasis> > & m){ } */ -//TODO: does this already exist in 2Geom? if not, move this there... -std::vector<Geom::Piecewise<Geom::D2<Geom::SBasis> > > -split_at_discontinuities (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwsbin, double tol = .0001) -{ - using namespace Geom; - std::vector<Piecewise<D2<SBasis> > > ret; - unsigned piece_start = 0; - for (unsigned i=0; i<pwsbin.segs.size(); i++){ - if (i==(pwsbin.segs.size()-1) || L2(pwsbin.segs[i].at1()- pwsbin.segs[i+1].at0()) > tol){ - Piecewise<D2<SBasis> > piece; - piece.cuts.push_back(pwsbin.cuts[piece_start]); - for (unsigned j = piece_start; j<i+1; j++){ - piece.segs.push_back(pwsbin.segs[j]); - piece.cuts.push_back(pwsbin.cuts[j+1]); - } - ret.push_back(piece); - piece_start = i+1; - } - } - return ret; -} + //This returns a random perturbation. Notice the domain is [s0,s0+first multiple of period>s1]... Geom::Piecewise<Geom::D2<Geom::SBasis> > |
