Sketcher BSplinePoleWeight/pl: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
No edit summary
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>


{{Docnav
{{Docnav/pl
|[[Sketcher_BSplineKnotMultiplicity|Show/hide B-spline knot multiplicity]]
|[[Sketcher_BSplineKnotMultiplicity/pl|Pokaż / ukryj wyświetlanie węzłów krzywej złożonej]]
|[[Sketcher_ArcOverlay/pl|Pokaż / ukryj okrąg pomocniczy dla łuków]]
|[[Sketcher_BSplineApproximate|Convert geometry to B-spline]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench/pl|środowisko pracy Szkicownik]]
|IconL=Sketcher_BSplineKnotMultiplicity.svg
|IconL=Sketcher_BSplineKnotMultiplicity.svg
|IconR=Sketcher_BSplineApproximate.svg
|IconR=Sketcher_ArcOverlay.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}


{{GuiCommand
{{GuiCommand/pl
|Name=Sketcher BSplinePoleWeight
|Name=Sketcher BSplinePoleWeight
|Name/pl=Szkicownik: Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej
|MenuLocation=Sketch → Sketcher B-spline tools → Show/hide B-spline control point weight
|MenuLocation=Szkic → Wygląd w szkicowniku → Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Workbenches=[[Sketcher_Workbench/pl|Szkicownik]]
|Version=0.19
|Version=0.17
|SeeAlso=[[Sketcher_CompCreateBSpline|Sketcher Create B-spline]]
|SeeAlso=[[Sketcher_CreateBSpline/pl|Komponent utwórz krzywą złożoną]]
}}
}}


==Description==
<span id="Description"></span>
==Opis==


Narzędzie [[Image:Sketcher_BSplinePoleWeight.svg|24px]] '''Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej''' pokazuje lub ukrywa wagę punktu kontrolnego [[B-Splines/pl|krzywej złożonej]] we wszystkich szkicach.
Shows or hides the display of the '''weights''' for the control points of a B-spline curve (see [[#Weight_Explanation|below]] for an explanation of weights).


[[File:sketcher_BSplineWeightShow.png|468px]]
[[File:sketcher_BSplineWeightShow.png|468px]]
{{Caption|Liczby ''(zielone, w nawiasach kwadratowych)'' odnoszą się do wag punktów kontrolnych.}}
{{Caption|B-spline with control point weights displayed in brackets}}


==Usage==
<span id="Usage"></span>
==Użycie==


# Istnieje kilka sposobów wywołania narzędzia:
# Select a B-spline and use the toolbar button {{Button|[[File:Sketcher_BSplinePoleWeight.svg|16px]] [[Sketcher_BSplinePoleWeight|Show/hide B-spline control point weight]]}}.
#* Naciśnij przycisk {{Button|[[Image:Sketcher_BSplinePoleWeight.svg|16px]] '''Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej'''}}.
#* Wybierz z menu {{MenuCommand|Szkic → Widok szkicu → Pokaż / ukryj warstwę informacyjną krzywej złożonej → [[Image:Sketcher_BSplinePoleWeight.svg|16px]] Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej}}.


<span id="Changing_weights"></span>
==Weight Explanation==
==Zmiana wag==


Sposób zmiany wag jest opisany na stronie przedstawiającej [[B-Splines/pl#Zmiana_wagi|Krzywe złożone]].
B-splines are basically a combination of [[B-Splines#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 Bézier curve is calculated using this formula:


{{Docnav/pl
<math>\quad
|[[Sketcher_BSplineKnotMultiplicity/pl|Pokaż / ukryj wyświetlanie węzłów krzywej złożonej]]
\textrm{Bezier}(n,t)=\sum_{i=0}^{n}\underbrace{\binom{n}{i}}_{\text{polynomial term}}\underbrace{\left(1-t\right)^{n-i}t^{i}}_{\text{polynomial term}}\; \underbrace{P_{i}}_{\text{point coordinate}}
|[[Sketcher_ArcOverlay/pl|Pokaż / ukryj okrąg pomocniczy dla łuków]]
</math>
|[[Sketcher_Workbench/pl|środowisko pracy Szkicownik]]

''n'' is hereby the degree of the curve. So a Bézier curve of degree ''n'' is a polygon with order ''n''. The factors <math>P_{i}</math> are hereby in fact the coordinates of the Bézier curves' control points. For a visualization see [https://pomax.github.io/bezierinfo/#control this page].

The term weight in FreeCAD is a bit misleading because in literature the factors <math>P_{i}</math> are often called weights as well. FreeCAD's weights are something different. The idea of these weights is to modify the spline so that the different control points are "weighted". The idea is that a point with weight 2 should have twice as much influence than a point with weight 1. This is achieved by using this different formula to calculate the spline:

<math>\quad
\mathrm{Rational\ Bezier}(n,t)=\cfrac{\sum_{i=0}^{n}\binom{n}{i}\left(1-t\right)^{n-i}t^{i}w_{i}P_{i}}{\sum_{i=0}^{n}\binom{n}{i}\left(1-t\right)^{n-i}t^{i}w_{i}\;\;\;\,}
</math>

whereby <math>w_{i}</math> is the weight for the point <math>P_{i}</math>.

This is a new class of Bézier curves because despite the points are indeed weighted as desired, the curve is no longer a polynomial but a fractional polynomial. Therefore these curves are called rational Bézier curves and the B-splines is then called rational B-splines.

The consequence is that you gain more flexibility in defining the spline shape. If all weights are equal, the shape of the spline does not change. So the weights relative to each other is important, not the value alone. For example this spline has exactly the same shape as the one in the first image:

[[File:sketcher_BSplineWeightDouble.png|468px]]
{{Caption|Same B-spline as in first image but with different absolute weight values}}

A weight of zero would be a singularity in the equation to calculate the rational Bézier curves, therefore FreeCAD assures that it cannot become zero. Nevertheless, small values have the same effect as if the control point would almost not exist:

[[File:sketcher_BSplineWeightZero.png|468px]]
{{Caption|Same B-spline with an almost zero weight control point}}

==Changing Weights==

How to change weights is described in [[B-Splines#Changing_the_Weight|this Wiki page]].


{{Docnav
|[[Sketcher_BSplineKnotMultiplicity|Show/hide B-spline knot multiplicity]]
|[[Sketcher_BSplineApproximate|Convert geometry to B-spline]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_BSplineKnotMultiplicity.svg
|IconL=Sketcher_BSplineKnotMultiplicity.svg
|IconR=Sketcher_BSplineApproximate.svg
|IconR=Sketcher_ArcOverlay.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}

Revision as of 19:03, 23 April 2024

Szkicownik: Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej

Lokalizacja w menu
Szkic → Wygląd w szkicowniku → Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej
Środowisko pracy
Szkicownik
Domyślny skrót
brak
Wprowadzono w wersji
0.17
Zobacz także
Komponent utwórz krzywą złożoną

Opis

Narzędzie Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej pokazuje lub ukrywa wagę punktu kontrolnego krzywej złożonej we wszystkich szkicach.

Liczby (zielone, w nawiasach kwadratowych) odnoszą się do wag punktów kontrolnych.

Użycie

  1. Istnieje kilka sposobów wywołania narzędzia:
    • Naciśnij przycisk Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej.
    • Wybierz z menu Szkic → Widok szkicu → Pokaż / ukryj warstwę informacyjną krzywej złożonej → Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej.

Zmiana wag

Sposób zmiany wag jest opisany na stronie przedstawiającej Krzywe złożone.