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 (A2plus)

Post by kbwbe »

Hi Guy's,

here an demonstration of "toponaming light" of A2p:

I designed a baseplate and another part, which is mounted two times on it. I fixed the parts by circularEdge constraints.
After that, i heavily modified the baseplate and the other part. When i did updateImportedParts, the assembly kept stable and everything looks like expected.
.
See here the original assembly:
.
Before-Edit.png
Before-Edit.png (129.3 KiB) Viewed 1368 times
.
and here the updated one after editing both involved parts:
.
After-Edit.png
After-Edit.png (158.64 KiB) Viewed 1368 times
.
Without use of toponaming, the assembly would sure break.

Files are attached as ZIP, for those who are interested...
Attachments
After-Edit.zip
(121.43 KiB) Downloaded 37 times
Before-Edit.zip
(51.07 KiB) Downloaded 40 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
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

kbwbe wrote: Sat Oct 20, 2018 4:28 pm Hi Guy's,

here an demonstration of "toponaming light" of A2p:

I designed a baseplate and another part, which is mounted two times on it. I fixed the parts by circularEdge constraints.
After that, i heavily modified the baseplate and the other part. When i did updateImportedParts, the assembly kept stable and everything looks like expected.
.
See here the original assembly:
.
Before-Edit.png
.
and here the updated one after editing both involved parts:
.
After-Edit.png
.
Without use of toponaming, the assembly would sure break.

Files are attached as ZIP, for those who are interested...
Hi Klaus,
this is a really good proof of working of your Toponaming/ Topomapping!
Looks great!
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

kbwbe wrote: Sat Oct 20, 2018 4:28 pm Hi Guy's,
here an demonstration of "toponaming light" of A2p:
...
BTW, as you use transparency in these cases for the smaller parts and you use FC 0.18:
When you import the final assembly (as single object .fcstd) into a new assembly file: What does happen to the colors/ transparencies?

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

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

manuelkrause wrote: Sat Oct 20, 2018 5:32 pm BTW, as you use transparency in these cases for the smaller parts and you use FC 0.18:
When you import the final assembly (as single object .fcstd) into a new assembly file: What does happen to the colors/ transparencies?
Very unspectacular, colors where imported, transparency is set manually after import! ;)
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 (A2plus)

Post by kbwbe »

.
Another test with A2p and activated topological naming.

Please find here two screenshots.
- First one with some boxes including a hole and a bolt.
- Second one with box modified by thickness and changed dimensions.

Used constraints: circularEdge, axisCoincident, planesCoincident.

The assembly keeps stable after editing and reimporting the box.
.
Before edit:
Before-Edit.png
Before-Edit.png (110.8 KiB) Viewed 1312 times
.
After edit:
After-Edit.png
After-Edit.png (140.65 KiB) Viewed 1312 times
.
This is the console output for updating the subelements during updateImportParts command:

Code: Select all

oldConstraintString (KEY) : E;Box;12;12;
Updating by SubElement-Map: Edge9 => Edge7 
oldConstraintString (KEY) : E;Box;6;12;
Updating by SubElement-Map: Edge10 => Edge13 
oldConstraintString (KEY) : F;Box;1;6;
Updating by SubElement-Map: Face1 => Face1 
oldConstraintString (KEY) : F;Box;3;6;
Updating by SubElement-Map: Face2 => Face6 
oldConstraintString (KEY) : F;Box;6;6;
Updating by SubElement-Map: Face3 => Face5 
oldConstraintString (KEY) : E;Box;9;12;
Updating by SubElement-Map: Edge5 => Edge10 
oldConstraintString (KEY) : E;Box;4;12;
Updating by SubElement-Map: Edge4 => Edge4 
oldConstraintString (KEY) : E;Pocket;1;3;
Updating by SubElement-Map: Edge8 => Edge11 
oldConstraintString (KEY) : F;Box;2;6;
Updating by SubElement-Map: Face6 => Face7 
oldConstraintString (KEY) : F;Box;3;6;
Updating by SubElement-Map: Face2 => Face6 
oldConstraintString (KEY) : F;Box;5;6;
Updating by SubElement-Map: Face5 => Face3 
Testfiles are attached as ZIP
Attachments
After-Edit.zip
(30.52 KiB) Downloaded 36 times
Before-Edit.zip
(23.52 KiB) Downloaded 35 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
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

