How to make sure a closed planar curve


I created several curves by coding,but when I use _planarsrf to create surface,I can’t work.
I know they should be closed planar curves,and I checked they were closed curve,my question are :
1.How to know they were planar curve? if they were not ,how to make them planar.
2.I have tested to project them onto a plane almost ‘paralled’ to the curve,but the _planarsrf still could’t to work. why?

test.3dm (82.8 KB)

You can use _SelPlanarCrv, to select all planar curves. If your curve is not selected, then It must be non-planar.
If you want to select and isolate all non planar curves, you can run this macro:
_SelCrv _Isolate _SelPlanarCrv _Hide

In this case you can make planar surfaces(or curves) out of your curve by using _Cplane and _CurveBoolean. Like this:

If you’re comfortable with grasshopper you can also use this simple definition to make planar surfaces out of your curves: (23.9 KB)

P.S. There are 22 invalid curves in your file, you can select all of them by using SelBadObjects and fix or delete them.

1 Like


It works !
Thank you very much!