From: Johan E. <jbc...@sw...> - 2012-09-05 17:55:23
|
On 5-9-2012 17:21, mathog wrote: > > Geom::Piecewise<Geom::D2<Geom::SBasis> > P1; // N points assigned > Geom::Piecewise<Geom::D2<Geom::SBasis> > P2; // M points assigned > > where P1's last point is the same as P2's first. The slopes > on both sides of that common point are correct too because P1 and P2 > are > subpaths of a common path. What is (pseudocode) > > P1.fuse(P2); > > to leave P1 with N+M-1 points and the segments beginning/ending on the > common point fused? > > Presumably it isn't: > > P1.concat(P2); > > because, as I think I understand it, concat would leave two copies of > the common point and > would not fuse the draw operation through it. The Piecewise class does not store points, only path segments (D2<SBasis> in this case). Segments are completely independent from each other (discontinuities are allowed, for example). So concat does what you wish; it only places P2 after P1, without modifying/adjusting the result. Regards, Johan |