B-Spline improvements

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

Re: B-Spline improvements

Post by microelly2 »

looo wrote: Thu Jun 07, 2018 9:39 am short question:
what are the benefit of this method over a pice-wise bspline of degree3 which is already doable with the gui?
If i have complex objects it is easier to have only one curve than many pices.
inserting a knot allows to define new segments where local deformations can start.
bp_794.png
bp_794.png (68.86 KiB) Viewed 617 times
In the example the middle curves of the blue and red strips are sketcher splines.
there is a syncronization between the red and the blue sketches in background
to edit the surface I can decide which sketch I want to modify.
For a refinement I add a strip and than I edit the sketch.
the borders of the strips hold the local tangent conditions. My idea for them is to bend and stretch them by a graphical "joystick" feature
User avatar
hammax
Veteran
Posts: 1995
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: B-Spline improvements

Post by hammax »

… one year later:
When I see, what you can do with sketcher constraints
https://forum.freecadweb.org/viewtopic.php?f=8&t=37197
my hope is, that there is a way to make visible points, especially the knot points in BSpline outside SketcherWB.
(what's possible with seedpoint, could also be possible with other regular points ???)
I am working very often with sketcher bsplines and sometimes it could be useful to snap some knot points
or have them as "seed-line" e.g. in a loft.
Until now knot points are barely useless, as long as I don't apply the special tools to change multiplicity a.s.o.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: B-Spline improvements

Post by abdullah »

hammax wrote: Wed Jun 26, 2019 12:40 pm … one year later:
When I see, what you can do with sketcher constraints
https://forum.freecadweb.org/viewtopic.php?f=8&t=37197
my hope is, that there is a way to make visible points, especially the knot points in BSpline outside SketcherWB.
(what's possible with seedpoint, could also be possible with other regular points ???)
I am working very often with sketcher bsplines and sometimes it could be useful to snap some knot points
or have them as "seed-line" e.g. in a loft.
Until now knot points are barely useless, as long as I don't apply the special tools to change multiplicity a.s.o.
The main limitation to that is that the sketcher points are limited to be non-defining (construction if you wish) in the current implementation. It is not straightforward to change this behaviour.

However, what you want can be done with Python (ask MicroElly ;) ), or with his arrangement.

Make a carbon copy of your sketch with the B-Spline in a new sketch, so that the B-Spline is construction. Now make a normal line segment with at least one endpoint coincident with con knot (yes, there is a very special arrangement by which you can make a coincidence constraint on a knot). Now, if you move the construction b-spline, the knot follows. You can now exit edit mode and use the endpoint of the normal line segment you just entered.
Post Reply