Is it possible to convert multiple curves into surfaces?

Hello, everyone.

  1. Is it possible to convert several planar curves, in which all curve points lie in the xy plane, into surfaces or wide bands along their curve at the same time, whereby the exact width would be determined beforehand? Where left direction + right direction = total width would be, as I understand it.
    If not, will the function be integrated in the future? It would really be very useful, for example for imported maps from Openstreetmap-org, where all roads are only shown as curves.
  2. Suppose you have a lot of small curves, all planar to the xy plane, whose ends only almost touch each other. Would it still be possible to connect them to a longer curve, for example with a previously defined tolerance limit or something similar?

Thank you in advance for your help.

  1. possible as a two step operation. First step would be the offset in both directions and capping into a closed polyline or polycurve. In a second step, the closed curves would be converted into surfaces.

  2. This isn’t very complicated in Grasshopper but certainly also possible in Rhino. The question is whether pairs of two endpoints are merged into one point or whether the curves are connected with small segments?

That sounds good. Is Grasshopper integrated with Rhino? Can you maybe give me a quick guide? Thanks very much.

The Ribbon command will do this in one step, but it is limited to picking one curve at a time. You would need a small script or Grasshopper to do this with multiple curves.

You could temporarily enlarge the absolute file tolerance before calling Join on the curves; but don’t forget to set it back after. Again a script can solve this - the scripted Join command allows one to set a joining tolerance.

2 Likes

Grasshopper is included in Rhino 7, yes.

Please post a Rhino file with curves and include a result of what you want to achieve.

Here is a script that will ribbon multiple closed or open planar curves. I adapted it from a multi offset script I had. I have not tested extensively, let me know if it works for you. Curves are offset both sides the given distance in their native curve plane and then surfaced with a planar surface, in the case of lines it uses the active CPlane. Previous settings are remembered within the same session.

MultiCrvRibbon.py (3.6 KB)

And here is one that will try to join selected curves within a user-defined tolerance.

JoinCrvsWTol.py (816 Bytes)

And I created a YouTrack item for Ribbon to work with multiple curves.
https://mcneel.myjetbrains.com/youtrack/issue/RH-68467

1 Like

@ Helvetosaur: Thanks for your help! I must try this.
Do I open this with Grasshopper? I’m still a beginner when it comes to Rhino. But thank you for that.

Hi Lars -

No. Use RunPythonScript to run python scripts in Rhino.
-wim

1 Like

@Helvetosaur: Hey here is my feedback. The script for merging open curves works very well. But for the other script there is an error message.

Here is the message highlighted in red reads:

Message: Local variable ‘ro’ referenced before assignment.

Traceback:

line 17, in offsetCurve 2Sides, “C:\Users\slowh\OneDrive\Desktop\MultiCrvRibbon.py” line 30, in MultiCrvRibbon, “C:\Users\slowh OneDrive\Desktop\MultiCrvRibbon.py” line 96, in , “C:\Users\slowh\OneDrive\Desktop\MultiCrvRibbon.py”

Hmm, that’s odd, there’s no reference to ‘ro’ in the script file… ‘rc’ yes, in lines 16 and 17 and later, but not ‘ro’. How did you run the script?

I typed _runpythonscript and then selected the script file.
Edit: oh sorry, “rc” is correct

OK, got it - was a bit hasty in typing this morning, sorry. Try deleting the script file on your desktop and re-downloading from the link in the post above - it should be fixed now.

1 Like

@Helvetosaur Yes it works, thank you very much for this! :smile: