Create 2d Rectangle in RhinoCommon

Hi all,

there is a


and it ask for a type “Rectangle”

Draw2dRectangle(self: DisplayPipeline, rectangle: Rectangle, strokeColor: Color, thickness: int, fillColor: Color)

But in RhinoCommon is only


Which is type “Rectangle3d” and not “Rectangle”.

How can the object of the type “Rectangle” be created ?.

Hi @flokart, try like this:

import System

location = System.Drawing.Point(10,10)
size = System.Drawing.Size(200, 200)
rect = System.Drawing.Rectangle(location, size)

print type(rect)

You*ll find Rectangle here.

Oh man,

i tried that before but printed.

print rect.GetType()

and got


and was confused…so thanks for clerification.