kbwbe wrote: Sun Oct 21, 2018 10:48 am .
Another test with A2p and activated topological naming.
(...)
Hi Klaus,
quite a nice evolution of A2plus, I'd say.
I've just re-done my Pleuel file for more simplified overall geometry definitions, thus leaving many earlier constraining points to vanish (sketch changes).
The new devel branch complained about 4 constraints to be fixed, which corresponds to my changes minus 1 change. I've written them down to paper and tried to consecutively fix them. But when I update inbetween I can get several new complaints of failing constraints that were good before (!) and that can be good again after finding the one right culprit constraint.
Still some things depend on too much luck or strategy. I'd attach the new "Pleuel", it should fit in your previous loaded Pleuel-assembly files by measurements.

But the base functionality has greatly improved, no idea, what earlier versions or even Assembly2 would have done...

BR,
Manuel
Attachments
Pleuel-4.fcstd
renewed simplified shape for testing
(39.03 KiB) Downloaded 39 times
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

manuelkrause wrote: Mon Oct 22, 2018 6:56 pm The new devel branch complained about 4 constraints to be fixed, which corresponds to my changes minus 1 change. I've written them down to paper and tried to consecutively fix them.
Hi Manuel,
are you trying to rework an existing assembly in order to use toponaming ?
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 (A2plus)

Post by triplus »

I have seen you are working on TopoNaming features now and therefore assumed solver development likely has matured by now. I had small size project with few parts in need to be assembled. And decided it's time to give A2plus a try again. The experience was straightforward and assembling procedure was achieved in rather fast and robust way. To be honest i am impressed. I didn't have to change a single constraint in the whole procedure. It just worked as i expected it should.

P.S. I might have detected a small bug in the process. When holding down the Shift key and trying to duplicate a part. Should that come down to easily being able to make multiple copies of the part? As on my side it looks like only one copy can be made each time the duplicate part command is used.
kbwbe
Veteran
Posts: 1052
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Post by kbwbe »

triplus wrote: Mon Oct 22, 2018 11:19 pm The experience was straightforward and assembling procedure was achieved in rather fast and robust way. To be honest i am impressed. I didn't have to change a single constraint in the whole procedure. It just worked as i expected it should.
Thank you very much for your feedback.
triplus wrote: Mon Oct 22, 2018 11:19 pm P.S. I might have detected a small bug in the process. When holding down the Shift key and trying to duplicate a part. Should that come down to easily being able to make multiple copies of the part? As on my side it looks like only one copy can be made each time the duplicate part command is used.
It's not inside code ATM. During rework of Assembly 2 towards A2plus i messed out everything i did not need at this point, to avoid bugs. I will reimplement it in some 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
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

kbwbe wrote: Mon Oct 22, 2018 7:47 pm
manuelkrause wrote: Mon Oct 22, 2018 6:56 pm The new devel branch complained about 4 constraints to be fixed, which corresponds to my changes minus 1 change. I've written them down to paper and tried to consecutively fix them.
Hi Manuel,
are you trying to rework an existing assembly in order to use toponaming ?
Hi Klaus,
yes, it was an existing assembly, but IIRC already assembled with a toponaming-A2plus.
I don't know if this (my) workflow is allowed: I've manually changed the Pleuel-filename in the assembly's properties to the changed part-name and then reloaded imported parts.
In fact there had been so many faces, edges and points removed in the new part, that I can be glad that the A2plus solver + toponaming can figure out at least one existing constraint at all -- and the re-work was quickly done. Only problematic part of it was to identify the "killer"-constraint leading to the error messages.
So, please don't take my report as too important.
Post Reply