Precise non planar surface/mesh from closed curve


I work as architect and urban planner in a firm where we are moving on from classic 2d cad tools to 3d and bim software. Our projects require us to make accurate 3d models of complex sites (infrastructure, terrain, slopes etc.) wich implies complex non planar surfaces.

I’m very well experienced with rhino but always struggling with surface making from closed non planar curves (and found no satisfying solution on the forums).
I wonder if there is a script or a plug-in that can make accurate surfaces and/or meshes from non planar closed curves.

Patch does it well, but it seems that the surface does not always match the edge of the closed curve.

  • If you know of any solution for complex landscape and site modeling (roads, infrastructures, terrain and slopes) on rhino/revit i would be happy to test it.

Thank you !

Hi -

That covers an endless amount of different scenarios that need different solutions. Please just post a specific case. Also note that “accurate surface” and “terrain” basically are opposites. Any “surface” that is meant to represent a terrain will always be an approximation.


The workflow to create a surface from curves depends on the arrangement of the curves.There is no sngle, universal method. Can you provide an example? Also note that there are multiple surfaces which match a set of curves.

if you have 4 non planar curves hitting each other at the corners, you should just use edge surface, that takes the boundary as precise into account as needed, definitely better than patch. if you have many curves describing one surface then patch is your only friend, unless these are shapes which could work with loft, sweep etc.

Thanks for your answer.

Yes i should have been more specific.
Here is an example :

It’s a closed curve that actually represents a portion of a sidewalk.
I have tagged the height of some points for you to see that the curve is not planar.

1 - Surface method :

When using patch, the surface does quite match the closed curve (even with proper stiffness and UV parameters). I suppose that the patch command flows a surface that matches a collection of points. But i need the surface to perfectly match the contour line.

2 Mesh method

When trying to create a mesh, by extract more points from the outline curve, the mesh goes outside of the outline.

I am looking for a way to make a mesh or a surface that matches the outline curve input. (an equivalent of the “meshfromclosedpolyline” but with a closed curve input instead of a closed polyline).
What i have done is converting the curve into a polyline with A LOT of control points, but i find this methode a bit skecthy and time consuming.

I have also tried multiple grasshoper definitions.

Thank you,

Hello- please post a Rhino file with that curve, plus any more points or information about what the surface should be like.



Here’s a file. 3DM for mcneel.3dm (127.1 KB)

I would just like to simply select a closed non planar curve, and generate a curve or a mesh that perfectly match the boundary of the input curve.

The curve i input is the edge if the surface or mesh.

Thank you,

Hello - I am not sure I follow - what am I looking for? The edge of the patch surface and the curve deviate microscopically:

Maximum deviation = 2.83364e-09

Are you concerned about the display mesh?

If so, you can change the mesh as needed in Properties or globally in DocumentProperties > Mesh page.


thats why terrains are represented by meshes because they are not “mathematical”. creating surface from closed non planar curve is an ambiguous problem. The best way could just be to add some points within the closed curve and run meshpatch

i have done the same thing many times. the best command for this is definitely sweep2. thats just our imagination that we can fit imaginary surfaces inside the edges but algorithmically it is impossible to simply determine how surfaces should be created and combined.


Here’s an example that is clearer, i think.
The patch surface does not match the closed curve.
Even if the curve is note that complicated

3D FOR MCNEEL 2.3dm (110.8 KB)

Yes i am aware of that, and the sweep2 trick is something i used on several projects.

It’s just that since the firme where i work is trying to convert it’s 2d practice into the 3d universe i’m trying to create simpler and more intuitive ways of making accurate surfaces and meshes for the people who are gonna work on rhino.

If there’s any way of generating a surface or a mesh out a closed curve thhat would be really cool and time-saving.

Hello - the curve is very far from the world origin -

Point in world coordinates = 1642848.629,8182551.612,36.000

bring it close to w0,0,0, then make the patch then move it back…

3D FOR MCNEEL 2.3dm (105.1 KB)


1 Like

if you scale your edges 10x in Z you will see that it would need to be crazy complex surface to be smooth and yet connecting to all edges. i am aware of a grasshopper component which creates minimal surface according to minimum energy method but it expects closed periodical curve, not a polycurve. i believe there could be some mathematical/geometrical method which could create such surface/polysurface out of any arbitrary closed polycurve. but this is realm for smart guys like @DanielPiker

By design does patch command guarantee resulting surface will have its boundary edge coincidental with input curve?

I usually deal with the same type of task at work, and this GH definition works every time. You don´t have to prep the curves in Autocad, the definition will create the points, a mesh, and then get rid of the outside faces. The accuracy of the result will depend on the amount of points you create as you know.

Obviously, you should follow @pascal and @ivan.galik instructions, but if you are comfortable using grasshopper and you are happy having a mesh as a result, this should work for you.


1 Like

I personnaly use a similar grasshoper definition.

But i’m trying to write down some processes for my co-workers who are not that familiar with rhino and Gh. That is why i was wondering if there was an inbuilt command that allows you to create a surface or mesh out of a closed curve input. Just like meshpatch or patch.

1 Like



I am the same guy like you but in my company.
It is impossible (i find it) to “refit” 2d guys to 3d just like that. I dont even try that.
3d space carries different concepts and astractions and rules compared to 2d. They would need tons of training to adapt their brains for 3d work.

You have been answering quickly, thanks a lot for your help,

But i guess rhino can’t really do what we need.
The thing is, as you can guess, the curve is far from the origin because of it’s georeference. It needs to stay there and can’t keep moving objects from their georeferenced coordinates to the world origin and back forward. We just need a way of making a mesh or a surface from a closed curve.

I guess we need to make a script that converts a curve into a polyline and then makes a mesh out of it ?