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

Showing results for

- Siemens PLM Community
- NX Customization and Programming
- NX Programming & Customization Forum
- Extract Y coordinate if X coordinate is known from...

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-16-2017 02:26 AM

5 REPLIES

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

05-16-2017 09:50 AM

Note in a general case, there may also be 0 or (more than 1) intersection point.

If you don't KNOW the spline characteristics, you may want to check for these cases as well.

Offhand, other than walking the spline's parameter (to find the "U" value where the point on the spline at that U is the desired X), I don't know of a better way than you are doing.

Production:NX10.0.3.5 MP5 + patch/TC11.2

I'd rather be e-steemed than e-diseaseled

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

05-24-2017 04:52 AM

Intersection is the only way to do this. To find the y value at x=k, you can either intersect the spline with the line x=k, or intersect with the plane x=k.

You can get the equation of the spline in the form x = x(t) y = y(t), and use numerical methods to solve the equation x(t) = k. But, in effect, you'd just be re-implementing NX's intersection function.

yamada

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

05-30-2017 10:48 AM

How can we get those equations?

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

05-30-2017 11:27 PM

Have you tried getting the coordinates of spline in this way?

Dim MyPoint As Point4d = MySpline.GetPoles(i)

where i is the no of poles the spline is having.

Regards,

Abhi

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

05-31-2017 09:46 PM

An NX spline is just a standard NURBS (Non-uniform Rational B-Spline). You can find the equation in many places on the 'net. One example is this Wikipedia page.

The equation involves

- 3D control points (poles). There are n of these.
- Weight values, one for each pole, so there are n of these.
- An order value, k. If the degree of the curve is m, then k = m+1.
- Knot values. There are n+k of these

You can get all of the above data by calling NX/Open functions.

But, again, once you have the equation, you still have to do an intersection calculation to get the y corresponding to a given x. Better to use the NX intersection algorithm, rather than one you write yourself.

yamada

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc