I use a mechanism similar to this "in some of my plugins that draw shapes" I add a "Construction" Layer and my code adds the "important points" as a Polyline in this layer, so it is easy when the figures are costructed to select and move the different figures allining the centers of each figure, but is a workaround, and my work is done at the creation time.

It has not to be too difficult to add a plugin that do it in automated ways, here one of my methods to find a line intersection point, if p1,p2 and bp1,bp2 are the diagonals of of a rectangle the pti point is the center.

the methods return true if the intersection exist, otherwise false.

static bool LinesIntersect(Point2F p1, Point2F p2, Point2F bp1, Point2F bp2, out Point2F pti)

{

double dxa = p2.X - p1.X;

double dya = p2.Y - p1.Y;

double dxb = bp2.X - bp1.X;

double dyb = bp2.Y - bp1.Y;

double d = (dya * dxb - dxa * dyb);

double t1 = ((p1.X - bp1.X) * dyb + (bp1.Y - p1.Y) * dxb)/ d;

if (double.IsInfinity(t1))

{

pti = new Point2F (double.NaN, double.NaN);

return false;

}

// Find the point of intersection.

pti = new Point2F(p1.X + dxa * t1, p1.Y + dya * t1);

return true;

}

Regards