New Wiki page describing B-splines

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

New Wiki page describing B-splines

Post by uwestoehr »

I created a new Wiki page:

https://wiki.freecadweb.org/B-Splines

that
* explains what B-splines are
* how one can use them in FreeCAD
* shows some use cases

I hope this helps especially new users.

Every constructive comment is welcome.

For developers the section https://wiki.freecadweb.org/B-Splines#Limitations might be interesting. I know that ironing out the limitations is not easy, but maybe there are some libraries around that actually provide e.g. the calculation of a tangential to a spline.

abdullah wrote: .
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: New Wiki page describing B-splines

Post by onekk »

At a first glance it seems very weel explained, impressive are the animations, explanation is clear (after a quick reading).

Well done!

It lacks of a part describing scripting, it wil be very useful, expecially if it is taylored on Part WB, as it is more near the OCCT implmentation.


Regards.

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: New Wiki page describing B-splines

Post by abdullah »

uwestoehr wrote: Sat Jun 05, 2021 4:06 pm For developers the section https://wiki.freecadweb.org/B-Splines#Limitations might be interesting. I know that ironing out the limitations is not easy, but maybe there are some libraries around that actually provide e.g. the calculation of a tangential to a spline.
The problem are not static calculations. In fact, the solver, unlike for any other geometry, relies on OCCT for calculation of the B-Spline. The solver only sees points (control points, i.e. poles). That is the problem. What is needed is to implement in the solver the parametric calculation of the B-Spline along with all its partial derivatives, then implement the constraints (such as point on object) where they need to be geometry specific. DeepSOIC has given it a thought:
Thanks. You reminded me that I need to come up with an n-th derivative algorithm for b-spline, with parameter derivative support. That's like d2x(t)/(dt dp), d3x(t)/(dt2dp), and so on...
He also posted another post where he asked help for a discussion, which he did not get (and which I cannot find...)

Personally, I have not found time to undertake this yet.
Last edited by Kunda1 on Sun Jun 06, 2021 12:25 pm, edited 1 time in total.
Reason: fixed broken bbcode
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: New Wiki page describing B-splines

Post by UR_ »

under Limitations you wrote:
4. You cannot create an offset curve for a B-spline using the tool Draft Offset.
This sounds a little bit desperately :(

Perhaps you can add:
Please use Part 2D Offset instead
;)
User avatar
jonasb
Posts: 162
Joined: Tue Dec 22, 2020 7:57 pm

Re: New Wiki page describing B-splines

Post by jonasb »

abdullah wrote: Sun Jun 06, 2021 5:33 am He also posted another post where he asked help for a discussion, which he did not get (and which I cannot find...)
Are you referring to this endeavour: https://forum.freecadweb.org/viewtopic.php?f=20&t=40525
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: New Wiki page describing B-splines

Post by uwestoehr »

UR_ wrote: Sun Jun 06, 2021 6:29 am Perhaps you can add:
Please use Part 2D Offset instead
;)
This does not help. At least in my use cases I need the offset spline within the same sketch. With Part's 2D offset I can only offset the whole sketch and I never had a use case where this helps.

But in general the Sketcher WB should offer an offset tool -> I know the whishlist is long, therefore I don't complain but continue to contribute :ugeek:
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: New Wiki page describing B-splines

Post by uwestoehr »

abdullah wrote: Sun Jun 06, 2021 5:33 am
DeepSOIC wrote: Fri Jun 08, 2018 11:54 pm You reminded me that I need to come up with an n-th derivative algorithm for b-spline, with parameter derivative support. That's like d2x(t)/(dt dp), d3x(t)/(dt2dp), and so on...
He also posted another post where he asked help for a discussion, which he did not get (and which I cannot find...)

Personally, I have not found time to undertake this yet.
Many thanks that you are aware of this. Since the post from DeepSOIC is 3 years old, maybe he already worked on this or would like to?
-> inviting DeepSOIC

DeepSOIC wrote: .
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: New Wiki page describing B-splines

Post by DeepSOIC »

well, the nth derivatives were halfway there when i abandoned constraintsolver. As for offset bspline in sketcher, i'm not sure. I've heard that an offset spline is possible, though it will be of a higher degree. I suppose, if general constraints to bspline become a reality, it will be possible do knock out an approximation of an offset spline with just these regular constraint, something like constrain the distance between them at all knots for example.
User avatar
Vincent B
Veteran
Posts: 4733
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: New Wiki page describing B-splines

Post by Vincent B »

Great job!
Limitations
At the moment (FreeCAD 0.19) there are some limitations when using splines you should know:
You cannot set tangential constraints.
...
but can be got around with several bspline. ;)
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: New Wiki page describing B-splines

Post by abdullah »

jonasb wrote: Sun Jun 06, 2021 11:33 am
abdullah wrote: Sun Jun 06, 2021 5:33 am He also posted another post where he asked help for a discussion, which he did not get (and which I cannot find...)
Are you referring to this endeavour: https://forum.freecadweb.org/viewtopic.php?f=20&t=40525
Not that one. But, there might be a link to the one I refer hidden in it.
Post Reply