Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver

Post by kbwbe »

@tripuls,

found some bugs in fixed them. Find attached latest version a3-0.0.1. In my test, new version could solve the problematic file. Perhaps you have to flip plane-constraint with align/opposed options.
I also deactivated the projectFolder stuff.

Hi to all others,
find here attached a new version of my "assembly2relaunched"

System requirements now:
- for fc0.16
- Win and Linux should work (Win not tested, do not have a machine, but all Linux-specific stuff is removed)

How to work with:
- Just copy extracted folder to your mod-folder
- start fc0.16
- find a3-Symbol within available workbenches
- activate a3
- do work analog to assembly2 (best test it with all your fcstd-files newly created)
- use the symbol with the two champagner-glasses to make your assembly transparent and check it always

Enjoy (I hope...)

Limitations:
- before setting of an constraint, orient the new part nearly correct for placing ( helps solver to find correct solutions)
- if constraints are not solvable, atm you will get a wrong solution without warning and undo-function. (save your file often)
- solver atm only does 3000 steps to find a solution, ignoring the reached accuracy. Hitting solve-button more than once will increase accuracy
- atm only 3 type of constraints

Future:
- adjust solver-steps to required accuracy
- give warning if not model is not solvable
- undo of the last solvingprocess
- more constraints
- move to fc0.17

thanks for downloading and testing..

kbwbe
Attachments
a3-0.0.1.zip
(271.62 KiB) Downloaded 143 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Another approach to assembly solver (assembly2relaunch)

Post by triplus »

If i understand you correctly you likely are interested in this area and the interest could lead to more long term development? Will you port your solver/workbench to work with Py3/Qt5? I am asking as we are trying to figure out the situation regarding Assembly 2 workbench (has no active maintainer ATM). And maybe somehow you and your solver/workbench can play a role and lead to a viable solution.
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Post by kbwbe »

@triplus

that's correct. I intend to do some more work on this workbench. My efforts should result to a simple, easy to use assembly-workbech, based on hamish's work. I need such a workbench and want to control its stability and features for long term usage.
I also prefer a pure python standalone workbench, so that i do not to have to dive into the C++ Code of FreeCAD.

Shure i have to switch from fc0.16 to the newer ones and will try. Within some time, fc0.16 will be obsolete.

Porting the solver to Py3 should not be a very big problem. The code is not very big and simple. Most work is to get solver running at all.
Qt5 is more difficult to me. Until now i did no project with PyQt anyway.
Perhaps i need some help. Up to this point i only analysed Hamish's code to reach this state of my workbench now.

P.S. I do not intend to maintain the old assembly 2 workbench, as my version is to far away now. I only invest time into the new variant.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Another approach to assembly solver (assembly2relaunch)

Post by triplus »

Sounds good.

You shouldn't have much (likely none) issues with Py3/Qt5 port (as long as you are interested in supporting it). Likely you should have a repository somewhere as "ZIP" approach will quickly start to show its limitations. As for FreeCAD end users using Assembly 2 workbench and for it to potentially stop working (Py3/Qt5). I guess now there will be another option to try out and migrate. Some sensible workbench name i guess wouldn't hurt. That depends if you want to position yourself as Assembly 2 successor (to maybe add an addition letter to it for it not to be too long) or maybe something like Assembly 4 or something totally unrelated but unique. As Assembly 3 workbench domain name is already taken. ;)

Good luck!
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Post by kbwbe »

I already noticed that my workbench-naming is conflicting with RealThunder's work. (which is great)
Have to think about new naming.

Any good tip where to locate a repo (without costs) ? Microsoft's GITHUB ? :(
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (assembly2relaunch)

Post by easyw-fc »

kbwbe wrote: Tue Jun 12, 2018 9:32 pm I already noticed that my workbench-naming is conflicting with RealThunder's work. (which is great)
Have to think about new naming.
What about A2+ or A2plus :D
kbwbe wrote: Tue Jun 12, 2018 9:32 pm Any good tip where to locate a repo (without costs) ? Microsoft's GITHUB ? :(
GitHub is still free, but you can consider bitbucket or gitlab
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Post by kbwbe »

thanks for the tips. :D
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Post by kbwbe »

Before going on developing new features and a placing a new version, I did a quick-test with newest freecad-daily.

I cannot see constraints in object tree anymore. (they are created via featurepython). Within freecad-0.17 they are show, but not correct sorted.

What ist changing there form 0.16 -> 0.17 ->0.18 ? Any ideas ?
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (assembly2relaunch)

Post by easyw-fc »

kbwbe wrote: Thu Jun 14, 2018 6:51 am Before going on developing new features and a placing a new version, I did a quick-test with newest freecad-daily.

I cannot see constraints in object tree anymore. (they are created via featurepython). Within freecad-0.17 they are show, but not correct sorted.
1) I strongly would suggest you to enable 'Report View' to see errors when loading/using the WB
2) I changed your code:

Code: Select all

from PyQt4 import QtGui,QtCore
to

Code: Select all

from PySide import QtGui, QtCore
in
a3_versionmanagement.py and a3_toponamer.py
then the WB should work fine ;)
kbwbe wrote: Thu Jun 14, 2018 6:51 am What ist changing there form 0.16 -> 0.17 ->0.18 ? Any ideas ?
a lot of stuff... but with often small modifications you can manage the changes...

PS I would suggest you to change the WB name from A3 to i.e. A2plus o similar, because, as you already noticed, A3 is already adopted by the new Assembly FC branch...
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Post by kbwbe »

Hello Maurice, tx for quick answer.
Will rename wb with next version. If i see a point where the wb is ready for real public testing, i will migrate to github.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.56, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Post Reply