Cancel
Showing results for
Did you mean:

# spline template and knots definition

Genius
Some NX commands involve a spline as template. In my understanding the characteristics defined by a spline "template" include:

• number of degrees
• number of segments
• definition of knots

• "We have changed the algorithm a few times over the years."
• "The most common approach is to base the knot values on chord lengths."
I think, no matter what's the exact algorithm, there must be a fixed definition of knots for a spline or other splines using it as a template.

Q1: What's defined by the definition of knots? Is it about the exact % parameter of each knot? Or is it about some kind of relationship between % paramter and % arc length for each knot?

Q2: I often try to create a spline with an existing spline as "template". My current method is based on several steps (listed below). Is there a better way to do the job?

1. Copy the existing spline with "Composite Curve".
2. "Remove Parameters" to convert the composite curve into a non-timpstamp spline.
3. "Make Associative" to convert the non-timestamp spline back to a spline feature.

Thanks!
7 REPLIES 7

# Re: spline template and knots definition

Siemens Phenom

The spline data that's stored in NX consists of

• The degree (a number, m)
• An array of  n+m+1 knots (note: knots, not knot points; these are numbers, not points)
• An array of  n  3D poles
• An array of  n  weights

These are all independent, except that number of knots = number of poles + degree + 1.

When you create a spline using the "template" idea, the new spline uses the same degree and knots as the template one. This has some advantages. For example, if you build a "Through Curves" surface, it will be much simpler (fewer patches) if it's built from curves that have the same knots.

As we know, a spline is a string of segments, joined end-to-end. The knots are the parameter values at the joins, and they can be anything you like, as long as they are increasing in value. There are functions in SNAP and NX/Open that let you specify the knots, so you can play around to see how knot values affect things. When you create a spline in the NX UI, you don't input any knot values, so NX has to invent them somehow. It typically does this using various magic calculations based on distances between the data points you provided.

If you just copy a spline, using Move Object, the new one will have the same knots as the old one, so the "template" structure is preserved.

# Re: spline template and knots definition

Genius

These are all independent, except that number of knots = number of poles + degree + 1.

As well known,

• number of poles = number of segments + degree
• number of knots = number of segments + 1

Combined with your equation, there would be:

• number of segments + 1 = number of poles + degree + 1
•       →→→    number of segments = number of poles + degree   →→→ Wrong?

What's wrong with my understanding?

The problem may be that I can't understand your statement "knots, not knot points; these are numbers, not points".

The knots are the parameter values at the joins, and they can be anything you like, as long as they are increasing in value.

Does "parameter values at the joins"  simply mean % parameters of all knots on the spline?

And no matter how you move the poles of a spline, the % parameters corresponding to all knots keep constant?

If the questions involve sophisticated math, please simply ignore them.

Thanks!

# Re: spline template and knots definition

Siemens Phenom

Maybe there is some confusion because there are two different ways to count knots. For example, take the knot sequence

`0  0  0  0  0.6  0.6  1  1  1  1`

Some people would say that there are 3 knots. However, a mathematician (like me) would say that there are 10 knots.

These knots (probably) belong to a cubic curve with 2 segments. One segment corresponds to the parameter interval [0,0.6], and the other to the interval [0.6,1]. Those segments join together at parameter value t = 0.6. The curve would have 6 poles. So, for this curve, we have

• Degree = 3
• Number of poles = 6
• Number of knots = 10   (check: 10 = 6 + 3 + 1)

>  no matter how you move the poles of a spline, the % parameters corresponding to all knots keep constant?

When you move the poles of a spline, the internal algorithms usually keep the knot values fixed. They don't have to do this, but I think they do (mostly).

You could also have a function that keeps the poles fixed, but changes the knots. I don't know if it would be any use for anything; I mention this only to emphasise the independence of knots and poles. Easy to write with SNAP; slightly harder with NX/Open.

# Re: spline template and knots definition

Genius

Hi @Yamada   Your explanation, along with your introduction of "multiplicity" of knots in other threads, help me understand the issue much better. Very heplful! Thank you!

# Re: spline template and knots definition

Genius

Hi @Yamada   Sorry for some questions regarding  an earlier post:

Maybe there is some confusion because there are two different ways to count knots. For example, take the knot sequence

`0  0  0  0  0.6  0.6  1  1  1  1`

Some people would say that there are 3 knots. However, a mathematician (like me) would say that there are 10 knots.

These knots (probably) belong to a cubic curve with 2 segments. One segment corresponds to the parameter interval [0,0.6], and the other to the interval [0.6,1]. Those segments join together at parameter value t = 0.6. The curve would have 6 poles. So, for this curve, we have

• Degree = 3
• Number of poles = 6
• Number of knots = 10   (check: 10 = 6 + 3 + 1)

Q1:

• number of segment = 2
• degree = 3
• number of poles = 6

But to my knowledge, there should be: number of poles = degree + number of segment

Is anything wrong with my understanding?

[ADD] In your example, the spline has 3 segments, but the length of the middle segment is zero. Is this correct?

Q2:

For a spline of

n = number of poles
m = degree

there would be:

s1 n - m         = numbe of segments
s2 = m + 1  = numbe of knots

and the knots array should be

{t[0], … , t[n+m]}

The relations between the number of knots and the number of segments:

s2 = m (s1 + 1) + m

this seems to be difficult to understand.

Then, from the knot value array {t[0], … , t[n+m]}, how can I extract the parameter value at the joint of segment no.x and segment no.x+1?

[ADD] It seems to be t[m+x]. Is this correct?

Thank you!

# Re: spline template and knots definition

Siemens Phenom

Hard for me to answer these questions because I always think in terms of knots, not in terms of segments.

number of poles = degree + number of segments

I guess this is correct as long as you count a zero-length segment between any two equal interior knots. So, my example would have 3 segments (one of which has zero length). It has 6 poles and degree = 3, so your formula works.