Wish: More options for "Match surface"

It was exactly the same except that I moved them to the normal direction only. I don’t keep that model, but it’s easy to make a new one with the “MoveUVN” tool. My goal was to keep the control points at those exact locations across the UV coordinate and only modify the N position. But looks like it’s not possible to do so.

It bugs me that the automatic “Match surface” will create a very unnatural looking control polygon flow along those rows of control points. This thing alone breaks the tangency:

1 Like

I think what you’re not taking into consideration is that curvature and tangency don’t simply follow the UV directions. If the surface is not uniform in it’s control point structure then the curvatures/tangency can run in varying ‘degrees’ diagonally across the surface. When this happens, as in your case, you’re forced to keep on increasing the degree of the matching surface until the maths has enough control points to fully describe how the curvature/tangency crosses the surfaces boundaries diagonally.

Same thing happens in ICEM Surf. If you keep the degree of the matching surface the same and keep on applying the match tool then it’ll distort the control points heavily to get a better match. Increase the degree to 7 or 8 and you’ll get a very clean match.

This is just normal and part of what @davidcockey is describing about the maths involved.

That’s not to say MatchSurf command doesn’t need improvement though…

The problem is that “Match surface” is supposed to achieve a proper tangency, while in reality the 2nd control point of the matched surface in this particular example is not even tangent to the corresponding 2nd control point of the target surface. The angle between those opposite control points between the two adjacent surfaces is 6,1646619 degrees. :slight_smile:

I disagree.

The real problem is that you’re asking the impossible.

The surface you are matching in to is horribly twisted at one end. This causes the tangency to flow across the surface in directions other than straight forward U/V directions. To capture this you’ll have to increase the mathematical ‘resolution’ of the matching surface by increasing the number of control points.

This really isn’t a match surf problem…! :wink:

Try an experiment - increase the order of the matching surface to 8, re-match into that horrible twisting surface and then display your control points and observe what’s happening with the curvature/tangency with the higher ‘resolution’.


Not really. David already demonstrated that a precise match is possible.

Its not hard to manually match Bobi’s surfaces for tangency.

Draw four lines using the bothsides option from the edge cv to the next cv on the surface that you want to match to and then move each control point in the second row of the other surface to the ends of those lines. The surfaces are now precisely matched for tangency. Turn on control points to see how in this file:
MatchSrf.3dm (171.5 KB)

To get the examples David posted all you have to do is scale3d each control point in the second row by the same scale factor using the edge control point as the base point for the scale operation. For Match1 the scale factor is 1.045 and for Match2 the scale factor is 1.93348.

Bobi is right. MatchSrf should be able to do this. It should be able to recognize that the two surfaces start with matching structure and therefore it should have the option to take advantage of that fact.

3 Likes

Or turn on “Refine match” in the current MatchSrf, specify your desired tolerances and MatchSrf will add control points as needed to achieve the tolerance. That is already built into MatchSrf though it refines the match while keeping the degree the same by adding knots and control points.

Give it explicit control over degree/spans and we may be up to something.

3 Likes

This post is a clear evidence that a more clever “Match surface” tool should be able to automatically do the math and achieve a proper G1 tangency with 0 degree deviation, given the fact that a human could do it without boosting the amount of control points. “Match surface” must be smart enough to “see” what’s the distance between the 1st and 2nd control points of the target surface and then apply similar distance to the corresponding control points on the surface to be matched. That basically fixes the majority of the problem.

What distance between the 1st and 2nd rows of control points should be used when the distance varies with each pair of control points, such as in the example above? My preference is for a G1 “exact match” option with a slider for the user to select the ratio of the distances between the surfaces.

Matching becomes much more complicated and restrictive when matching multiple edges and surfaces is involved, but that may be a topic for a new thread.

Hi David - yeah, the distance must be a consistent ratio - like 1:1 or 1:2 etc for all pairs of points.
For what it is worth, I monkeyed with this a bit a while ago - this thing works only for exactly matching surface structures but it helps sometimes at least:
PerfectTan.rhp (27 KB)

Bug report added here
RH-68644 MatchSrf: Match better

-Pascal

Pascal, constant scale factor between pairs of points on one surface and the corresponding pairs of points on the other side is what Jim and i are saying. See the examples in the file I posted. The scale factor can be any non-negative number, not just integers.

Knot insertion and degree elevation can be used to obtain exactly matching structures where feasible. There can be situations with mutispan surfaces where exactly matching structures may not be feasible without introducing multi-knots.

One sometimes disturbing issue with “Match surface” is that it will try to transfer the 1st and 2nd row of control points to the target edge while keeping the distances between them relatively unchanged. This is usually great for the majority of users, because it’s predictable and even usable in specific cases. However, there must be an option to “unclock” the aforementioned correlation between the 1st and 2nd row of control points and instead let “Match surface” adopt the same distances as the target control points. With that option turned on, the surface to be matched will become perfectly matched to the target one.

To demonstrate the HUGE advantage of a potential “Adopt” option that I just described, here is a simple way to achieve the necessary correlation between the 1st and 2nd row of control points by “mirroring” the distances from the target surface to the opposite one. Lets hope that “McNeel” will consider adding such an option in the future releases of Rhino.

By the way, this particular technique have been already used by you :smiley: and @jim in your posts above. I also use this technique when necessary, because “mirroring” the distances between the end points is what actually solves many problems with matching two surfaces whose general shape is not close to rectangular. Just like in my example with heavily curved surface edge which I did on purpose to demonstrate the weakness of the “Match surface” tool. Alias does matching much better, so it’s totally possible to make that improvement for Rhino, too. If I remember correctly, even VSR for Rhino 5 had an option to adopt the target surface’s control point structure.

Don’t get me wrong, I love the nature of “Match surface” to basically transfer the entire bunch of 1st, 2nd and 3rd row of control points when G2 curvature continuity is used, because it’s very predictable and usable most of the time. However, there should be an alternative “Adopt” option that will make it possible to set variable distances between the 1st and 2nd row of control points in such way that they will closely repeat (mirror) the same distances and opposite position like the 1st and 2nd row of control points of the target surface.

Ah, ok. Apologies, didn’t read his post properly or download the files.

In ICEM it looks like you can get tangency ok with the ‘control point linear’ setting, which is basically what you guys have done here manually (unfortunately I jumped straight to curvature… :roll_eyes:) but to take it further for curvature you’ve just got to up the order. Or as David points out ‘refine match’ will probably be best for most users.

I still think that surface we’re matching in to is pretty horrific and would be surprised to see it on a front bumper for instance.

There are many situations (not only related to car bumpers) where the geometry is non-linear, and include trimmed and untrimmed surfaces whose shape is similar to the one from my example. In 99% of the cases the distances between 1st row and 2nd row control points wary across the target edge.

By the way, you can still apply G2 curvature matching to the 3rd row of control points after the initial manual matching of the 2nd row of control points to achieve G1 tangency. Once the manual tangency is done, the automatic G2 curvature with the “Match surface” tool is good. It’s pity that at the moment Rhino lacks an “Adopt” option (or “Linear”, which you mentioned is used in ICEM) for the “Match surface” to do that job in a fully automated way.

Absolutely agreed there. Hopefully the VSR thread is pointing to a brighter future for the match tool! :crossed_fingers:

1 Like

The problem with that is that more often than not the target surface being matched to does not have the structure where that can be done. Often the target edge is a trimmed edge.

Rhino’s MatchSrf is a one-size-fits-all solution. It needs to be made smarter where it can recognize the situations where what you expect can be done. This is analogous to the simple option in sweeps. It should recognize when a simple match is possible and make that option available.

1 Like

This is why it is an option in other surfacing programs, and not the default setting. :slight_smile: Think of the “Adopt” option as a toggle similar to “Refine match”, which is also an option of “Match surface” that’s not on by default. :wink: The “Adopt” will hugely help in cases consisting untrimmed edges, so basically 80% of the time.

Hi Bobi - I’m sure you’ve figured out ways to get around this - just in case it helps, here are a couple of ways you can -maybe- mitigate this in the current tools - one is to match in stages - position, tangency then curvature., or just the latter two.

Another is to match with History and then noodle the points (DragMode > ControlPolygon can help, or MoveUVN smoothiong).after the fact,

-Pascal

Hi Pascal, I use the “MoveUVN” tool all the time, so doing those match surface modifications is something trivial to me.
However, there is no option in the “Match surface” tool to apply the same distances between the 1st and 2nd row of control points of the surface to be matched relative to the control points of the target surface. Only then the G2 continuity will be much more accurate and will not require a dense control point structure (as shown here):

The best way to achieve the above is to add an option called “Adopt scale” to mirror the distance between the 1st and 2nd row of control points of the target surface. Most likely that would be possible only when the surface to be matched has the same amount lf control points as the target surface, while in the rest cases it will be greyed out.

Unfortunately, the biggest issue with “Match surface” is related to the G2 curvature continuity which Rhino does trying to straighten the 3rs row of control points by moving them in approximately the same direction as the 2nd row. Applying G2 heavily distorts the 3rd row of control points sideways, thus it modifies the side edges of the matched surface in an unwanted way and destroys the intended gradual flow of the control points. We have discussed that particular issue multiple times in various topics, and other users also find it important to be able to (optionally) match the 3rd row of control points along the normal direction only at the cost of losing some true G2 precision.

https://mcneel.myjetbrains.com/youtrack/issue/RH-58712

Currently, anyone who wants to match a surface and preserve the flow of its control points, is forced to match with G1 and then use the “MoveUVN” tool to manually adjust the 3rd row of control points to achieve something like G1,95 (almost G2, but no perfect), which takes a lot of time and effort. A simple tikbox in the “Match surface” panel called “Preserve flow” would do wonders! :slight_smile: Once it’s activated, another option should be available, called “Blending” and used to control the influence of modifying the 3rd row of control poins across the two extremes:
a) true straight G2 (like the current implementation);
b) and unchanged UV position of those control points other than the N direction.
A 50% blending would place the control points of the 3rd row somewhere in the middle between those extremes.

3 Likes