Since it’s Friday…
I don’t know about you, but for some of the stuff I do, I often need to create a planar surface but the available curve inputs have one edge missing… So I end up having to draw a line before I can make the surface. I finally decided to script this. It ended up being a bit more involved than I thought because I’m always adding stuff…
Finally I have two scripts, one simple and one more complex. The simple one will take any combination of coplanar surface edges and/or curves that when joined will form a continuous curve with one opening - and from that create a planar surface with the opening closed by a line. It will even work for single planar curves, and surprise, it also works for prepicked surface edges with sub-object selection (Ctrl+Shift+Pick).
The more complex one has one extra step that allows you to pick one or more additional points to pass the edges through.
This one may be a bit sensitive to pick order in certain cases - in general, try to pick in CCW order. Both scripts are programmed entirely with Python/RhinoCommon.
Anyway, presented here for your Friday enjoyment, with no guarantees, express or implied…
If you find any bugs, let me know, I will try to fix them.
Edit: I cleaned the two up a bit - I was doing some unnecessary checking in some cases - and I made the addition of extra points in the second script more reliable by sorting them… Hopefully these two are “final”, if you already downloaded them, please redownload… --M