Not a polyline curve. Type received: <class ‘Rhino.Geometry.Point3d’>

I have been trying to make a python script in Grasshopper with chatGPT, be we don’t seem to be able to solve a problem with an input.
I have made some grasshopper scripts, but I don’t really know Python.
Working in Rhino 8, build 1.0.0008.

The error:
Warning: An item in the shapes input is not a polyline or polyline curve. Type received: <class ‘Rhino.Geometry.Point3d’>
This is repeated 7 times, as many as there are points in the original input

I don’t think there is anything in the script that would break up the polys into control points.

RectPack_014_met AI_clean_forQ.gh (16.4 KB)

Hey Ernst van der Vecht,

Not entirely sure what you’re trying to make and if your approach is logical. But what I do notice is that you’re trying to iterate over a list of shapes in the python code. But the py3 block is set to Item acces, but you’re handling it as if it’s list

I’m referring to this part in the python block.

for poly in shapes: 

If you change the input shapes to List Acces it works.

Thanks Martijn, I’m just trying to see if I can write grasshopper/python scripts working with chatGPT.

I was trying to see if I could write a shape-packing script. Here is the script, It doesn’t work, I think I will abandon it and work with OpenNest2.

RectPack_020_met AI_clean_feedback.gh (9.1 KB)

My conclusion on working with chatGPT so far:
In Grasshopper chatGPT makes a lot of mistakes or omissions (grafting etc.), but it will speed up the proces.
Trying to have chatGPT write me a Python-script doesn’t work for me. chatGPT keeps going around in circles solving one problem creating another. Maybe if I had more experience with Python, I would be able to correct that and chatGPT would be more usefull.

That’s a fairly good analysis. Currently ChatGPT is no substitute for some knowledge of how Python scripting works in general and in Rhino/Grasshopper in particular.

2 Likes