Arc _ChangeDegree vs. _Rebuild

When I use an arc as sweep shape I can’t set tangency/curvature in the _Sweep2 dialog.
Logical, an arc is degree 2 - not deformable.

_ChangeDegree to 3 and deformable on the arc _sweep2 should offer tangency.
It doesn’t.
When I check the object details, the curve is still an arc, but degree 3.

Now I _Rebuild the same original arc to degree 3, 4 points.
The result looks identical to the _ChangeDegree curve.

And now _Sweep2 offers more than position only.


The object data is different.

Arc:

 ON_ArcCurve:  domain = [0,2.83152]
    center = (0.013064923029722064, 1.4651099874169761e-13, -3.9206639623760213)
    radius = 6
    length = 2.83152
    start = (1.3198202035318181, -2.964722667121467e-14, 1.9353065495784283)
    end = (-1.4851211085363909, -1.6661061531547996e-14, 1.8892791195156042)

After _ChangeDegree:

Control Points  4 rational points
    index               value
    CV[ 0] [1.3198202035318183, -0.90653407766746386, 1.9353065495784287, 1.0000000000000002] = (1.3198202035318181, -0.90653407766746363, 1.9353065495784283)
    CV[ 1] [0.38277986492505689, -0.88978757901376837, 2.1032146142538846, 0.98152689560574946] = (0.38998408157610825, -0.90653407766746508, 2.1427987594327567)
    CV[ 2] [-0.55220057243101217, -0.88978757901376393, 2.0878721375662748, 0.98152689560574868] = (-0.56259341939909047, -0.9065340776674613, 2.1271675253256772)
    CV[ 3] [-1.4851211085363911, -0.90653407766745076, 1.8892791195156047, 1.0000000000000002] = (-1.4851211085363909, -0.90653407766745053, 1.8892791195156042)

After _Rebuild

Control Points  4 non-rational points
   index               value
   CV[ 0] (1.3198202035318181, -1.7445951238230879, 1.9353065495784283)
   CV[ 1] (0.39846892812304885, -1.7445951238230899, 2.1409053725028144)
   CV[ 2] (-0.57101157630963995, -1.7445951238230857, 2.1249967699641972)
   CV[ 3] (-1.4851211085363909, -1.744595123823075, 1.8892791195156042)

Why is the arc still an arc when using _ChangeDegree?
Actually it isn’t, or?

2024-08-22_CP_Sweep.3dm (833.5 KB)

Take a look at the weights! Real arcs are just possible with weights different to 1.

1 Like

Sure, I know.

IMO _ChangeDegree should result in a regular curve not an arc.

Interestingly, the 2 arc behave different on _ChangeDegree to 3 deformable:

I want predictable results, so I want to understand the situation/system.

_changeDegree form 2->3 (“up-degree”) will result in a geometrical identical curve, the Degree 3 curve will (somehow) inherit the weight of the CVs. It s the same curve, that will be represented in a more complex CV/Weight/Knot setup. There is only one exact solution - but dont ask me for the precise nurbs-math. Within this calculation, also the weight is somehow inherited.

_rebuild will approximate a new, curve with some tolerance, the structure of the curve is completely independent. For a certain tolerance there will be multiple solutions, see also this discussion about a new algorithm to do this.

here is an example of “up-Degree” from 3 (red) to 4 (blue). (without weights)
the red and blue representation of the curve a identical.
the (P) shows the evaluation at 1/3 using De Casteljau’s algorithm of a Degree 3 and identical Degree 4 curve.

2 Likes

The following is based on a combination of some knowledge of NURBS math and experiments. I am not associated with McNeel and have know knowledge of Rhino code.

The Deformable option in ChangeDegree only affects multispan curves. It has no effect on single span curves.

If the degree of a multispan curve is decreased the effect of Deformable option is minimal in my exerience. In general it is not possible for a curve of a lesser degree to exactly match the shape of a curve of a greater degree. (There are special cases which are exceptions.)

If the degree of a multispan curve is increased with Deformable=No the result will have multiknots added and exactly match the shape of the input curve.

If the degree of a multispan curve is increased with Deformable=Yes the result will not have multiknots added and in general differ from the shape of the input curve.

If degee of a multispan curve is increaed with Deformable=No and subsequently the multiknots are removed (RemoveMultiknot) the result will be the same as if the degree was increased using Deformable=No.

1 Like

I disagree. ChangeDegree should make the minimal changes necessary to change the degree. It does not change the number of spans and retains the knot parameter values. Use Rebuild more extensive changes are desired.

Hi @Charles,

The Tangency and Curvature option in the Sweep2 dialog will be disabled if any of the sweep shapes are rational.

An Arc curve converted to NURBS curve, using the ToNurbs command, will be a rational, 2 degree curve.

The results of changing the degree of an Arc, using ChangeDegree, will also result in a rational NURBS curve.

Using Rebuild is the way to go in this case.

– Dale

I also disagree, after some thought.
You are right.

Hello Dale

Understood.
And it’s clearly mentioned in the Help.

Understood as well.

Thanks for the detailed info.