Difference between revisions of "Sketcher BSplinePoleWeight"
m (→Explanation) |
|||
Line 7: | Line 7: | ||
|[[Sketcher_Workbench|Sketcher]] | |[[Sketcher_Workbench|Sketcher]] | ||
|IconL=Sketcher_BSplineKnotMultiplicity.svg | |IconL=Sketcher_BSplineKnotMultiplicity.svg | ||
+ | |IconR=Sketcher_BSplineConvertToNURB.svg | ||
|IconC=Workbench_Sketcher.svg | |IconC=Workbench_Sketcher.svg | ||
− | |||
}} | }} | ||
Line 14: | Line 14: | ||
{{GuiCommand | {{GuiCommand | ||
|Name=Sketcher BSplinePoleWeight | |Name=Sketcher BSplinePoleWeight | ||
− | |||
|MenuLocation=Sketch → Sketcher B-spline tools → Show/Hide B-spline control point weight | |MenuLocation=Sketch → Sketcher B-spline tools → Show/Hide B-spline control point weight | ||
+ | |Workbenches=[[Sketcher_Workbench|Sketcher]] | ||
|Version=0.19 | |Version=0.19 | ||
− | |SeeAlso=[[Sketcher_CompCreateBSpline|Create B-spline]] | + | |SeeAlso=[[Sketcher_CompCreateBSpline|Sketcher Create B-spline]] |
}} | }} | ||
Line 89: | Line 89: | ||
|[[Sketcher_Workbench|Sketcher]] | |[[Sketcher_Workbench|Sketcher]] | ||
|IconL=Sketcher_BSplineKnotMultiplicity.svg | |IconL=Sketcher_BSplineKnotMultiplicity.svg | ||
+ | |IconR=Sketcher_BSplineConvertToNURB.svg | ||
|IconC=Workbench_Sketcher.svg | |IconC=Workbench_Sketcher.svg | ||
− | |||
}} | }} | ||
Revision as of 20:46, 2 December 2020
Menu location |
---|
Sketch → Sketcher B-spline tools → Show/Hide B-spline control point weight |
Workbenches |
Sketcher |
Default shortcut |
None |
Introduced in version |
0.19 |
See also |
Sketcher Create B-spline |
Contents |
Description
Shows or hides the display of the weights for the control points of a B-spline curve (see below for an explanation of weights).
B-spline with control point weights displayed in brackets
Same B-spline without weights
Usage
- Select a B-spline and apply.
Explanation
B-splines are basically a combination of Bézier curves (nicely explained in this and this video).
The Bézier curve is calculated using this formula:
n is hereby the degree of the curve. So a Bézier curve of degree n is a polygon with order n. The factors are hereby in fact the coordinates of the Bézier curves' control points. For a visualization see this page.
The term weight in FreeCAD is a bit misleading because in literature the factors 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:
whereby is the weight for the point .
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:
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 ration 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:
Same B-spline with an almost zero weight control point
Creation
Rational B-splines are created by setting a radius for the circles of the control points. That a radius has a unit must hereby ignored, the weight is always the radius in mm (or in the base length unit you set in the preferences). So a radius of 1 µm means a weight of 0.001. By default, meaning on creation time, all circles have the constraint to be equal. For the radius of the circle of the first point FreeCAD automatically sets a size constraint. Since all circles have the same radius, the set value is not important. So after creation you have a non-rational ("normal") B-spline.
To set a weight, remove the equality constraint for the circle of the desired point. You can now drag the circle to see the effect on changing its radius.
But note: to set the weight fix so that further actions won't change it, you must set a size constraint.
- The tools: New sketch, Edit sketch, Leave sketch, View sketch, View section, Map sketch to face, Reorient sketch, Validate sketch, Merge sketches, Mirror sketch
- Sketcher geometries: Point, Line by 2 point, Create an arc, Arc, Arc by 3 Point, Create a circle, Circle, Circle by 3 Point, Create a conic, Ellipse by center, Ellipse by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, Create a B-spline, Create B-spline, Create periodic B-pline, Polyline (multiple-point line), Rectangle, Create regular polygon, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Create Regular Polygon, Slot, Fillet, Trimming, Extend, External Geometry, CarbonCopy, Construction Mode
- Sketcher constraints Scritping Sketcher constraints in Python
- Geometric constraints Coincident, Point On Object, Vertical, Horizontal, Parallel, Perpendicular, Tangent, Equal Length, Symmetric, Constrain Block
- Dimensional constraints Lock, Horizontal Distance, Vertical Distance, Distance, Radius, Internal Angle, Snell's Law, Internal Alignment, Toggle reference/driving constraint,
- Sketcher tools Select solver DOFs, Close Shape, Connect Edges, Select Constraints, Select Origin, Select Vertical Axis, Select Horizontal Axis, Select Redundant Constraints, Select Conflicting Constraints, Select Elements Associated with constraints, Show/Hide internal geometry, Symmetry, Clone, Copy, Move, Rectangular Array, Delete All Geometry, Delete All Constraints
- Sketcher B-spline tools Show/Hide B-spline degree, Show/Hide B-spline control polygon, Show/Hide B-spline curvature comb, Show/Hide B-spline knot multiplicity, Convert Geometry to B-spline, Increase degree, Increase knot multiplicity, Decrease knot multiplicity
- Sketcher virtual space Switch Virtual Space
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties; Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base; Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Points, Raytracing, Reverse Engineering, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Deprecated or unmaintained workbenches: Complete, Drawing, Robot
- Hubs: User hub, Power users hub, Developer hub