How to draw polylines in a plane using grasshopper with c# or python

like this rectangle componentrectangle

Draw or make?


I have some thoughts like the picture.
Could you give some thoughts, David Rutten?

You can evaluate planes directly, so you could create your polyline like this:

Plane plane = ...;
Polyline polyline = new Polyline();
polyline.Add(plane.PointAt(X, 0));
polyline.Add(plane.PointAt(0, Y));
polyline.Add(plane.PointAt(0, 0));

or, if you have a polyline, you can indeed transform it into a plane coordinate space.

Polyline polyline = ...;
Transform transform = Transform.PlaneToPlane(Plane.WorldXY, plane);

Thanks ,David Rutten
I will try it