Cancel
Showing results for 
Search instead for 
Did you mean: 

spline template and knots definition

Genius
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 
 
In a previous thread@Yamada talked about % parameter of knots in a spline:
 
  • "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!
4 REPLIES

Re: spline template and knots definition

Siemens Phenom Siemens Phenom
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.

山田
yamada

Re: spline template and knots definition

Genius
Genius

Hi @Yamada  Thanks for your detailed explanation!

 

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 Siemens Phenom
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.

山田
yamada

Re: spline template and knots definition

Genius
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!