I am trying to stack rectangles between certain distances inside a selected polyline. I have the east west figured out, but not sure how to solve the north south at the same time. Any help appreciated.
ObjectId rectangleboundary = CreateRectangle(pline.GeometricExtents.MinPoint, pline.GeometricExtents.MaxPoint);
double eastwestdist = Math.Abs(pline.GeometricExtents.MinPoint.X - pline.GeometricExtents.MaxPoint.X);
double northsouthdist = Math.Abs(pline.GeometricExtents.MinPoint.Y - pline.GeometricExtents.MaxPoint.Y);
double topleftx = pline.GeometricExtents.MinPoint.X;
double toplefty = pline.GeometricExtents.MaxPoint.Y;
Point3d topleft
= new Point3d
(topleftx,toplefty,
0);
double distance = 30;
double checkhorz = 0;
while (checkhorz < eastwestdist)
{
rectangleboundary
= CreateRectangle
(new Point3d
(topleft
.X + checkhorz,topleft
.Y,
0),
new Point3d
(topleft
.X + checkhorz
+ distance, topleft
.Y - distance,
0)); checkhorz = checkhorz + distance;
}
Thanks!