Getting error while trying to create a Rectangle 2Pt from gh python

Dear all,
I am trying to create a rectangle by translating the info from a point (which is considered the midpoint of the rectangle geometry.). While I wrote the code in GHPython but got stuck. Am getting an error while trying to create a Rectangle 2Pt from gh python.
Thanks in advance
Vijesh

Where is the code?

Am sorry, I missed attaching the file. Here it is.

Hi @vijesh

Rectangle2PT component needs a plane, two points located in the plane defined before, and a radius. Maybe the mistake is because you are not assigning a hint to the variables.

In your case, x should be a plane, and y and z should be a point3D.

Regards

Rectangle2PT.gh (6.4 KB)

1 Like

You can use ghpythonlib.components or Rhino.Geometry

rec.gh (5.2 KB)

1 Like

Thank you very much for the replies. I did not set the points and plane on ‘Type Hint’. I have solved it with the given instructions. Thanks for both.