AddSrfControlPtGrid

Hi!
i want to create a plane (surface) from bunch of points, that I have.
I am using “rs.AddSrfControlPtGrid”
but this is the error that i have received:
rs.AddSrfControlPtGrid([1,2],DXF,[3,3])

The first item [1,2] is the number of points you have in the U and V directions respectively. 1 is not valid, you cannot have a surface that has only one row of control points in either direction.

I’m not sure, but if the degree is 3 in U,V you probably need at least 4 points in each direction. (degree+1)

Also make sure your DXF entry is a valid list of 3d points in the correct order. The total U * V number of points must exactly equal the number of points in your points list. Basically you are making a rectangular grid.

That you for the information.
my points (DXF) är points that i have imported from AutoCad. so I have no idea what can be the correct order or do not know how to count them.


this how the points are look like

OK, then AddSrfControlPtGrid() is not the command you should be using - that is really only designed for an organized rectangle-like grid of points with the same number of points in each row. That is not the case from your image above.

In your case, I would guess that only the Patch command is going to make a surface from those points. If you are doing this via scripting, you can use AddPatch. The options are similar to the native Rhino command.

What is your end goal to do with these points?

1 Like

Thank you so much for the help it solved my problem