# TomoftheDay

Members

6

0 Neutral

• Rank
Newbie

## Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. ## Is it possible to Override the Maximum Degree of a B-Spline?

Hi Heinrich, Thanks for your insight, I really appreciate all of your recommendations, very useful for the future! This was for a piece of University coursework, which I have submitted so this is now a low priority issue for me. Although I think being able to override the maximum number of degrees may be a useful feature, if all of the caveats laid out by Andreas are understood. I'll paste the question here, upload my file, and explain my reasoning below. I have three Bezier curves which are joined to form a composite Bezier curve: a straight line, a 4th degree curve, and another straight line. The 4th degree curve has G0 & G1 continuity with the straight lines. The task is to augment the 4th degree curve to obtain G2 continuity with the straight lines at either end of it. Based on the other questions asked and the teaching given, the intent is for the degree of the curve to be elevated and the new control points augmented to give G2 continuity. My method to achieve this is as follows: I interpolate the 4th degree curve to calculate the new control points necessary for degree elevation, this is handled by the feature script 'BezierDegreeElevation' in the attached file. This results in a curve with n additional control points which is identical to the original curve. However if the curve degree is elevated above 9 there are some discrepancies due to the curve degree hard limit. I can then align the appropriate points to gain G2 continuity. Handled by 'AlignCurveToOrthoPosG2' in the file. This results in an augmented curve which is no longer similar to the original basis curve. If I were to further increase the degree of the curve before aligning the points, the resulting augmented curve would better approximate its basis curve. Hence the desire for further degree elevation. I can show this with the following handy graph which illustrates the reduction in deviation due to degree elevation, this uses data from the feature 'evalMaxDeviationBeteweenCurves' from the file. I appreciate that this is a very specific case, though I could envisage scenarios where a designer may want to augment a curve for continuity reasons, and then closely approximate that basis curve. Particularly in the marine hullform design space. Many Thanks, Tom Q2.cdbc
2. ## Is it possible to Override the Maximum Degree of a B-Spline?

Hi Andreas, Thanks for your response. I'm elevating to high degrees for the purpose of G2 curvature continuity and to ensure very low deviation from a lower-order non-continuous basis curve. Control point positions are automated and I am not concerned with increased computational load/complexity. I do have a reason to want to do this. I know that Rhino can natively compute Bezier curves up to the 12th degree, and I am wondering if it is possible to lift or be above this limit in CAESES. Thanks, Tom
3. ## Is it possible to Override the Maximum Degree of a B-Spline?

Hi There, The maximum degree of an FBSplineCurve type appears to be limited to 9. I am producing curves with many more points than 10, is it possible to override this maximum and apply my own limit so that the degree may be correct to the number of points?
4. ## Issue with BSplineCurve Knot Vectors

Ah as soon as I typed that I found the bug! Amazing what a bit of sleep will do. I had neglected to cast the first and last points in the entityGroup of points to an FPoint type. Although they rendered on screen as points it seems like the spline curve was not actually reading them as points, which was maybe interfering with the allowable length of the knot vector?Weird... Anyway, Thank you very much for your help!
5. ## Issue with BSplineCurve Knot Vectors

Hi Heidi, Thanks for your response. The knotVector that shows in the curve inspection window is not the same as the knotVector that prints to the console. The vector I construct in the script has 14 values, while the one populated in the inspection window seems to have 10 values?
6. ## Issue with BSplineCurve Knot Vectors

Hi There, I'm currently writing a feature that will elevate the degree of a given B-Spline by generating new control points. My feature generates a curve and the points correctly. I am running into an issue with the Knot vector for this augmented curve. I am constructing the knot vector as an FDoubleSeries, this appears to be as per the documentation for the curve command .setKnotVector() The code evaluates with no errors, I can see that the correct number of items are in the series, but the double series does not appear to play nicely with anything else. I'm at a bit of a loss. I've placed the relevant code below and attached the working file, please excuse it's structure, it is a practice exercise. Any help is appreciated! //Constuct Knot Vector FInteger numPoints(augPoints.getSize()) FDoubleSeries knotVector([]) //Case where num Points is 10 or less if(numPoints<=10) loop(numPoints) knotVector.add(0) endloop loop(numPoints) knotVector.add(1) endloop //Case where num Points is greater than 10 elseif(numPoints>10) FDouble knotFraction(1/((numPoints-10)+1)) loop(10) knotVector.add(0) endloop loop(numPoints-10) knotVector.add(knotFraction) knotFraction += knotFraction endloop loop(10) knotVector.add(1) endloop endif echo("" + knotVector.getCount()) beginPersistentSection() BSplineCurve augCurve() augCurve.setDegree(augPoints.getSize()-1) augCurve.setKnotVector(knotVector) augCurve.setPointList(augPoints) endPersistentSection() Q2.cdbc
×

• #### Activity

×
• Create New...