ChangeDegree

unhandled

#1

Hi McNeel. :grin:

Command: _ChangeDegre
https://docs.mcneel.com/rhino/6/help/en-us/index.htm#commands/changedegree.htm

Deformable = Yes

If the degree of the curve/surface is different from the requested degree, the new curve/surface will have simple interior knots.

simple interior knots” ??? :cold_sweat:
It is difficult to understand what it means.

Could you attach a sample 3dm file to compare before and after of ChangeDegree? :sweat_smile:


(John Brock) #2

Maybe these details will help define these NURBS terms:
https://www.rhino3d.com/nurbs


(Pascal Golay) #3

Hi Knead - some surfaces, like Sweep2 in many cases, will make a surface that has doubled up knots - two at one location. If you change degree to a lower degree on one of these (Deformable=Yes) , then the result will not have the doubled up knots. Raising the degree keeps the knot structure.

MultiKnot.3dm (81.2 KB)

-Pascal


(David Cockey) #4

The ChangeDegree Help statements about knot structure are about how multispan curves/surfaces are handled, not about input curves/surfaces with multiknots.

@pascal correctly describes how ChangeDegree with Degree=Yes handles input objects containing multiknots, However Help for ChangeDegree says with Deformable = Yes then If the degree of the curve/surface is different from the requested degree, the new curve/surface will have simple interior knots. Note it says if the degree is different, not only if it is lower but also if it is higher.

So what is ChangeDegree Help describing?

With Deformable=Yes the new curve or surface will have simple interior knots, whether the new degree is higher or lower than the original degree. That means that the continuity of a multispan curve or surface will be as expected; for a degree n object the continuity between spans will be G(n-1), with the exception described above by Pascal for input with multiknots. However the shape of the new curve or surface may or may not exactly match the original curve or surface.

For ChangeDegree with Deformable=No Help says:

No

If the degree of the curve/surface is LESS than the requested degree, the new curve/surface will have exactly the same geometry and parameterization as the original, but it will have knots of multiplicity = old multiplicity + new degree - old degree.

If the degree of the curve/surface is GREATER than the requested degree, the new curve/surface will be an approximation of the original with simple knots.

Why are there knots of multiplicity if the degree of the input curve/surface is less than the new degree? Recall that a single span curve/surface can be created with exactly the same geometry as a single span curve/surface of lesser degree. But to do so multiknots have to be used in the multispan curve/surface of greater degree. The example below shows what happens when ChangeDegree is used on a multispan degree 2 curve and the output is degree 5.


ChangeDegreeDC1.3dm (46.6 KB)
(Example corrected)


#5

Thank you. I really appreciate your help! :heart_eyes:


#6

I have tried changing the blue curve. :grin:

ChangeDegree
New degree = 3 ( Deformable=Yes )

and then

I expected the new curve or surface will have simple interior knots (multiplicity=1) and continuity between spans will be G2 like Darkgreen curve.

ChangeDegreeDC1_Knead_1st.3dm (52.9 KB)

But, the result is multiplicity=2 and G1. :rage:

Why is that? :scream:


(David Cockey) #7

Looks like you started with the file I uploaded. But the blue curve in your file is degree 3, not degree 5 as labeled. Possibly you used ChangeDegree on the blue curve. Or you may have downloaded the first version of that file which had some errors. The current version in my post above is degree 5.

However ChangeDegree with New degree of 5 and Deformable=Yes on the degree 5 blue curve still results in the multiple interior knots which is not what Pascal described, what I thought happened, and what happens with Pascal’s surface example above. I’m only “reverse engineering” how the code works so I can’t explain what is happening. But I’m interested.


#8

If you change degree to a lower degree on one of these (Deformable=Yes) , then the result will not have the doubled up knots.

ChangeDegree_V6_Knead_1st.3dm (34.9 KB)

But, the result had the doubled up knots (multiknots) not simple interior knots (multiplicity=1).
What is wrong with this? :sweat: