Showing results for 
Search instead for 
Did you mean: 

Sketch Control Points of Spline


Is there a way to get the control points (the ones that show up with DOF symbols when not constrained) of a through points spline in a sketch? I have tried snap.NX.spline, but it only has knots and poles, not thru points.


I am using NX 8.0


Re: Sketch Control Points of Spline

Siemens Phenom Siemens Phenom
Siemens Phenom

I'm not 100% sure I'm correct, but I think the "through" points are almost always the knot points. A knot point of a spline is a point whose corresponding parameter value is a knot. Sorry the terminology is so confusing -- I didn't invent it. So, to get the knot points, you just calculate a point on the spline at each knot value. Since you seem to have access to SNAP, the code would be something like this:


Dim knotList As New List(Of Double)(mySpline.Knots)
Dim distinctKnotList = knotList.Distinct

Dim knotPointList As New List(Of Position)

For Each t In distinctKnotList
   Dim pt = mySpline.Position(t)

For this to work, you need to put at the top of your file


Option Infer On
Imports Snap
Imports System.Linq

 Linq is necessary because that's where we find the "Distinct" function, which removes duplicates from a list.


Re: Sketch Control Points of Spline

Honored Contributor
Honored Contributor

I'd try the .AskSplineThruPts method.

Re: Sketch Control Points of Spline


Both methods work, thnk you both.