From: Johan E. <jbc...@sw...> - 2012-09-04 19:28:22
|
On 4-9-2012 21:14, mathog wrote: > How in 2geom does one do (pseudocode) > > Geom::Path P; //contains a path already, lines and/or Beziers > > Geom::Point from=P.begin(); > subpath = make_sub_path(P,from,start,end,&trunc); > > where: > > 1. subpath is the path: from + start -> from + end, where start & end > are distances along P > 2. trunc is set if the subpath would have extended beyond P.end(). > > The original path P should not be modified. Hi David, Have a look at Path::portion. The parameters are "time-values" along the path I believe, not distance. To match time values with distance along the path, you can do an arc_length_parametrization, but I think that is only available for Piecewise<D2<SBasis> > paths. But it may not be necessary to do that (expensive) operation, if you can derive your start/end points as time-values in a different way. Ciao, Johan |