# Wish: "Match surface" to preserve the flow of control points

I wondered if the “Match surface” command could be upgraded to apply G1 or G2 to the general shape of a surface, while preserving the flow of its control points. The current implementation with curvature match (G2) forces the 3rd row of control points to follow the direction of the 2nd row. However, in many situations this will destroy the ideal shape of a surface. For example, Alias could apply curvature match that only adjusts the control points of the matched surface only in the normal direction, while preserving the flow of its control points.

The image below shows 3 different ways to match a surface with curvature continuity:

The 1st example is the original surface with straight distribution of the control points. By using a “Keep edge” option the “Match surface” command would apply curvature match while preserving the structure (flow) of the entire surface except for the adjustment of the 2nd and 3rd rows in the normal direction.

The 2nd example uses a “Keep tangency” option that would affect the 2nd row of control points while keeping the 3rd row nearly identical to what it appeared in the original surface (again, with G2 affecting those rows only in the normal direction).

The 3rd example shows what Rhino usually does by changing the orientation of the 3rd row of control points, so that it moves inline with the 2nd row.

Rhino has a “Preserve isocurve direction” option that always forces the 3rd row of control points to move according to the 2nd row. While this is handy in certain situations, it can’t preserve the general flow of a surface.

3 Likes

Hello - I am not clear on what the starting surface point arrangement looks like.
@Rhino_Bulgaria - does the attached file show something like what you’d like?
Control point layout.3dm (1.8 MB)

-Pascal

Imagine if the starting surface looks like #2. If you apply Match surface with G2 continuity, Rhino will move the 3rd row of control points sideways. Alias has an option to achieve G2 (most of the time) without distorting the control points sideways, by repositioning the control points only normal to the surface.

Yes. G2 continuity for a Degree 3 curve requires that three rows of control points are lined up as shown in your #3.
G1 requires 2 rows.

While G2 continuity requires three rows of control points the arrangement shown in #3 is sufficient but not always necessary. A simple example: ContinuityExDC01.3dm (73.5 KB)

1 Like

What MatchSrf with Preserve isocurve direction does to example aboveContinuityExDC11.3dm (83.0 KB)

The result of MatchSrf without Preserve isocurve direction was ugly.:

1 Like

Just use positional Blend/Loft then Surface match both ends with Preserve isocurve direction. I do it all the time.

I think the problem is the third row may move ‘un-necessarily’. Preserve isocurve direction only constrains the second row - if the target surface is linear that third row wants to move into line and it may not need to.
This has Preserve set…

-Pascal

1 Like

Not a solution when you are matching two surfaces without an intermeditae surface between them.

1 Like

See my example above. The fundamental problem is the MatchSrf algorithm changes the surface more than it needs to. This may be acceptable in many situations but is causes problems in others.

1 Like

The problem is that using “Match surface” with G2 continuity will heavily alter the position of the 3rd row of control points so that they move sideways relative to the target edge; ultimately changing the overall shape of the surface. In many situations, there are 4 adjacent surfaces around the surface to be matched, and it’s important to preserve the outside shape and the general flow (topology) of the surface control points. Ideally, G2 should include an option to fit the 2nd and 3rd rows of control points only normal to the surface to try to achieve G2 continuity while maintaining the overall shape as much as possible.

“Preserve isocurve direction” can’t do the job, because it tries to move sideways the 3rd row of control points in the same direction as the 2nd row.

Notice how the control points are only adjusted normal to the surface, while their overall flow is preserved.

1 Like

@Rhino_Bulgaria - Is this a special case, in your mind, for matching to a plane? If not, do you have an example of a more complex situation where the flow is preserved? The plane case is easy…

-Pascal

The example above used a plane just for simplicity, but product design (not limited to just cars) in general includes many surfaces that are double-curved and whose edges are also curved.

Attached here is a portion of a front bumper that feature a curved crease line, on top of which a small surface was added that needed to follow the same curved shape. Since “Match surface” with G2 was unable to preserve the overall flow of the control points by default, I was forced to use G1 and then spent a lot of time with the “Move UVN” tool to manually adjust the 3rd row of control points in the normal direction (i.e. using only the “N” slider) to achieve nearly curvature continuity while keeping the UV position of each point intact. That gave me a very nice, natural looking surface that’s otherwise impossible to achieve with the default “Match surface” tool while using G2.

I understand the problem I think, I am trying to understand what cases matter to you in this request - I posted a file above yesterday with double curvature in the surfaces and since you only responded with planar ones, which is a trivial case, I just want to make sure I know what you are after.

-Pascal

The problem is that in many cases a surface follows curved shape, so using “Match surface” with G2 will always deform the two surface edges at either side of the matched edge. With other words, trying to achieve G2 continuity will move the control points along the UV direction of the surface. If there was an option to only adjust the control points in the normal direction, that would solve the problem. I’m aware that this approach may not always achieve a true G2 continuity, but in many more cases it will do it just fine.

This feature would be useful to me also.

1 Like

Yes.

Can you look at the file I posted above - here, look, I’ll post it again - and tell me if this is a reasonable example of what you are asking about? If we are going to fix anything, the developer will need at least one example, and the planar case, it seems to me, is simply not very useful for that.

Control point layout.3dm (99.9 KB)

RH-58712 MatchSrf : maintain the control point flow

-Pascal

2 Likes

+1 from me.

1 Like

Another example here, with a car panel that follows the curved wheel arch. Again, I had to use “Match surface” with G1 there, then use the “Move UVN” tool to manually adjust the 3rd row of control points in the normal direction to be able to achieve something that resembled G2. The default “Match surface” with G2 would heavily affect the shape in a way that’s against the design intent.

Yes, it’s exactly what it’s supposed to do - adjusting the control points only in the normal direction while trying to maintain their relative UV position.

I just opened your file and played a bit with the “Move UVN” tool and the Zebra analysis to make the continuity almost G2.
Match surface G2 - Preserve flow 2.3dm (2.5 MB)