Another approach to assembly solver (A2plus)
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Another approach to assembly solver (A2plus)
There isn't one within this form.
In case of help requests, i usually provide these two links:
1) Documentation, which is always up to date: https://freecadweb.org/wiki/A2plus_Workbench
2) A video with the basic A2plus workflow, the gripper assembly tutorial: https://www.youtube.com/watch?v=QMxcQ5tssWk
I think i will prepare a basic tutorial including all necessary parts at Github next time.
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
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
Re: Another approach to assembly solver (A2plus)
This is cool but the only thing that is cringe-worthy is the amount of superfluous mouse clicks and dragging are employed by the user. Notice how the Constraint dialog keeps getting moved by the user.
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
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
Re: Another approach to assembly solver (A2plus)
Hi @kbwbe
If i remember correctly this was already discussed to some extent, but i currently don't remember the details. Will therefore just ask. Any chance of making circular edge constraint to work in such scenarios? It is obvious on why it currently doesn't work, no shape.
If i remember correctly this was already discussed to some extent, but i currently don't remember the details. Will therefore just ask. Any chance of making circular edge constraint to work in such scenarios? It is obvious on why it currently doesn't work, no shape.
Any opinion on this?realthunder wrote:
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: Another approach to assembly solver (A2plus)
The key is to be able to find the selected object hierarchy. The following code will print out the current selected object hierarchy and obtain the shape at the correct placement.triplus wrote: ↑Sat Apr 25, 2020 9:44 am If i remember correctly this was already discussed to some extent, but i currently don't remember the details. Will therefore just ask. Any chance of making circular edge constraint to work in such scenarios? It is obvious on why it currently doesn't work, no shape.
Code: Select all
import Part
for sel in Gui.Selection.getSelectionEx('', 0):
for sub in sel.SubElementNames:
print('%s.%s' % (sel.Object.Name, sub))
Part.getShape(sel.Object, sub, needSubElement=True)
Re: Another approach to assembly solver (A2plus)
Thanks for providing the feedback and the code snippet example.
Re: Another approach to assembly solver (A2plus)
Hi @triplus,
basicaly, that's possible. But parts of A2plus have to be redesigned. So the loadSystem() function of the solver must be made capable to handle the more complex object structure. Also all code which relates to selections has to be replaced by something like the code snippet of @realthunder, shown above.
Doing so, this will end up in a new WB which probably will not be compatible with the "old" A2plus.
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
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
Re: Another approach to assembly solver (A2plus)
kbwbe, I changed more in the "a2p_solversystem" I took and added some more ideas for checking constraints and stuck everything in the a2p_solversystem file. After finding the first constraint it checks every constraint on that part to see which is causing the conflict. I probably missed something but I think the basic concept is there. I also changed the message box so a person can check constraints without closing the form. We can also copy paste the names to another file.
Just drop the a2p_solversystem.py in and start you Rubics cube.
PS. save a backup first.
Dan.
I hope this works.
Just drop the a2p_solversystem.py in and start you Rubics cube.
PS. save a backup first.
Dan.
I hope this works.
- Attachments
-
- Solver picture.JPG (23.59 KiB) Viewed 2113 times
-
- a2p_solversystem.py
- (35.62 KiB) Downloaded 54 times
Re: Another approach to assembly solver (A2plus)
Thanks for the explanation and i guess i see the dilemma. A lot of work involved and hard to maintain the backwards compatibility. As i currently use A2plus the most, for my assembly needs, workflow without using Links it is then.kbwbe wrote: ↑Sun Apr 26, 2020 9:28 am Hi @triplus,
basicaly, that's possible. But parts of A2plus have to be redesigned. So the loadSystem() function of the solver must be made capable to handle the more complex object structure. Also all code which relates to selections has to be replaced by something like the code snippet of @realthunder, shown above.
Doing so, this will end up in a new WB which probably will not be compatible with the "old" A2plus.
Re: Another approach to assembly solver (A2plus)
Hi Dan,dan-miel wrote: ↑Sun Apr 26, 2020 11:54 am I changed more in the "a2p_solversystem" I took and added some more ideas for checking constraints and stuck everything in the a2p_solversystem file. After finding the first constraint it checks every constraint on that part to see which is causing the conflict. I probably missed something but I think the basic concept is there.
thanks for all your work. I took up your ideas and implemented a new command to A2plus, in order to find the conflicting constraints.
Updating to new version A2plus V0.4.47, you will find this new button:
This command solves the constraints one after another and is showing the first conflicting constraint which can be deleted instantly, if wanted.
I hope it works.
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
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