 # Why does MatchSrf change the surface?

I think the key is not degree 2 but rational- matching with rational surfaces is not straightforward - I suspect that when you’ve encountered degree 2 surface matching problems these have been revolved surfaces or similar where the control point are unequal.

The result is rational in this case - a middle control point, per 90 degree arc gets thrown out of line with the quadrant points and a kink develops there. It looks like the position is the one that would be correct for a non-rational surface, which is I guess what you were saying, @davidcockey.

-Pascal

I somehow still do not understand the arising kinks, because the surfaces are equivalent and continuous (from the curves). I also do not understand the change in the bottom surface from the top (after MatchSrf), that the tool can change when there is already continuity, what is the point of editing? I think the tool should not change the surface in such conditions.

Hello- the kink that is develops by moving the points is in the vertical direction - there are points that move such that the horizontal rings of points are not lined up across the quadrants of the circle. The thing to keep in mind that Nurbs circles have fully multiple knots on the quadrants and kinks are formed if the points are out of line:

That is what is happening on your revolve so the object is split up at the quadrants.

-Pascal

Good. Actually, I really care about it …  Why does the final surface change when getting curvature? The surface already has continuity with the bottom surface (from the curves). What does MatchSrf want? Hello - please try this on a surface that is not a revolved surface, or, make the revolve with the ‘Deformable’ option. Is the result the same?

-Pascal

Simple extrude  I decided to check such a surface, the changes are almost not fixed  MatchSrf changes something  But Match (for the curve) doesn’t change anything  Matching a curve is different of matching a surface. When matching a surface you need to be aware of two principal curvatures. This explains the change when both (u and v) are not zero. You will get a deviation at the 3rd control point row. The other issue is related to the fact of having rational geometry, as already pointed out. That’s why we usually prevent rational geometry at all. We split circles into 4 Bezier curves (with 6, more accurate 7 cps each). Same for cylinder, spheres (8) and so on.

What are the curvatures?

Hello - see-

-Pascal

That is, positive and negative? Or u / v directions?

Somehow incomprehensible Imagine matching two curves. The one who is matched against has a domain (parameter bound) of 0 to 1. If you want to match the other at the start of your other curve, you will need match the curvature at t = 0. This happened with the third controlpoint (I’m shorten this here).
Now if you have a surface you have a second parameter which could be named as s. (Usually they say u and v and not t and s). Now you cannot simply match the controlpoint rows like they are a curve. You need calculate the curvature of s(or v) in. That’s what Gaussian curvature is about, which is the product of both principal curvatures.

Why is Guassian curvature needed or used? Why not just match curvature normal to the edge? If the edges are coincident the curvature along the edge matches between the two surface. If the curvature in two directions matches the curvature in all directions matches, with the possible exception at singularities.

True its not needed. I was just adding the last sentence to explain Pascals link to the gaußian curvature. Yes you need to measure both principal curvatures and match them. Since its multiplicated the Gaußian curvature can be the result of infinite combinations of k1 and k2. Of course you want to match k1 and k2 exactly. However if you express surface curvature as gaußian curvature you will notice that surface curvature is not equal to curve curvature because its is a product of the two pc. One dimension higher . That was the intention.

Pracmatic seen. If you have k1 (from iso curves, or cp curves) and the gaußian curvature(by rhinocommon), you could get k2 without measuring it. I think Rhinocommon does not directly provide k1 and k2.If you do all the math for yourself, you will get k1 and k2 anyway.

You don’t need to explicitly match principal curvatures. If curvature in two different directions are matched and the surfaces are both smooth then the principal curvatures will match. Edit: This only applies along a smooth curve which is coincident to both surfaces, such as a smooth shared edge. It does not apply at isolated points. It’s best if the directions matched are close to orthogonal but they don’t have to be the directions of the principal curvatures. Added: Since the curvature along the coincident curve/edge will match then only the curvature in one other direction needs to match. The preferred direction will be close normal to the curve/edge.

The interactive Rhino command Curvature returns principal curvature at a point on a surface as well as Gaussian and mean curvature.

ok, wasn‘t aware of that

I just coded a surface match functionality by using isocurves at the greville parameters. I wrote a match curve command which flawlessly matched G2. Now whenever the surface was double curved I couldn‘t achieve a G2 at the surface. I obviously had to modify the 3rd controlpoint row a bit. Excatly the same way as the thread owner noticed above. I haven’t worked on that further, but my assumption was that my principal curvatures did not match. Is this wrong? Did you coded a match surface component and do you know what I did wrong? Maybe I could tweak my match surface component then and use it. This is something which would be really helpful for me.