turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- NX Design
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- NX Design
- NX Design Forum
- spline template and knots definition

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-06-2018 02:04 AM - edited 04-06-2018 02:07 AM

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.

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

Thanks!

Solved! Go to Solution.

Labels:

7 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-06-2018 09:23 PM - edited 04-06-2018 09:28 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-07-2018 02:40 AM - edited 04-07-2018 02:47 AM

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!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-07-2018 03:02 AM - edited 04-07-2018 03:04 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-07-2018 04:03 AM - edited 04-07-2018 04:04 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2018 12:49 PM - edited 07-31-2018 01:44 PM

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

@Yamada wrote: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 1Some 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:**

In your example,the spline:

- 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

and the knots array should be

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

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!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2018 09:52 PM

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.

yamada

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-31-2018 10:30 PM

Hi @Yamada Thank you for your confirmation!

I asked questions again in this thread, just to know how to extract/modify the value for a certain knot of a spline in SNAP. Along with information you provided in the other thread, especially those on how to calculate the number of knots, I think I know how to do it correctly, although it's not as straightforward as I imagined. Thanks again!

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc