View Single Post
I don't know why Problem 1 is happening, but I think I can solve Problem 2:

I'm not sure of the exact cause, but you didn't specify magnet locations on the shapes. Perhaps there's a bug or rounding error when OG calculates the initial endpoint for the line on shapeB's edge. I believe the line should be pointing toward the shape's center in this case, and the error could be in calculating the intersection of the center-to-center line with the edge of shapeB. It's interesting to note that the amount of the error changes if you switch the order of the set source and set destination lines in the script, and that the error disappears the first time you move one of the shapes even the slightest amount (bug-finding clues for OG?).

In any case, adding, for example, the property magnets:{{0.5, 0.0}} when making shapeA and magnets:{{-0.5, 0.0}} when making shapeB fixes Problem2. If you actually wanted the line to be center-pointing rather than horizontal, making {0.0, 0.0} magnets instead would do that.

Last edited by john.gersh; 2011-05-05 at 06:29 AM..