Hi MO,
Thanks for taking a crack at it!
I don't use the node system, so I'm not able to test your .nod and when I open it in a text editor I can't make heads or tails of it. Looks like it's all references to javascript contained in some other files.
In any case, like I said in my first message I tried out a bounding box approach using the BoundingBox command and had problems with accuracy. My assumption is that BoundingBox uses a high accuracy (rather than quick) bounding box method under the hood.
Just now I checked my assumption by coding up my own bounding box command using objectlist.getHighAccuracyBoundingBox() and see the same kind of accuracy problems as from the native BoundingBox command.
Specifically, I found that for a smooth curve if I intersect the bounding box with the curve I don't just get 1 point at each intersection, but 2 slightly separated points. I don't think this is limited by the accuracy of intersection since doing the same kind of thing with tangent lines drawn using tangent snaps gives a single point object from Construct > Curve > Isect.
In your node were you able to somehow overcome the accuracy issue?
I guess I could get closer by interpolating the pairs of intersection points, but since the bounding box method does nothing to solve the point projection (as opposed to parallel) case, and since Michael has kindly offered to add a method to cover both cases, I'll probably wait for that.
- Peer
|