spline degree

spline degree

Anonymous
Not applicable
3,697 Views
6 Replies
Message 1 of 7

spline degree

Anonymous
Not applicable

When I draw a spline and select Method - CV and Degree-  3 then, select a start point and an end point for the spline, when I highlight the spline it shows only 2 CVs. Checking the spline properties shows that it has been drawn as a 1 degree spline.

If I draw a spline with 2 fit points then change the spline to CV it has 4 CVs and the proporties show it is a 3 degree spline.

The CV method always reverts to a 1 degree spline.

I have two buttons to draw splines, one for the Fit method and one for the CV method no matter which one I select it draws the type of spline I last drew. That is, if the previous spline was a Fit spline and I select the CV Spline button it draws a Fit spline , similarly if I had drawn a CV spline and select the Fit button for the next spline it will draw a CV spline (and it will be a degree 1 spline)

 

And also, in the past I have drawn a spline and selected it's properties to find in Knot Parameterisation that it is Custom as oposed to chord, sqr root or uniform. But, I can find no information in  help or on any forums explaining what custom means and how it occurs. This has happened when when I have set this property to chord.

0 Likes
Accepted solutions (2)
3,698 Views
6 Replies
Replies (6)
Message 2 of 7

SEANT61
Advisor
Advisor

A CV spline has to have Degree + 1 control verticies.  If only two verteices are selected, AutoCAD can only create a degree 1 spline.  A Fit spline will interpolate the two additional vertices, either outright, or with the info from the start and end tangents.

 

What is the code behind those buttons.  Is it a command macro?  A lisp routine?

 

A typical reason a custom Knot Parameterization would be found on a spline is if two splines with differing parameterizations were 'JOIN'ed together.


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 3 of 7

Anonymous
Not applicable

Thanks SEANT61

Firstly after reading my post I realisethat  it is not precise and I should have read it more carefully and tidied it up.

 

I understand that 1 degree splines have 2 CVs and 3 degree splines have 4 CVs. My problem is that I can not save the 3 degree spline property as the default, the system reverts to the default of 1 degree.  This has not always been the case and this is why I know it is a problem. HELP explains that  the 3 degree parameter  for CV splines is  the default on start up. For some reson my system defaults to a 1 degree spline. However after I have drawn a Fit spline, selecting only two points, and then I change from this Fit spline to a CV spline  the CV spline is of 3 degree. But if I draw another CV spline it again is a 1 degree spline. I'm used to drawing 3 degree CV splines and I prefer it that way and previously this is how the system behaved but something has changed and it defaults to a 1 degree spline I and I'm seeking help to ensure the default reverts to 3 degree not 1 degree.

 

Did you mean that when a 3 degree CV spline is drawn four points must be selected. I am certain that in the past if I chose to, I needed only to select two points, a start point and an end point and a 3 degree spline was drawn showing 4 CVs. Often I would draw this type of spline and then manipulate its shape with the middle two vertices. I am certain that I did not have to select 4 points. If in fact you have to select degree+1 points when constructing a CV spline then selecting the spline degreeprior to this is redundant and a waste of time.  With Fit point splines it is obvious that points must be placed at required location, and in the case of Fit point splines there are no options to define the degree of the spline.

 

 

The macro codes behind the buttons are,

      for the      CV Spline         ^C^_^RSPLINE_M_CV

      and           FIT Spline        ^C^C^R_spline

 

I need to research a bit more about the behaviour of the Custom Knot Parameterisation. And, this is what I have been trying to do. The point I was making  is that I can find no information about it. If you can search and find something I be very happy to know how you did it. All my searching with the  key words have come up with nothing in Autocad 2014 Help nor in any forums that I can find.

Of interest wrt knot parameterisation (kp), is if I draw a Fit spline it has Chord kp, if I then convert this to a CV spline this spline has 3 degrees, if I then convert this spline back to a Fit spline it retains Chord kp. On the other  hand if I draw a CV spline selected as 3 degree it is drawn as a 1 degree spline and if this is converted to a fit spline this has Uniform kp and 3 degree.

 

Thanks for your previous response.

0 Likes
Message 4 of 7

SEANT61
Advisor
Advisor

 

Did you mean that when a 3 degree CV spline is drawn four points must be selected?

 

From my experience, that is how AutoCAD cad has always worked. Maybe I’ve missed a setting or acad version where that applied, or, perhaps, there was some custom routine (Lisp, VBA, etc.) at play when you were creating those degree three (4 control point) splines with just two picks. Incidentally, most of illustration software (Illustrator, CorelDraw) works in that fashion with their Bezier tools.

 

If in fact you have to select degree+1 points when constructing a CV spline then selecting the spline degree prior to this is redundant and a waste of time.

 

Not if the intention is to select more than four control points. Or, in the case of a degree 2 curve, more than three points.

 

I need to research a bit more about the behavior of the Custom Knot Parameterization.

 

Custom Knot Parameterization is more of an outcome than a desired goal. Typically, it is not something a cad users needs to concern themselves about. It can show up with the JOIN command, as I said. From a programming perspective, a custom parameterization will result whenever a Kink is placed in the spline as a result of Knot Multiplicity. See sample drawing and Link.

http://www.rhino3d.com/nurbs

 

 


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 5 of 7

Anonymous
Not applicable
Accepted solution

Thanks for your reply again SEANT61.

I must be losing it. I am certain that CV splines used to behaved as I explained . But as you say, if I do not select 4 control points then the default 3 degree spline is not drawn.

Also, the different spline buttons, Fit and CV, appear to be of no real use because what ever button is picked, the previously drawn type of spline overrides the selection. That is, draw a Fit spline, then select to draw a CV spline and the Fit spline is drawn instead. I can eliminate onebuton from my quick toolbar. Although I will try and find if the macros are correct.

Thanks for your comment on knot parameterisation. I was investigating this in case it had something to do with my spline degree issue.

Hopefully Autocad will clarify the CV spline degree issues in there Help. And also, at least a comment that Custom knot parameterisation is a property, There are small descriptions for Chord, sqr and uniform. They could add Custom to this list.

Thanks again, however I'm not completely convinced about why 3 degree is the default and my system reverts to 1 degree default. I'll  continue to keep this as a background issue and if I come to a conclusion I'll let you know either way.

Regards

Grahame

 

0 Likes
Message 6 of 7

SEANT61
Advisor
Advisor
Accepted solution

If command macros are at play then various parameters that persist between call will modify the initial default values – at least until AutoCAD is restarted.

 

For instance, the command macro below sets Spline as Method=CV, Degree=1. The next time the standard Spline command is called, those should be the current parameters until modified.

 

I’m not sure if this recreates the operations as you previously described (it only allows two pick points) but it should create a degree 3 spline by just picking two points:

^C^C^R_spline;m;cv;d;1;;\\;splinedit;last;r;e;4;;;

 

In any event, I hope you finally get everything sorted out,

Sean


************************************************************
May your cursor always snap to the location intended.
Message 7 of 7

Anonymous
Not applicable

SEANT61

After thinking about it I now realise that I used to draw all splines as Fit splines and then change them to CV splines as required. They then were all 3 degree splines as per the default. I'm happy now, with your help, that I've worked out what's going on.

I'll try the macros for the buttons when I get a chance.

I'm an amateur and only been trying 3D part time for about 12 month. I'm drawing ship and yacht hulls and I'm still finding my way with both splines and surfaces. I've been reluctant to pose questions in this forum but now I can see how good it can be. Hopefully I can contribute to solutions in the future.

Regards

Grahame

0 Likes