Friday, May 28, 2010

Point to Point Constraint Working

Point to point constraint is working right now. Even the action was done previously, it did not succeed working for one reason, the way that transforms work and how NaroCAD handle it. In short NaroCAD store two items as information for shape's transformation. One is the transformation matrix itself and the other one is the pivot. The pivot is the "origin" of the shape.
When the old code worked, it tried when you picked two points, to adjust the pivot to be aligned with the difference of the point. The problem was that the pivot was adjusted with overriding the pivot itself, instead of doing add/substract of coordinate difference. That made when moving the source shape, the second "follower" shape, will simply jump trying to readjust the ever changing modified shape.

No comments: