Match surface G2 with On surface option

When matching a surface G2 with the On surface option, the edge of the surface is not projected onto the target surface in the z-axis direction (maybe normal?). There is no x, y, z, normal selector like in other software, when using the On surface option. What would be the “Rhino way” if I want to use the z-axis here?

2 Likes

The MatchSrf with On surface option definitely should be enhanced with a selectable projection direction (x, y, z, normal, vector).

Bad approach

Also bad approach

Lagom, it’s apparent that you have a high level of training in making simple surfaces . It must be taught from day one how to make surfaces . Maybe Rhino isn’t geared to that level of surface manipulation.

I do think you are helping people see a side of Rhino that is lacking. You have a teachers mind. I would continue to educate and learn. The best thing is you have examples you can get your point across with. Keep going!

I need to find workarounds for people to be transitioned from Alias, Catia, etc. I hope someone chips in with the “Rhino way” to do the above while keeping it simple.

Yes, but no cigar

Almost, but not quite

Match with On Surface (with user defined direction) like in other software would be the most preferred option.

this is a “pull” option and in rhino “pulling” means surface normal vector / or in other words - the shortest way to the surface.

if you want different directions:
project the edge (to be matched) to the target surface (in the direction you want)
matchsrf with onsurface option and choose the projected curve on the target surface.
with some limitations this works with history.

does this help ?

and answer to a few of those “please update matchSrf” topic.

answer - not like
add a :red_question_mark: or something this will gather more attention

kind regards - tom

  • Loft between the degree 1/7 tangency enforcement strip to the degree 7 curve to be projected, which results in a flat single span degree 3/7 surface
  • ChangeDegree of that surface, changing its U degree from 3 to 4 to obtain two free CV rows for G2 alignment, 1 free CV row for G1 alignment
  • Project Direction C Plane Z the degree 7 curve onto the target surface, which creates a COS (curve-on-surface) of degree 3 with 4 spans
  • Match the surface G2 with the On surface option, selecting the COS and then the target surface

Unfortunately, it’s not working as expected (apart from the secondary problem that the two end sections are taken into account).


can you post the file please ?

Oops, there it is.
Match On surface issues.3dm (60.4 KB)

Turn off “Match edges by closest points” and the match will be to the entire curve.
Match On surface issues DC01.3dm (2.0 MB)

1 Like

Ok, got it; so then, this is the “Rhino way” to obtain an acceptable result, fairly close to an Alias or ICEM solution.

Interestingly, instead of matching with the On surface option, trimming and using that trimmed edge delivers a nearly identical result.

In any case, a selectable x, y, z, normal, vector option should be incorporated in the MatchSrf tool.


Well it should do that. Although McNeel rarely reveals what these sort of functions are actually supposed to be doing, I believe the idea behind the OnSurface=On option is so that the user does not have to trim the surface then match and then untrim. This option can be useful if done in conjunction with History where the inputs can be modified with history.

Here is what I got. Match On surfacex.3dm (83.7 KB)

I used Sweep1 to get a two span surface that matched the lower rail. If your two rail curves had the same knot parameters you could use sweep2 or edgesrf to make a simple surface. Because the knot spacing doesn’t match is why edgesrf makes a more complex surface.

One thing that I have observed about match surface is that it matches to the underlying surface and not the curve. What I mean by that is that most often when you match to an edge or a curve OnSurface you will get a more accurate result if you trim the surface with the edge that was just modified by matchsrf. That means untrimming and then retrimming if the match was to an edge.

For example, in the file posted above if I trim the large surface with the green curve (either before or after using MatchSrf) I get two surface that are about .008 apart (the edges are out-of-tolerance). OTOH, if I trim the large surface with the modified edge after matching, the two surfaces end up well within tolerance.

In other words, if you use OnSurface and match to the green curve and trim with the green curve you get out-of-tolerance edges, but if you trim with the newly created edge (on the pink surface) you get edges within tolerance.

The same thing if you first trim with the green curve then match to that trimmed edge. You will get out-of-tolerance edges (unless you use McNeel’s refine option and make the surface more complex). But if you don’t use refine and you untrim the large surface after matching and retrim with the modified edge on the pink surface the edges will be within tolerance.

1 Like

Thanks, I tried to follow what you did, but after 4 steps, it already looks very different. Can you point out the sequence of steps you took?


Match On surfacex.3dm (2.3 MB)

FWIW, in Rhino 9, you will be able to Rebuild the target curve to single span degree 7 with very little deviation (Maximum deviation = 0.00116161), then sweep 2 and match. End result will be similar to what Jim has posted, but maybe a little easier to digest.

Attached is the result before matching

Elmo-rebuild-Sweep2.3dm (100.6 KB)

3 steps:

  1. I used both profiles for sweep1.

After sweep1 you lost me what you are doing. I used the curves you supplied in your file. I just changed the color to green for clarity. So I don’t know what curves or why you are rebuilding.

  1. After the sweep1 either match for G2 (preserve isocurve, closestpoint and no refine options) to the green curve or trim with the extended green curve and match to resulting edge.

  2. The final step is trim the original surface (untrimmed) using the extended edge curve.

I use macros for extending curves on the surface to be trimmed for trimming.

The ExtendCuttingLines=Yes option in trim has never worked for me.

me too, I use ExtendCrvOnSrf pause pause Trim for that often

All right, I have to wait with deploying V9 until its’s an official stable release.

that being said, it is not too bad with normal rebuild either:

Sweep1 only allows me to select one sweep shape, so I cannot use both profiles like you did.

Your green curve, obtained by projecting the bottom curve onto the large surface, is degree 3 with 7 points. When I project it, the curve-on-surface is degree 3 with 16 points. Thus I assumed that you rebuilt it.

Maybe V8/macOS is different than the version/OS you are using?

Uh, what does “it” refer to? You rebuilt the two-span solution with a good CV structure that I arrived at?