Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Sat Oct 20, 2018 4:25 pm

kbwbe wrote:
Sat Oct 20, 2018 4:22 pm
manuelkrause wrote:
Sat Oct 20, 2018 4:06 pm
Is the algo aware of changed cached items like imported parts/ subassemblies -- either opened or not (but saved of course!) ?
Hi Manuel,
the cache is always up to date to last storage of an importPart, because:
- it is cleared and reloaded when you hit the button updateImportedParts.
- When this is done, it is cleared again.
Again, thank you for clarifying so quickly!
kbwbe
Posts: 860
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » 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
Before-Edit.png (129.3 KiB) Viewed 322 times
.
and here the updated one after editing both involved parts:
.
After-Edit.png
After-Edit.png (158.64 KiB) Viewed 322 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 7 times
Before-Edit.zip
(51.07 KiB) Downloaded 7 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.27, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Sat Oct 20, 2018 5:25 pm

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)

Postby manuelkrause » Sat Oct 20, 2018 5:32 pm

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
Posts: 860
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sat Oct 20, 2018 5:48 pm

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.27, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
kbwbe
Posts: 860
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sun Oct 21, 2018 10:48 am

.
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 266 times
.
After edit:
After-Edit.png
After-Edit.png (140.65 KiB) Viewed 266 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 4 times
Before-Edit.zip
(23.52 KiB) Downloaded 4 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.27, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Oct 22, 2018 6:56 pm

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 5 times
kbwbe
Posts: 860
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » 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 ?
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.27, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
triplus
Posts: 8676
Joined: Mon Dec 12, 2011 4:45 pm

Re: Another approach to assembly solver (A2plus)

Postby triplus » Mon Oct 22, 2018 11:19 pm

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
Posts: 860
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Oct 23, 2018 6:39 am

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.27, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM