## Sketcher: Bezier curves

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Jee-Bee
Posts: 2183
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: Sketcher: Bezier curves

I checked you're videos a bit better...
Indeed the curve goes thru the line but the Bezier line don't go thru all points but only the middle/ end one. The others are still control lines.
As see in my picture a few post back the curve goes thru all points and the control points follow.
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

### Re: Sketcher: Bezier curves

Jee-Bee wrote:
Wed Nov 14, 2018 10:25 am
I checked you're videos a bit better...
Indeed the curve goes thru the line but the Bezier line don't go thru all points but only the middle/ end one. The others are still control lines.
As see in my picture a few post back the curve goes thru all points and the control points follow.
If you want to controll not only the points but the tangent forces too you will need extra points. These are usualy the tangent indicators for beziers
here in inkscape:

If you do not want to use these points you have to make some assumptions on the behaviour of the curve.
Here is an example where I calculate a minimum length bezier on top of a polygon of control points. I use scipy
https://youtu.be/Uu2qIWcTbVE
This is another algorithm which creates useful beziers. The tangents are calculated on base of the neighbour poles.
https://youtu.be/3YdvTzkImrw
Jee-Bee
Posts: 2183
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

### Re: Sketcher: Bezier curves

I guess Creo is doing something similar... Thanks
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

### Re: Sketcher: Bezier curves

Jee-Bee wrote:
Wed Nov 14, 2018 11:53 am
I guess Creo is doing something similar... Thanks
Would be interesting to know the secret algorithms of the Professional CAD systems.