Python Beginner

Hi All,

I just started learning python, making the basics of scrips to understand how it works.
One of the first thing I tried doing is creating and rotating a square. The script seems to have done the job but i still get an error that says “Data conversation failed from Number to Geometry”

Does anyone know what I am doing wrong please?

Thank you.

Hi,

gh.Polygon() returns a dictionary with the polygon object as well as its length/perimeter.

You need to unpack both variables on line 5, like this:

rectangle, length = gh.Polygon(plane, dim, 4, fillet)

By the way, as a beginner I’d say start with rhinoscriptsyntax, instead of the horrible node in code stuff, or even rhinocommon, if you already know about object oriented programming.

Thanks a lot, that did solve the problem.