On Jul 14, 2008, at 4:24 AM, Graham Cox wrote:
Right now I use GPC and (optional) curve fitting. It keeps the curves in terms of their appearance but can greatly alter the number and location of the control points. I don't like it much either - one reason I'd love there to be a great solution built-in. Unfortunately I'm no mathematician and so I haven't been able to come up with a great way to do it from first principles, nor found any suitable code out there until...

I just had a short look at the Omni-OAExtensions. There are some functions to find intersections of paths, so I have to build my own merging routine out of it, right?


...this. I hadn't seen those before either. It looks as if they've given away the hardest part, finding the intersections and crossing directions of each intersection. On top of that you can build the set operations. I plan to have a very good look at doing this for DK as soon as I can - if it can be made to work it will be a much better solution than curve fitting. Props to the Omni guys for being prepared to give away this code like this :)

You're welcome!

The set operations are still quite a bit of work even given all that as a substrate. Beware of the complications of shared line/curve segments between the two paths (places where they overlap for more than just a single point at a time). That makes things quite a bit more difficult.

        - Greg
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to