Reimplementing constraint solver

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Reimplementing constraint solver

Post by triplus »

Thanks for the report and indeed, best if you take a break for a while. Next development cycle will likely be FreeCAD 1.0 oriented and your work should fit nicely in it. Further thinking about it, you basically need to first re-implement all the 2D functionality, before tackling things like the 3D point-point distance constraint.

It's done when it is done, as for future planning. I somehow feel that the maximum amount of time, dedicated to FreeCAD 1.0 development cycle, should be 2 years. If in such time, or before, FreeCAD geometric constraints solver gets support for standard set of 3D constraints, then congratulation up front, to everybody that will participate in achieving such goal. If not, then likely it will take a couple of years more anyway, and whatever gets done on the improving 2D and extending to 3D side of things, still should be a nice foundation for the future.
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Reimplementing constraint solver

Post by adrianinsaval »

Responding here to your post in this thread to avoid offtopic, sorry if it doesn't belong here either
DeepSOIC wrote: Tue Feb 11, 2020 2:11 pm EDIT: constraints in the middle of the spline are not supported at all, so far. Only on endpoints.
Is there any particular reason for this? would you be implementing this in your solver?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Reimplementing constraint solver

Post by DeepSOIC »

adrianinsaval wrote: Tue Feb 11, 2020 11:12 pm would you be implementing this in your solver?
Hopefully.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Reimplementing constraint solver

Post by abdullah »

DeepSOIC wrote:...
What an effort!! :o

Due to family matters I have not looked into the forum for almost a year, so finding this thread on top of my notifications today has been quite a surprise.

I have read through it. Yes the book is the one by Nocedal.

https://forum.freecadweb.org/viewtopic. ... al#p299499

I have the book in paper. A pdf version is running online.

Coincidentally, last summer I read half of that book, which is rather heavy for my math level. I intended to review the sketcher implementation.

In my mind was also the possibility of implementing multithreading to speed up solving. My approach was first to profile some use cases (mostly based on the size of the sketcher, and with focus in big sketches were a reasonable improvement should be achievable).

1) From a theoretical point of view, it is possible to speed up multithreading by using a multithreading option for Eigen for sparseQR decomposition. However, the options that were available at the time involved GPL code (as opposed to LGPL).

2) After "diagnose", there is this decoupling in subsystems, which I think could be solved in parallel. However, profiling should tell whether it makes sense at all.

I am now trying to reintegrate into FreeCAD. It will go slowly though...

If you need input from me just let me know, but you are simply better than me :)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Reimplementing constraint solver

Post by DeepSOIC »

abdullah wrote: Thu Mar 05, 2020 6:32 am Due to family matters I have not looked into the forum for almost a year, so finding this thread on top of my notifications today has been quite a surprise.
Glad you're back! I hope your family is all right!

abdullah wrote: Thu Mar 05, 2020 6:32 am multithreading
As you may have noticed, I somewhat screwed up the possibility of multithreading in ConstraintSolver by using PyHandle everywhere. It was necessary to allow python-defined constraints (which are not implemented yet). Not all hope is lost, but now it seems easier with current sketcher solver.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Reimplementing constraint solver

Post by openBrain »

abdullah wrote: Thu Mar 05, 2020 6:32 am I am now trying to reintegrate into FreeCAD. It will go slowly though...
Welcome back. Hope everything's fine now for you & your family. We have a ton of low hanging fruits for you. :P (sorry for kind of hijacking)
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Reimplementing constraint solver

Post by Kunda1 »

abdullah wrote: Thu Mar 05, 2020 6:32 am I am now trying to reintegrate into FreeCAD. It will go slowly though...
Welcome back, abdullah! Hope things are going well for you and yours. You were missed :D
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
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Reimplementing constraint solver

Post by chrisb »

What the others said.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Reimplementing constraint solver

Post by abdullah »

Kunda1 wrote: Thu Mar 05, 2020 7:09 pm Welcome back, abdullah! Hope things are going well for you and yours. You were missed :D
chrisb wrote: Thu Mar 05, 2020 9:31 pm What the others said.
openBrain wrote: Thu Mar 05, 2020 3:45 pm Welcome back. Hope everything's fine now for you & your family. We have a ton of low hanging fruits for you. :P (sorry for kind of hijacking)
DeepSOIC wrote: Thu Mar 05, 2020 9:36 am Glad you're back! I hope your family is all right!
Thanks for your support. It is nice to find you here too. I have missed you. :D
User avatar
Chris_G
Veteran
Posts: 2598
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Reimplementing constraint solver

Post by Chris_G »

Welcome back, Abdullah !

@DeepSOIC, in BSpline interpolation, we have to solve a system of linear equations to compute the poles.
Will it be possible to use this solver in that context, outside of the sketcher ?
Post Reply