From: Krzysztof K. <twe...@gm...> - 2015-03-15 04:17:37
|
2015-03-15 3:15 GMT+01:00 Nathan Hurst <nj...@nj...>: > Awesome Krzysztof! > > I'll certainly review it for you if you want. > > njh > The rough design: 1. intersect() will return a vector of structures that look like this: struct Intersection { Shape const &_a; Shape const &_b; double _ta; double _tb; ... Point position() const; }; It could also return a structure that contains a vector of pairs of intersection times, but I think that would ultimately be less convenient. 2. position() will average the results from pointAt() evaluated on both shapes. 3. New overloads of portion() will accept the intersection information described above and adjust the endpoints of computed portions so that they match exactly with position() 4. Optionally: A new base class called Shape will be added. Things like Ellipse, Curve, Line and so on will derive from it. This class will expose a function interface, with methods such as pointAt(), domain(), intersect(). There might also be something called BoundedShape which will have a conversion to Path. Rect and Circle are not closed under affine transforms, so they would probably remain primitives rather than shapes. > On Sun, Mar 15, 2015 at 01:57:31AM +0100, Krzysztof Kosiński wrote: >> 2Geom sync would be a good idea. >> >> I want to introduce a new generic intersection API (I started working >> on it today), which may require some changes, but shouldn't cause any >> major API breaks. >> >> The main thing that will have to be changed in Inkscape is the >> renaming of nearestPoint() and similar methods to nearestTime(). >> >> Regards, Krzysztof >> >> 2015-03-15 0:25 GMT+01:00 alvinpenner <pe...@va...>: >> > there have been a number of changes made in lib2geom in the last 4 months or >> > so, would this be a good time to sync again? >> > >> > Alvin >> > >> > >> > >> > -- >> > View this message in context: http://inkscape.13.x6.nabble.com/time-to-sync-with-lib2geom-tp4973183.html >> > Sent from the Inkscape - Dev mailing list archive at Nabble.com. >> > >> > ------------------------------------------------------------------------------ >> > Dive into the World of Parallel Programming The Go Parallel Website, sponsored >> > by Intel and developed in partnership with Slashdot Media, is your hub for all >> > things parallel software development, from weekly thought leadership blogs to >> > news, videos, case studies, tutorials and more. Take a look and join the >> > conversation now. http://goparallel.sourceforge.net/ >> > _______________________________________________ >> > Inkscape-devel mailing list >> > Ink...@li... >> > https://lists.sourceforge.net/lists/listinfo/inkscape-devel >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub for all >> things parallel software development, from weekly thought leadership blogs to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Inkscape-devel mailing list >> Ink...@li... >> https://lists.sourceforge.net/lists/listinfo/inkscape-devel |