Another request for improvements in Patch

Working with Rhino 4 on Windows.

I’m aware that this question has been raised before (including by me!), but here is a careful example.

This is an example of a situation where patch gives the best result, but I would like an improved patch.

The problem: There example shows two surfaces and 5 curves. I want a surface that contains all five curves, meets the smaller surface with the same tangent, and meets the bigger surface with as much continuity as possible.

I have used Patch with the following parameters: Sample spacing 0.1, U spans 20, V spans 30, stiffness 10, Adjust tangency = True. No Starting surface.

Automatic trim does not work in this case. The example contains a layer “cutter” which cuts the patch as required.

The example has the patch surface in the layer “patch surface”. The surface is good enough for my needs.

But I would like a Patch that somehow allows the selection of Match Tangent, or Match Curvature at each edge of the patch.

The surface-creation function that is closest to what Patch does is Surface From Curve Network. However, this produces a surface with a visible lump where it joins the bigger surface.

My guess is that Patch works by adjusting all the parameters of the patch surface, while Curve Network adjusts the parameters near the edge to achieve the tangency or curvature requirement at that edge. This gives a surface that does indeed meet the tangency or curvature requirement, but is lumpy near the edge.

Any comments?

Here’s the example:
Patch example.zip (2.8 KB)

Hi David - as far as I can see there is no Rhino file included in the zip.

-Pascal

Argh!!! It’s at the shop, and I’m at home now. I’ll check tomorrow.

In a message dated 1/19/2017 16:17:38 Eastern Standard Time,
mcneel@discoursemail.com writes:

     _pascal_ (https://discourse.mcneel.com/users/pascal)  McNeel  

January 19
Hi David - as far as I can see there is no Rhino file included in the
zip.
-Pascal

Here is a zip with the correct file. My apologies!

patch example.zip (1.1 MB)

Hi David - does the attached file come at all close to what you’d like?

patch example_PG.3dm (987.4 KB)

@davidgolber - oops, sorry, I see that I goofed in that file - hang on a bit.
Fixed…

-Pascal

Well, that’s definitely it. It is within 0.1 of all the curves. and the
Zebra with the upper surface is excellent.

So where did this come from? I see a starting surface. Is this some
version of Patch?

Dave

In a message dated 1/20/2017 1:45:58 P.M. Eastern Standard Time,
mcneel@discoursemail.com writes:

     _pascal_ (https://discourse.mcneel.com/users/pascal)  McNeel  

January 20
Hi David - does the attached file come at all close to what you’d like?
patch example_PG.3dm
(https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/0/e021e7c27ebc1276584e8c1be7906e589705d9fd.3dm)
(987.4 KB)
@davidgolber (https://discourse.mcneel.com/users/davidgolber) - oops,
sorry, I see that I goofed in that file - hang on a bit.
Fixed…
-Pascal

Hi David - it is a form of Patch yes - Basically the idea is to create a surface that has about the right complexity and location, orientation etc as the surface you need and use it as a ‘starting surface’ in Patch. The result will be that surface, but conforming to the inputs you give it. In this case, I also had to MatchSrf the edge at the larger surface after the fact - the initial surface was overlapping slightly there.

If you give Patch a starting surface, it bypasses its built-in way of creating one and uses yours. A handy aspect of this tool.

-Pascal

Hmmm. Sorry to be slow in replying. But I finally sat down and played
with it some.

As I said, the surface you produced is lovely. On the other hand, it
differs from my not-so-lovely surface by a few tenths of a mm. This is being
cut on a machine with a basic tolerance of 0.1mm, so it really doesn’t make
a lot off difference.

I gave a couple of tries at producing a starting surface that works. CV=
7x7 and others. No luck.

If I may be so bold: This is not a good sell for your product. Your
salesman says “Oh we’ve got this guy Pascal on our staff who can make this work
beautifully.” Customer asks “How much time and money will it cost for
my people to be able to make this work?”

Dave

In a message dated 1/23/2017 4:38:14 P.M. Eastern Standard Time,
mcneel@discoursemail.com writes:

     _pascal_ (https://discourse.mcneel.com/users/pascal)  McNeel  

January 23
Hi David - it is a form of Patch yes - Basically the idea is to create a
surface that has about the right complexity and location, orientation etc
as the surface you need and use it as a ‘starting surface’ in Patch. The
result will be that surface, but conforming to the inputs you give it. In this
case, I also had to MatchSrf the edge at the larger surface after the fact

  • the initial surface was overlapping slightly there.
    -Pascal

Here’s a solution - not using Patch:

(1) Put a vertical plane through the lowest of the cross-section curves.
(2) Extend the left edge of the upper surface to meet that plane.
(3) Delete the plane
(4) Extend the lowest cross-section curve to the end of (2).
(5) Extend the other cross-section curves to meet the curve (2) perpendicularly.
(6) Use Surface From Curve Network, with the curve network being the end of the upper surface, the edge of the lower surface, the curve (2), and the cross-section curves, but not the sinuous curve that runs to the left lower corner of the upper surface. Ask for tangency at the lower surface, and matching curvature at the upper surface.
(7) Use MatchSurface on the resulting surface (even without this, the Zebra is good.)
(8) Cut off the resulting surface using the polysurface in the layer “cutter”.

The resulting surface looks very good in Zebra. The edge of the resulting surface is within about 0.2mm of the sinuous curve.

patch example - my solution.3dm (1.7 MB)

Hi David - I think you can get a simpler surface as well, from Patch.

  1. DupEdge the edge of the smaller surface. Rebuild this curve to degree 5, 6 points.
  2. Make an EdgeSrf from your top curve, rebuilt curve, end curve and the larger surface’s edge.
  3. Optionally ChangeDegree to 5 in both directions and InsertKnot>Automatic once or twice in each direction .

The result should be a nice simple surface with hopefully just enough points ti stick to the inputs fairly closely when used as a Patch starting surface. (Pull=0, Preserve edges = not checked) I ended up MatchSrf-ing the result to the edges though.

-Pascal

Thanks. It will be a while before I can try this stuff.

Dave

In a message dated 1/31/2017 19:36:16 Eastern Standard Time,
mcneel@discoursemail.com writes:

     _pascal_ (https://discourse.mcneel.com/users/pascal)  McNeel  

February 1
Hi David - I think you can get a simpler surface as well, from Patch.
1. DupEdge the edge of the smaller surface. Rebuild this curve to
degree 5, 6 points.
2. Make an EdgeSrf from your top curve, rebuilt curve, end curve and
the larger surface’s edge.
3. Optionally ChangeDegree to 5 in both directions and
InsertKnot>Automatic once or twice in each direction .
The result should be a nice simple surface with hopefully just enough
points ti stick to the inputs fairly closely when used as a Patch starting
surface. (Pull=0)
-Pascal