How to use sketcher B-spline tool
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
How to use sketcher B-spline tool
Is there any help/tutorial/info on how to use the B-spline tool in the sketcher workbench. Eg how to add/delete points, how to create a closed curve, how to constrain etc. (Clearly, Im new to FreeCAD)
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: How to use sketcher B-spline tool
Hello PaulWray and welcome to the forum
There are two kinds of BSpines in Sketcher:
the "open" and the periodic/"closed" spline
you can select them from the menu.
To create a spline you start the command and click some control points in the right order
at the end press ESC to get the curve.
there is at the moment no method to add/delete control points.
in such a case you have to recreate the complete spline again.
you only can constraint the position of the controlpoints the same way as you constraint other points.
you can play a bit around and ask if something is not clear.
To get better constraints to the curves I use special methods like Bezier curves . These are not in the core FreeCAD Sketcher.
To get an idea what is possible see
There are two kinds of BSpines in Sketcher:
the "open" and the periodic/"closed" spline
you can select them from the menu.
To create a spline you start the command and click some control points in the right order
at the end press ESC to get the curve.
there is at the moment no method to add/delete control points.
in such a case you have to recreate the complete spline again.
you only can constraint the position of the controlpoints the same way as you constraint other points.
you can play a bit around and ask if something is not clear.
To get better constraints to the curves I use special methods like Bezier curves . These are not in the core FreeCAD Sketcher.
To get an idea what is possible see
Re: How to use sketcher B-spline tool
Thanks. I had not realised that the periodic b-spline meant closed.
Its a very nice tool indeed. I have a lot of questions, but clearly most of these require deep knowledge of the math. Still no harm in asking I guess...
With regard to the weights, it seems that they are only meaningful in relation to each other, correct?. Eg if all weights are the same, the actual value is irrelevant. Similarly, if the weights are different, does increasing/decreasing all weights by a constant multiple leave the curve unchanged?
If you want to approximate a known curve with a given number of control points, is there an optimal manual procedure to adjust the control point positions and weights? (Some sort of least squares analysis would be nice!)
I am guessing that adding an extra control point (keeping weights the same) gives you about the same equivalent increase in curve matching accuracy as does adjusting one weight to be different from the others. Or does adjusting weights give access to different families of curves not accessible otherwise, or confer some specific benefit?
Finally, if you wanted to parametrically describe, or generate, a family of shapes (eg human faces) by using landmarks (eg the tip of the nose), you're starting with points on the curve rather than the control points. It would be great to be able to switch between these representations, if that is possible.
Its a very nice tool indeed. I have a lot of questions, but clearly most of these require deep knowledge of the math. Still no harm in asking I guess...
With regard to the weights, it seems that they are only meaningful in relation to each other, correct?. Eg if all weights are the same, the actual value is irrelevant. Similarly, if the weights are different, does increasing/decreasing all weights by a constant multiple leave the curve unchanged?
If you want to approximate a known curve with a given number of control points, is there an optimal manual procedure to adjust the control point positions and weights? (Some sort of least squares analysis would be nice!)
I am guessing that adding an extra control point (keeping weights the same) gives you about the same equivalent increase in curve matching accuracy as does adjusting one weight to be different from the others. Or does adjusting weights give access to different families of curves not accessible otherwise, or confer some specific benefit?
Finally, if you wanted to parametrically describe, or generate, a family of shapes (eg human faces) by using landmarks (eg the tip of the nose), you're starting with points on the curve rather than the control points. It would be great to be able to switch between these representations, if that is possible.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: How to use sketcher B-spline tool
there are 4 sources you should study:
The Nurbs book by Piegl, Tiller
The nurbs editor thread https://forum.freecadweb.org/viewtopic.php?f=3&t=16473
The curves workbench thread https://forum.freecadweb.org/viewtopic.php?f=8&t=22675
The shoelast thread https://forum.freecadweb.org/viewtopic.php?f=3&t=20525
Yes, weights are very special parameters and should only be changed by operations in background for example projective mappings like stretching operations.With regard to the weights, it seems that they are only meaningful in relation to each other, correct?. Eg if all weights are the same, the actual value is irrelevant. Similarly, if the weights are different, does increasing/decreasing all weights by a constant multiple leave the curve unchanged?
BSplines are simply said projections from the 4 dimensional space to our 3D and the weights are the 4th dimension.
I use for design Bezier Curves which are special cases of BSplines. Inkscape is a good example how to design such drawings.
If you want to approximate a known curve with a given number of control points, is there an optimal manual procedure to adjust the control point positions and weights? (Some sort of least squares analysis would be nice!)
There are some approximations too.
https://youtu.be/wa4K7vodTYM
https://youtu.be/iF29eFrHoFI
Nurbs are very complex data object. We have to look for ways to simply the models. Splitting a face into ribs and meridians (curves) which are editable is a big step. If the ribs can be designed as sketches - real 2D another big step to powerful tools is possible.I am guessing that adding an extra control point (keeping weights the same) gives you about the same equivalent increase in curve matching accuracy as does adjusting one weight to be different from the others. Or does adjusting weights give access to different families of curves not accessible otherwise, or confer some specific benefit?
If we cannot do these simplifications we have to edit the face as a whole. I restarted the work on the nurbs editor and the interface is already very complex, Any controlpoint of a Bezier Surface has 8 neighbors, this means 24 parameters to zoom/stretch, rotate etc.
In most cases the impact of weights is not essential. I only use them for arc approximation.
look through my videos to see what is possible.Finally, if you wanted to parametrically describe, or generate, a family of shapes (eg human faces) by using landmarks (eg the tip of the nose), you're starting with points on the curve rather than the control points. It would be great to be able to switch between these representations, if that is possible.
I've been working on nurbs with FreeCAD for 2 years. Meantime the core methods are very stable.
try your first simple examples and feel free to ask.
Re: How to use sketcher B-spline tool
I will look through the videos and docs you referenced. Thanks so much for taking the time for a complete reply!
Re: How to use sketcher B-spline tool
The quoted post is from 2018. Is there something new in 0.19? Can we add/remove points from a b-spline?microelly2 wrote: ↑Tue Aug 07, 2018 7:16 am
there is at the moment no method to add/delete control points.
in such a case you have to recreate the complete spline again.
Re: How to use sketcher B-spline tool
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: How to use sketcher B-spline tool
First laugh this morning - thanks.
Here is the long version:
"No, we can't."
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: How to use sketcher B-spline tool
… a short comic - hoping it helps. Another way to create a bspline.
(you can delete "knot points" without risk, they are useless and disturb => I do it often)
(you can delete "knot points" without risk, they are useless and disturb => I do it often)
- Attachments
-
- BSpline.FCStd
- FC.18.4
- (4.72 KiB) Downloaded 92 times