Sketcher: A way of drawing tangents to B-Splines

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
jruiz
Posts: 385
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Sketcher: A way of drawing tangents to B-Splines

Post by jruiz »

I have uploaded a video showing a workaround for getting the tangent to a B-Spline at a given point:
Tangent to B-Spline.

phpBB [video]

I was wondering If the involved calculations could be used to add this feature to Constrain tangent tool of the Sketcher.

PS: An extended Spanish version of the video can be watched in the following:
Solution to problem 4
phpBB [video]

Where, apart from my solution to tangent to B-Spline there are two another ones from two user of Telegram's Spanish group of FreeCAD.
Last edited by jruiz on Tue Jun 21, 2022 12:53 pm, edited 4 times in total.
I have uploaded some FreeCAD video tutorials to
my channel at Odysee. If you don't have an account at LBRY, follow this invitation .
Most of the videos can be watched at my channel of youtube
NewJoker
Veteran
Posts: 1162
Joined: Sun Oct 11, 2020 7:49 pm

Re: Sketcher: A way of drawing tangents to B-Splines

Post by NewJoker »

Thank you for sharing this. There was a discussion about workarounds for this limitation here: https://forum.freecadweb.org/viewtopic.php?f=3&t=67197

Maybe you know the practical differences between endpoint tangency and tangency to B-spline edge ? In which cases is endpoint tangency not sufficient and tangency to B-spline edge must be utilized (with a workaround like this) ?
User avatar
jruiz
Posts: 385
Joined: Tue Oct 28, 2014 1:07 pm
Contact:

Re: Sketcher: A way of drawing tangents to B-Splines

Post by jruiz »

NewJoker wrote: Tue Jun 21, 2022 10:48 am Thank you for sharing this. There was a discussion about workarounds for this limitation here: https://forum.freecadweb.org/viewtopic.php?f=3&t=67197

Maybe you know the practical differences between endpoint tangency and tangency to B-spline edge ? In which cases is endpoint tangency not sufficient and tangency to B-spline edge must be utilized (with a workaround like this) ?
I don't know exactly the difference you are looking for. But I will allow myself to speculate on this:
Maybe that knowing the math form of the B-Spline in addition to the coordinates at the endpoints ease the calculation of tangent lines there. I suppose that when in the edge at an "arbitrary" point, an interpolation has to be done. This would require to know the values of the coefficients defining the B-spline at that region which depend on the nodes "beside" that "arbitrary" point.
I have uploaded some FreeCAD video tutorials to
my channel at Odysee. If you don't have an account at LBRY, follow this invitation .
Most of the videos can be watched at my channel of youtube
adrianinsaval
Veteran
Posts: 3080
Joined: Thu Apr 05, 2018 5:15 pm

Re: Sketcher: A way of drawing tangents to B-Splines

Post by adrianinsaval »

interesting method, I don't see the need for making a separate sketch with a closed profile for extruding though since directly extruding the standalone spline would have worked too.

Edit: actually I just checked and you can even get away with just making a subshapebinder for the cut, much cleaner tree and possibly more resilient to toponaming problem. A sinlge sketch is not accepted for the persistent cut though, @uwestoehr is this an artificially imposed limitation? I would think so considering the cut of just the binder works, perhaps we should consider removing it.
Attachments
splineTangent.FCStd
(12.23 KiB) Downloaded 2 times
Post Reply