Reimplementing constraint solver

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Call for team! Reimplementing constraint solver

Post by DeepSOIC »

Implemented:
* ParameterStore
* ParameterRef
(with equality-constraint support by redirection)
* ParameterSet
* ValueSet

Next up: base classes for constraints.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Call for team! Reimplementing constraint solver

Post by Kunda1 »

DeepSOIC wrote: Sun Nov 10, 2019 10:59 pm Implemented:
....
Next up: base classes for constraints.
Woohoo!
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
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Call for team! Reimplementing constraint solver

Post by Zolko »

DeepSOIC wrote: Sun Nov 10, 2019 10:59 pm Next up: base classes for constraints.
DeepSOIC wrote: Thu Oct 31, 2019 9:10 pm 9. use in assembly workbench
How do you intend to represent the constraints ?
What sort of FreeCAD/Python object do you plan to use ?
Do you think that App::FeaturePython objects could suit your needs ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Call for team! Reimplementing constraint solver

Post by DeepSOIC »

Zolko wrote: Mon Nov 11, 2019 12:01 pm How do you intend to represent the constraints ?
An object that provides an error function with derivative information.
Zolko wrote: Mon Nov 11, 2019 12:01 pm What sort of FreeCAD/Python object do you plan to use ?
Base class. It will be up to the "user" (i.e., sketcher/assembly developer) to formulate DocumentObject-based variant.

I plan introducing a python-extendable variant of a constraint, something like ConstraintPython, to work similarly to how App::FeaturePython works in terms of how it is extended by python (i.e., by means of a Proxy object)
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Call for team! Reimplementing constraint solver

Post by triplus »

Finally! Been waiting for something like that, since that now legendary assembly video. Especially as it looks like the effort, a traditional assembly solver, was put on a halt, half a decade back:

https://forum.freecadweb.org/viewtopic. ... 02#p344274

Much of what you wrote makes sense. Things like being able to introduce an addition relation in another workbench. Running multiple (Sketcher) solvers on different cores, sounds fun, not sure if practical. But this was mentioned in the past a few times already. Therefore if you have interest in making it happen, for sure, why not.

P.S. Likely this is a multi-year effort, though.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Call for team! Reimplementing constraint solver

Post by triplus »

How far away do you believe you are, demonstrating (pre-alpha version) one assembly relation? I feel that if you could demosntrate that in sensible amount of time and in code, that should attract developers.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Call for team! Reimplementing constraint solver

Post by DeepSOIC »

triplus wrote: Fri Nov 15, 2019 9:06 pm How far away do you believe you are, demonstrating (pre-alpha version) one assembly relation? I feel that if you could demosntrate that in sensible amount of time and in code, that should attract developers.
Halfway there, probably. But I'm slowing down, unfortunately.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Call for team! Reimplementing constraint solver

Post by triplus »

OK, i will read that as we are in trouble.

What if you would, for now, remove goals, such as to improve current Sketcher solver, to run multiple Sketcher solvers at the same time, 3D Sketcher ... And the only goal remaining would be to demonstrate one assembly relation (pre-alpha version). Would that be doable in reasonable amount of time and before you reach an on halt state?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Call for team! Reimplementing constraint solver

Post by DeepSOIC »

triplus wrote: Fri Nov 15, 2019 10:17 pm What if you would, for now, remove goals, such as to improve current Sketcher solver
That's pointless, isn't it? The whole point of me doing it started as a "improve the solver" initiative. Making good py interface is taking a lot of effort, possibly a good 70% of it :x


triplus wrote: Fri Nov 15, 2019 10:17 pm3D Sketcher
3D sketcher goal isn't getting in the way, it's mostly an extensive growth.


triplus wrote: Fri Nov 15, 2019 10:17 pm to run multiple Sketcher solvers at the same time,
There is quite a lot of stuff done in the direction. Revising this point is going to further slow me down at this point, I think.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Call for team! Reimplementing constraint solver

Post by triplus »

The way i see it, you have a basic idea sorted out, on how you will try to tackle each of this areas. All of them are in my opinion noble goals and would benefit FreeCAD greatly. What i guess i am asking is, would it be possible to demonstrate in code, one assembly relation (pre-alpha version). It doesn't have to have Python interface for now. That would in my opinion be the breakthrough we need.
Post Reply