B-Spline Constraints: Fully Funded! Thanks everybody!

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:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by uwestoehr »

chrisb wrote: Tue Aug 16, 2022 6:08 pm I like Beziers which I know from Inkscape, but I haven't seen any request for years to add them to the Sketcher.
You can already create Bézier curves:
- add a spline consisting of 3 points (start, end, and a control point). The result is a quadratic Bézier curve.
- add a spline consisting of 4 points. The result is a cubic Bézier curve.
- for higher curve degrees, create a cubic Bézier and increase the degree.

B-splines are mathematically created using another base for some reasons, see
https://wiki.freecadweb.org/B-Splines#Basis
for more details, but the result is nevertheless a Bézier. You can check this out using a math program. Create a quadratic B-Spline and Bézier using the same point coordinates and the curve follows the same path.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by jnxd »

uwestoehr wrote: Thu Sep 01, 2022 8:56 pm
- for higher curve degrees, create a cubic Bézier and increase the degree.
You can also press D when making the spline, enter the degree, and put degree+1 points.

Indeed going forward I am inclined to work by treating these "minimal" b-splines as bezier curves, so that there is no need to implement them separately.
My latest (or last) project: B-spline Construction Project.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by jnxd »

CODING UPDATE: 03 September 2022

Development on knot-constraints has been slow this week, but I just fixed a major issue: driving constraints can now be set on knots.
fully-constrained-sketch-with-knot-constraints.png
fully-constrained-sketch-with-knot-constraints.png (37.19 KiB) Viewed 59550 times
vase-with-knot-constraints.FCStd
(10.73 KiB) Downloaded 39 times
You can test the feature now by building from the relevant branch on my fork (or, Linux users can install the snap following these instructions). Let me know if this by itself satisfies a use-case, or if there is something more needed (like tangency at knots, non-uniform knots, etc).

Known Issues:
  1. Start point of a periodic b-spline (which is also end point) cannot be dragged, and any constraints set on this point will fail. [EDIT 7 Sep 2022: This is now resolved]
  2. The "Toggle driving" command can turn any constraint on knots into reference, but cannot make them driving (this is not unique to knots).
  3. Of course, rational B-splines are still not supported yet.
Last edited by jnxd on Wed Sep 07, 2022 9:40 am, edited 3 times in total.
My latest (or last) project: B-spline Construction Project.
chrisb
Veteran
Posts: 53939
Joined: Tue Mar 17, 2015 9:14 am

Re: B-Spline Constraints: Looking for Crowdfunding

Post by chrisb »

Congrats for this very remarkable step!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by jnxd »

chrisb wrote: Fri Sep 02, 2022 10:09 pm Congrats for this very remarkable step!
Thanks! please give it a go if you have a project that could use this.
My latest (or last) project: B-spline Construction Project.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: B-Spline Constraints: Looking for Crowdfunding

Post by Kunda1 »

Snap build in progress for testing purposes. Once build is complete, install instructions will be added here.

Edit: https://github.com/FreeCAD/FreeCAD-snap ... 1236113658
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
marthinwurer
Posts: 24
Joined: Thu Sep 06, 2018 10:29 am

Re: B-Spline Constraints: Looking for Crowdfunding

Post by marthinwurer »

Fantastic, this feature will open a lot of doors. I just threw $100 in the pot on github sponsors, and I'll throw more in with my next paycheck. My main goal is to be able to define airfoils from points to be able to 3d print RC planes and model rockets. I'll test out that snap and see how it goes!
user1234
Veteran
Posts: 3345
Joined: Mon Jul 11, 2016 5:08 pm

Re: B-Spline Constraints: Looking for Crowdfunding

Post by user1234 »

Nice!

Greetings
user1234
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by jnxd »

marthinwurer wrote: Sat Sep 03, 2022 9:16 pm Fantastic, this feature will open a lot of doors. I just threw $100 in the pot on github sponsors, and I'll throw more in with my next paycheck. My main goal is to be able to define airfoils from points to be able to 3d print RC planes and model rockets. I'll test out that snap and see how it goes!
Thanks, @marthinwurer! Your post back in July was the last thing to inspire me to start this crowd funding, so your support means a lot. Please do not feel compelled to sponsor any more than you had planned.
My latest (or last) project: B-spline Construction Project.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: B-Spline Constraints: Looking for Crowdfunding

Post by jnxd »

FUNDING UPDATE: 6 September 2022

Another Tuesday another update

Since the release, I have received:

Github:
One time: $235
Monthly: $7

Liberapay: $89 + €170 = ~$259

Additional:
Pledged: $200 (upon implementation progress towards stage 2) + €250

All in all, this amounts to up to ~$965/$3000 towards this project, assuming it takes 3 months to complete.

Just $35 to reach $1000! A couple people have mentioned they plan to donate shortly, so that sounds like a win. Which is just about time: barring any bugs, I expect to be able to support rational B-splines by the end of next week, at which point it will be ready for PR.
My latest (or last) project: B-spline Construction Project.
Post Reply