Difference between revisions of "Sketcher BSplineDecreaseKnotMultiplicity"

From FreeCAD Documentation
Jump to navigation Jump to search
(update see also)
(update page according to the increase page)
Line 24: Line 24:
 
<!--T:9-->
 
<!--T:9-->
 
Decreases the knot multiplicity of a B-spline curve knot (see [https://en.wikipedia.org/wiki/B-spline B-spline]).
 
Decreases the knot multiplicity of a B-spline curve knot (see [https://en.wikipedia.org/wiki/B-spline B-spline]).
 +
 +
B-splines are basically a combination of [https://en.wikipedia.org/wiki/Bezier_curve#Constructing_B%C3%A9zier_curves Bézier curves] (nicely explained in [https://www.youtube.com/watch?v=bE1MrrqBAl8 this] and [https://www.youtube.com/watch?v=xXJylM2S72s this] video). The points where two Bézier curves are connected to form the spline is called the knot. A knot with the multiplicity 1 means that the curve left and right to the knot has at least the same first order derivative (called ''C''<sup>1</sup> continuity).
 +
Here is a spline whose knots have the multiplicity 1 (indicated by the number in parentheses, <br/>indication can be changed using the toolbar button {{Button|[[File:Sketcher_BSplineKnotMultiplicity.svg|24px]] [[Sketcher_BSplineKnotMultiplicity|Show/hide B-spline knot multiplicity]]}}):
 +
 +
</translate>
 +
[[File:Sketcher_KnotMultiplicity_multiplicity1.png|386px]]
 +
<translate>
 +
<!--T:10-->
 +
{{Caption|B-spline where both knots have the multiplicity 1. You can see that the second order derivatives left and right to the knots are not equal.}}
 +
 +
A multiplicity of 2 will change the spline so that the second order derivatives becomes equal (''C''<sup>2</sup> continuity). Here is the same spline where the multiplicity was increased to 2:
  
 
</translate>
 
</translate>
[[File:sketcher_SampleBSplineDecreaseKnotMultiplicity_example.png]]
+
[[File:Sketcher_KnotMultiplicity_multiplicity2.png|386px]]
 
<translate>
 
<translate>
 
<!--T:10-->
 
<!--T:10-->
{{Caption|B-spline curve showing decreasing knot multiplicity.}}
+
{{Caption|B-spline where both knots have now the multiplicity 2. Note that control points were added and changed to achieve this.}}
 +
 
 +
Another consequence of a multiplicity of 2 is that you gain local control. This means the change of one control point only affects the splice locally to this changed point. This can be seen in this example, where the splines from the images above were taken and their the second control point from the right side was moved up:
 +
</translate>
 +
[[File:Sketcher_KnotMultiplicity_locality.png]]
 +
<translate>
 +
{{Caption|Effect of locality due to different multiplicity.}}
 +
One can see that the spline with knot multiplicity 1is completely changed while the one with multiplicity 2 kept its form at its left side.
  
 
==Usage== <!--T:5-->
 
==Usage== <!--T:5-->
Line 35: Line 53:
 
<!--T:14-->
 
<!--T:14-->
 
# Select a B-spline knot
 
# Select a B-spline knot
# Invoke the tool using several methods:  
+
# Either:  
#* Press the {{Button|[[File:Sketcher_BSplineDecreaseKnotMultiplicity.svg|16px]] [[Sketcher_BSplineDecreaseKnotMultiplicity|B-spline decrease knot multiplicity]]}} button.
+
#* Press the button {{Button|[[File:Sketcher_BSplineDecreaseKnotMultiplicity.svg|24px]] [[Sketcher_BSplineDecreaseKnotMultiplicity|B-spline decrease knot multiplicity]]}}.
#* Use the {{MenuCommand|Sketch → Sketcher B-spline tools → [[File:Sketcher_BSplineDecreaseKnotMultiplicity.svg|16px]] Decrease knot multiplicity}} entry in the top menu.
+
#* Use the menu {{MenuCommand|Sketch → Sketcher B-spline tools → [[File:Sketcher_BSplineDecreaseKnotMultiplicity.svg|24px]] Decrease knot multiplicity}}.
 +
 
 +
'''Note:''' Decreasing the multiplicity from 1 to 0 will remove the knot since the result would be a curve with an "edge" at the knot position (''C''<sup>0</sup> continuity) and this is not supported. (To create curves with an "edges", you can create two splines and connect them.)
  
 
<!--T:8-->
 
<!--T:8-->

Revision as of 01:46, 1 November 2020

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎русский

Sketcher BSplineDecreaseKnotMultiplicity.svg Sketcher BSplineDecreaseKnotMultiplicity

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


Description

Decreases the knot multiplicity of a B-spline curve knot (see B-spline).

B-splines are basically a combination of Bézier curves (nicely explained in this and this video). The points where two Bézier curves are connected to form the spline is called the knot. A knot with the multiplicity 1 means that the curve left and right to the knot has at least the same first order derivative (called C1 continuity). Here is a spline whose knots have the multiplicity 1 (indicated by the number in parentheses,
indication can be changed using the toolbar button Sketcher BSplineKnotMultiplicity.svg Show/hide B-spline knot multiplicity):

Sketcher KnotMultiplicity multiplicity1.png

B-spline where both knots have the multiplicity 1. You can see that the second order derivatives left and right to the knots are not equal.


A multiplicity of 2 will change the spline so that the second order derivatives becomes equal (C2 continuity). Here is the same spline where the multiplicity was increased to 2:

Sketcher KnotMultiplicity multiplicity2.png

B-spline where both knots have now the multiplicity 2. Note that control points were added and changed to achieve this.


Another consequence of a multiplicity of 2 is that you gain local control. This means the change of one control point only affects the splice locally to this changed point. This can be seen in this example, where the splines from the images above were taken and their the second control point from the right side was moved up: Sketcher KnotMultiplicity locality.png

Effect of locality due to different multiplicity.

One can see that the spline with knot multiplicity 1is completely changed while the one with multiplicity 2 kept its form at its left side.

Usage

  1. Select a B-spline knot
  2. Either:

Note: Decreasing the multiplicity from 1 to 0 will remove the knot since the result would be a curve with an "edge" at the knot position (C0 continuity) and this is not supported. (To create curves with an "edges", you can create two splines and connect them.)