Patch creation issues

I have a map with 8600 points and I am having difficulty creating a patch that closely matches the points.
Increasing U and V spans results in more accurate model, but determining the right numbers for sample points and stiffness seems to be more complicated. I tried bunch of stuff and got it pretty close once, but unfortunately I forgot to write it down and now can’t seem to replicate it.
Is there a way to determine which parameters were used during the creation of a patch surface?
using List or what commands lists bunch of stuff, but I couldn’t figure out the numbers that were used as sample points and stiffness?
MeshPatch is the best for creating a surface that corresponds to points, but that causes issues in other paltforms (autocad and sketchup) where I need to work.
Enclosed is the file with points, in case someone wants to give it a try. thanks,
points-for-patch.dwg (288.7 KB)

Aside from the number of spans U and V, which you can get via Properties>Details, no, the stiffness, sample point spacing and other information are not contained in the surface itself once generated.

Dear @rond056 with a more archaeological / criminological approach … if you really need this data… using “_what” information, will show, if there is a History Record attached to the object.
if yes,
you can access this data via rhinocommon… a starting point ist this example ( but still a lot of work)
maybe you re lucking and your patch-command has history and someone already wrote a “show history-record-details-command”. kind regards -tom

1 Like

First of all I want to thank everyone here, as I try to learn the basics.
Indeed digging into history could be useful in finding out how I accidentally ended up creating a patch surface that ended up matching the point data.

but even more useful would be to learn more about STIFNESS/SAMPLE POINT parameters. Can someone please tell me the logic behind these parameters?
I watched many videos on youtube and also read more than few tutorials and I am still lost.

(I attached the source file in my first post. Please don’t get me wrong. I don’t want someone do this for me, but learn how to do it.thanks)

This stuff is always a matter of experimentation with the number of spans and the stiffness to get a desired result. Of course the Patch surface will never pass through all the points, so the trick is to get it close and with the degree of smoothness required. The less stiffness and the more spans, the more “conformable” the surface will be, but with the disadvantage of perhaps forming lots of hills and valleys where they might not be wanted. The more stiff and the fewer spans, the smoother will be the surface but it will miss the points by more. There will also likely be some areas that are better than others.

Some tricks - if the patch needs more guidance in some spots, add lines and/or points at the appropriate 3D locations to help it go where you want it to go. Also, afterward you may still need to locally edit the surface control points, for ‘flattening’ some areas _SetPt can be helpful. To select groups/areas of points Lasso or Brush selection can be handy.

In the attached, I stuck with a stiffness of 1 and ran 80 spans in X and 100 in Y. I first made a bounding box on the points (which I changed to a point cloud) and extracted its boundary as a trim curve, then I also extracted the bottom surface and enlarged it slightly to use as a starting surface.

I then ran Patch with starting surface Pull=0, Trim=No. Afterwards I used the trim curve obtained above to trim off the wavy edges. I didn’t do any point editing.

One other tactic to use is to dispense with Patch altogether, use MeshPatch instead; then use Drape to drape a NURBS surface over the mesh. You can control the conformability of the surface again with the number of spans.

points-for-patch.3dm (988.8 KB)

1 Like

Dear H,
thank you! messages crossing!
re: The less stiffness and the more spans:
smaller number for stiffness and larger number for spans? Am I correct?
Also: the file that you kindly sent me is Rhino 7. Would it possible to send an earlier version? Many thanks.

Yes, that is correct.
points-for-patch_V6.3dm (988.9 KB)

1 Like

Ok I will recreate it based on the DATA you provided in your post. MANY THANKS!!!
Thank you for the tips as well.
Great wonderful info.

Here is an example of that method. I also used AutoSpacing=No and set it to U=80 spans and V=100 spans. The trick is to drape just inside the mesh boundaries - if you go outside you will get the draped surface folding over at the edge - then use ExtendSrf to extend the surfaces edges to just outside the trim boundary and then trim off the excess. You can compare it to the result of Patch.

The only ‘flexibility’ control with Drape is the number of spans - there is no concept of ‘stiffness’. The more spans, the more points along the surface that are projected to what’s underneath, so the surface can conform to what’s underneath better.

points-for-patch2_V6.3dm (1.7 MB)

1 Like

“Sample point spacing” in Patch applies when curves are used as input. The curves are sampled to create a set of points which are then used by Patch. Sample point space controls the spacing of the sample points.

I use Patch when modeling boat hulls. Sometimes the input is a hundred points or so, sometimes the input is thousands of points.

I usually try to create a set of four bounding curves, Depending on the shape of the surface I am modeling the bounding curves may coincide the perimeter of the surface or may deviate outside of the perimeter in places… Then I create a surface from the perimeter curves (usually using EdgeSrf) and make that surface as simple as possible (using RemoveKnot or Rebuild) while keeping it sufficently close to any points on the edge of the surface. That surface is then used as the starting surface in Patch. I look at the resulting surface from Patch, use PointDeviation to compare it to the input points, and decide where more control points/spans are needed. Then I add control points/spans using InsertKnot (not InsertControlPoint) in th areas needed. Patch is then run again with the modified surface as the starting surface, and the result checked against the input points. Several iterations may be needed.

For the file you uploaded I would create curves along the “straight” edges and extend them to meet at a fourth corner. Then I would use those curves to create an initial surface and proceed as described above.


thank you Helvetosaur!
Drape sounded like an excellent choice: like wrapping an accurately shaped topography with a piece of thin cloth. Meshes cause nothing but trouble in autocad.
But I was struggling with Spacing value parameter and failing to achieve a denser grid- I didn’t realize that U and V could still be entered. thanks for sending me this version. also I tried another one with a denser grid than you’ve applied but yours seemed to work better. I think this has to do with you limiting the drape to meshed area. I am not sure how you did that. is there a way to pick anything other than a rectangular window for drape area?
Many thanks!

No, Drape is always rectangular. It’s like projecting a rectangular grid of points to a mesh or surface, then creating a surface from these points. The projected points need to fall on something, otherwise they ‘fall off the edge’ and end up at the default depth which is probably not what you want.

So, in order to do that with your point set, you need to add some points/lines to make the mesh patch go out the extents you want and cover the full rectangular area - even if you will trim it later. My trick then is to Drape just inside the mesh outer boundary, then use ExtendSrf to extend the surface edges a bit beyond the trim boundary and then trim the Drape to the correct size. It’s a bit of a cheat, but it makes for a clean edge.

1 Like

You can try my terrainmesh plugin at a high setting and then reducemesh the result to see if that works better.
Accurate nurbs from pointclouds is so far a distant dream.
Maybe quadremesh + subd + tonurbs can be a way too. Requres v7 though.

1 Like

Thanks for this. I am on Win 7- probably will need to give it up soon as most programs require the latest OS at this point.

Thanks Helvetosaur. You are right! I was picking a larger rectangle without points!