Sketcher: Bezier curves

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Sketcher: Bezier curves

Post by Jee-Bee »

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.
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Sketcher: Bezier curves

Post by microelly2 »

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:
Image
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
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Sketcher: Bezier curves

Post by Jee-Bee »

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

Re: Sketcher: Bezier curves

Post by microelly2 »

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.
Post Reply