How to use Translate under GeometryBase to a rectangle?

In the below simple Code I would like to Translate this page2 to the right. but Rectangle isn’t a GeometryBase so it couldn’t use this Method.

I am still grasping the idea of cast in C# so any help would be very much appreciated

Point3d frame1Corner1 = new Point3d(297.0,0,0);
Point3d frame1Corner2 = new Point3d(0,210.0,0);

Rectangle3d _page1 = new Rectangle3d(Plane.WorldXY, frame1Corner1, frame1Corner2);
Rectangle3d _page2 = _page1;
_page2.Translate(0, frame1Corner2.X, 0);

You can cast to Curve

How do I do that? may I know?

Try:

1 Like