Help: Rhino.Geometry.Mesh.CreatePatch() questions

Hi guys, I need some help with Rhino.Geometry.Mesh.CreatePatch()

1- It seems that innerBothSideCurves needs to be closed curves, but I don’t want that, so how to I work around that in the same what that the Rhino command MeshPatch does?

Points works fine and I understand that OuterPolyLine (Boundry) and the InnerBoundryCurves (holes) needs to be closed.

  1. Why can InnerBoundryCurves be higher than degree 1 curves, but the OuterPolyline has to be a polyline (degree 1)? It would be nice if the OuterPolyline could be a higher degree curve too.


@dale I guess you are the one to ask about this.

To make breaklines of open curves, should I duplicate them and join them together to force them to be closed? Or is there another workaround?

@tim, is this something you can help with?

Thanks Dale.
Tim I see that if I duplicate the open polyline and join those and coerce that then I can use it as a closed curve, but not if it is a single line as that causes Rhino to think it is a null. I get this error:
“One or more of the curves is null or not closed.”

I have made a tool that makes a slab out of a boundry curve, points and inner curves:

And I would like to keep the code as clean as possible to make it easy to maintain :slight_smile:

If this is not possible I guess I have to just add an extra point to the middle of single lines.

This is a bug in the RhinoCommon wrapper. It should not require inner bothside curves to be closed.

I’ve committed a fix. You can track the progress here.


Wicked! Thanks Tim!!
Could you consider axepting a curve for OuterBoundry as well? Now it only accepts a polyline.


I guess that wouldn’t really make sense, because how meshing two or more curves usually works, is that mesh faces, tris or quads, are constructed between individual, straight curve segments, which means lines.
A nurbs curve technically has no line segemts or any segments at all for that matter. However, the segments of a polyline are lines, or more correctly two points that can be connected by a line. Meshing thus works great with polylines.
Nurbs curves on the other hand first need to be divided to form polylines. This makes you lose the shape/definition of your base curve or produces huge meshes, when you go really high on the divisions. Even with many divisions, the polyline will always just be an approximation of the initial nurbs curve. Furthermore, meshes with huge polygon counts usually aren’t desired, since they are very hard to manipulate.

One other thing to consider is that you usually want to keep your meshes super tidy and clean. This entails to only use quads or tris, if possible, and keep a nice edge/face flow.

I look forward to the update since when I use the duplicate-curve-hack then that generates an edge that will extrude. So thanks for fixing that.

And another thing, could you consider adding a general direction analysis to your meshPatch output? It seems that the result is downward facing most of the time. Which doesn’t make sence sine meshPatch is mainly a 2.5D operation (Allways oriented to the XY plane):slight_smile:

MeshPatch accepts CURVES for internal use, just not boundry. It has an angleTolerance setting :slight_smile:


Can you upload the curves of the latest example?

Here is your previous example cleanly meshed with quads. The pink lines are the base polylines.

Hey, thanks for your interest and help mr Pirate :slight_smile:
But I know what I am after here, I even wrote my own SubD tool two years ago since I wasn’t happy with how normal SubD altered the base geometry, so my interest is purely to use the curves as they come and build a mesh according to those :slight_smile:

(I set them up based on slope analysis and height constraints, so therefore I need the mesh to do as I say, and I need nurbs curves for efficient blends and since altering polylines can sometimes be a drag (pun intended). )

1 Like

Here is a typical example of what I need to work with:

Those heights are important and therefore the boundry must be driven by curve segments so i can quickly adjust the boundry, and then I just sample those curves and convert them to polylines by a given factor. Tris or Quads are not important as I just need a quick mesh surface with a thickness for heigh analysis and overall visual evaluation.