How to create a plane surface that is more that 5 points?

from Rhino.Geometry import NurbsSurface, Point3d
from scriptcontext import doc

surface = NurbsSurface.CreateFromCorners(
Point3d(5, 0, 0),
Point3d(5, 5, 5),
Point3d(0, 5, 0),
Point3d(0, 0, 0));


This seems to work only up to 5 points only. How can I do more than that? Or create a plane from lines works too, but what I found only script that makes user to pick curves to generate the plane. How to automate the selection without interruption?


Well, if you want the surface border to have more than 4 corner points, you will need to create the planar curve(s) which represent the edges first. Then you will need to use Brep.CreatePlanarBreps() and feed it one or more planar curves. If you are starting with points and want linear edges, you can create a PolylineCurve from your point list and use that for the curve argument in CreatePlanarBreps().

import Rhino
import Rhino.Geometry.Point3d as P3
import scriptcontext as sc


objIDs=[sc.doc.Objects.AddBrep(brep) for brep in breps]


Thanks, Mitch.

This is very useful. On a side note, is there a way to store the curves into an array like container. say I need to do this procedure 5 times. Instead of naming everything this way, pl_crv0, pl_crv1, pl_crv2, pl_crv3, pl_crv4, I would like to use sth like pl_crv(0), pl_crv(1), pl_crv(2), pl_crv(3),pl_crv(4). Is this possible?

Also, how do I reference the plane that is generated? is that variable breps storing the plane object ?

Thank you.