Sketcher BSplineIncreaseDegree: Difference between revisions

From FreeCAD Documentation
(WIP)
Line 42: Line 42:


<!--T:20-->
<!--T:20-->
In this cubic spline (degree 3) there are 3 segments, meaning 3 curves are connected at 2 knots<br>(degree is indicated by the number, indication can be changed using the toolbar button {{Button|[[File:Sketcher_BSplineDegree.svg|24px]] [[Sketcher_BSplineDegree|Show/hide B-spline degree]]}}):
In this cubic B-spline (degree 3) there are 3 segments, meaning 3 curves are connected at 2 knots.

The degree is indicated by the number in the center. See [[File:Sketcher_BSplineDegree.svg|16px]] [[Sketcher_BSplineDegree|Show/hide B-spline degree]].


</translate>
</translate>
Line 51: Line 53:


<!--T:22-->
<!--T:22-->
The outer segments have each 2 control points, the inner one none to fulfill the constraint that the knots have multiplicity 1. (see [[Sketcher_BSplineDecreaseKnotMultiplicity#Description|this page]] for an explanation of the multiplicity)
The outer segments each have 2 control points, the inner segment has none to fulfill the constraint that the knots have multiplicity 1. See [[Sketcher_BSplineDecreaseKnotMultiplicity#Description|this page]] for an explanation about multiplicity.


<!--T:23-->
<!--T:23-->
Increasing the degree will add control points and the shape of the spline is not changed:
Increasing the degree to 4 will add control points without changing the shape of the B-spline:


</translate>
</translate>
Line 60: Line 62:
<translate>
<translate>
<!--T:24-->
<!--T:24-->
{{Caption|Same B-spline where the degree was changed from 3 to 4. Note that also the knot multiplicity was increased.}}
{{Caption|Same B-spline where the degree was changed from 3 to 4. Note that the knot multiplicity was also increased.}}


<!--T:25-->
<!--T:25-->
If you take this result and decrease the degree, you cannot get the initial state of the spline information will be lost by this operation. For our example decreasing the degree again leads to this:
From this result you cannot get back to the initial state of the B-spline by decreasing the degree as some information was lost by this operation. Decreasing the degree back to 3 leads to this:


</translate>
</translate>
Line 69: Line 71:
<translate>
<translate>
<!--T:26-->
<!--T:26-->
{{Caption|Same B-spline where the degree was changed back from 4 to 3. Note that the knot multiplicity was increased. Depending on the spline, the algorithm to decrease the degree may add a lot of knots to preserve the spline shape as happened in this example.}}
{{Caption|Same B-spline where the degree was changed back from 4 to 3. Note that the knot multiplicity was increased. Depending on the B-spline, the algorithm to decrease the degree may add a lot of knots to preserve the spline shape as happened in this example.}}


<!--T:27-->
<!--T:27-->
You can see that now each segment has 2 control points and the knots are coincident with each a further control point. The knots have now ''C''<sup>0</sup> continuity so that the spline will get "edges" when you move a control point. So the information of a higher continuity is lost. (see [[Sketcher_BSplineDecreaseKnotMultiplicity#Description|this page]] to for an explanation of the continuity)
You can see that now each segment has 2 control points and the knots are coincident with each a further control point. The knots have now ''C''<sup>0</sup> continuity so that the spline will get "edges" when you move a control point. So the information of a higher continuity is lost. See [[Sketcher_BSplineDecreaseKnotMultiplicity#Description|this page]] to for an explanation of the continuity.





Revision as of 20:09, 1 April 2024

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Sketcher BSplineIncreaseDegree

Menu location
Sketch → Sketcher B-spline tools → Increase B-spline degree
Workbenches
Sketcher
Default shortcut
None
Introduced in version
0.17
See also
Sketcher Show/hide B-spline degree, Sketcher Decrease B-spline degree

Description

The Sketcher BSplineIncreaseDegree tool increases the degree (order) of a B-spline. See this page for more information about B-splines.

Usage

  1. Select a B-spline.
  2. There are several ways to invoke the tool:

Example

B-splines are basically a combination of Bézier curves (nicely explained in this and this video).

In this cubic B-spline (degree 3) there are 3 segments, meaning 3 curves are connected at 2 knots.

The degree is indicated by the number in the center. See Show/hide B-spline degree.

B-spline with degree 3 and 2 knots that each have the multiplicity 1.

The outer segments each have 2 control points, the inner segment has none to fulfill the constraint that the knots have multiplicity 1. See this page for an explanation about multiplicity.

Increasing the degree to 4 will add control points without changing the shape of the B-spline:

Same B-spline where the degree was changed from 3 to 4. Note that the knot multiplicity was also increased.

From this result you cannot get back to the initial state of the B-spline by decreasing the degree as some information was lost by this operation. Decreasing the degree back to 3 leads to this:

Same B-spline where the degree was changed back from 4 to 3. Note that the knot multiplicity was increased. Depending on the B-spline, the algorithm to decrease the degree may add a lot of knots to preserve the spline shape as happened in this example.

You can see that now each segment has 2 control points and the knots are coincident with each a further control point. The knots have now C0 continuity so that the spline will get "edges" when you move a control point. So the information of a higher continuity is lost. See this page to for an explanation of the continuity.