_Match made in heaven but two won't become one

_Match for curvature with the merge option is great for creating a single smooth curve from two. Unless one curve is straight: the match works but the merge resolutely fails. Best you can do is join.

At a) we have a curve and a line matched for curvature but incapable of merging.
At b) the degree of the line has been upped to 3 but still no cigar.
At c) the line has been distorted and now merge works. Shame about the shape.

Gravers3DMatchNMergeTest.3dm (29.9 KB)
Rhino 7.17.22081.3001, 2022-03-22

Hmm, yes it seems a little buggy here. First, I thought - what if I make the curvature match myself first - by aligning the second and third control points along the tangent of the line - then try it. Match with merge did not work. I used the following settings, choosing the blue curve first, then the red line:

I then used ChangeDegree to change your blue curves to degree 5 - because I always heard that one should avoid even degree curves (except for 2) - and presto ! the merge succeeded - but only on the pre-matched set of curves.

Before

After

(Try it on the file below)

Gravers3DMatchNMergeTest-msh.3dm (1.6 MB)

1 Like

Hi Jeremy - Thanks, I’ll take a look.

-Pascal

1 Like

Hi @Helvetosaur,

Thanks for investigating. Takeaway from that is you changed the degree of the curve, but kept the line the same, and that goes part way to a solution. I’ll have to try rebuilding all the curves to degree 5 then running match once to align and then again to merge.

Regards
Jeremy

What’s the difference between Merge and Join? Just curious. I’ve never used Merge.

Dennis

Hi Dennis - merged curves cannot be exploded. There is no ‘kink’ or potential kink (fully multiple knot) at what were the end points of the input curves.

-Pascal

Ah! That’s useful to know. Thanks Pascal.

For the first curve provided in the original post, the degree-4 curve is linear at its end but is about 0.35° G1-discontinuous with the line. If either curve is rotated to be over 1° G1-discontinuous, the _Match with Merge will work. It seems that when Continuity is set to Curvature, the original curves are already considered G2-continuous, but a merge does not occur.

Changing the model’s angle tolerance to 0.1° doesn’t affect the result; the 1° tolerance may be hard-coded.

A workaround is to first _Match with Continuity set to Tangency, then again with it set to Curvature.

Hi Steve- Yeah - this seems wrong to me, off hand - they still ought to be merged - looks like maybe the command just bails as soon as the curves are determined to be g2.

-Pascal