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!
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Another approach to assembly solver (A2plus)

Post by project4 »

kbwbe wrote: Tue Jul 31, 2018 5:15 pm Hi @all,
find feature update at github.

Solving of constraints can now be undone by FreeCAD's UNDO/REDO system.

If solving the constraints let you get undesired positions of your parts, simple hit FreeCAD's undo button. Your assembly looks again like before the wrong operation.
Well Done!
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: Tue Jul 31, 2018 3:50 pm Hi @all,

find updated version at github.
- bug during creation of a constrained has been fixed. After creating a new constraint the mirrored constraint was missing
- after deleting imported parts and using FreeCAD's undo functionality, the tree view is now automatically repaired.
Hi @kbwbe,
thank you very much for this and the recent earlier updates. Haven't had much time last days to experiment. I've noticed your newer update, which I'll test some hours later.
For now my experience with this one:
* The Tree view is apparently repaired, and the assembly consistant afterwards, but the Tree view doesn't get refreshed in expanded view at (automatic) repair. At least once it looked on here like the distorted fashion (constraint "headless") but when clicking the expand arrow for the deleted + undo part, to see the constraints, the Tree view was actualized correctly.
* I've found another possible bug: When having 'toggle transparency for assembly' is active -- the 'show connected elements' button of a selected constraint doesn't work for me. No error messages, just an inactive button.

Manuel
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

@kbwbe

just downloaded latest devel branch, amazing job, You were able to reduce a lot the number of step needed to solve my assembly and it is really precise now.
Since I expect the dof handling a little bit "invasive" against current code I'll keep that release as code base avoiding further sync.
Anyway I'll create a new file in order to keep as low as I can the impact on solversystem.py

go go go
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

Turro75 wrote: Tue Jul 31, 2018 6:10 pm @kbwbe

just downloaded latest devel branch, amazing job, You were able to reduce a lot the number of step needed to solve my assembly and it is really precise now.
Since I expect the dof handling a little bit "invasive" against current code I'll keep that release as code base avoiding further sync.
Anyway I'll create a new file in order to keep as low as I can the impact on solversystem.py

go go go
@Turro75:
As it's labeled "devel" noone would misunderstand that it contains experimental code (with some likeliness to fail). I assume that's exactly why @kbwbe named it so. "Invasive" makes me curious, but I've already seen that your library contains a huge amount of possibilities to work with in A2plus. If only I knew how to program in python and understood the current code... ^^

Thank you for your work,
Manuel
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: Tue Jul 31, 2018 5:42 pm * I've found another possible bug: When having 'toggle transparency for assembly' is active -- the 'show connected elements' button of a selected constraint doesn't work for me. No error messages, just an inactive button.
Hi Manuel,
it is not a bug, it is a feature ! :mrgreen:
project4 implemented this behaviour. As both, toggleTransparency and viewConstraints, are switching/restoring transparency of assembly, he deactivated the viewMode if your are inside transparency mode. This is to avoid mismatch when restoring old visible mode.

You do not need to be in transparency mode when you want to view your constraints. The view mode is doing it by himself.
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: Tue Jul 31, 2018 6:54 pm
manuelkrause wrote: Tue Jul 31, 2018 5:42 pm * I've found another possible bug: When having 'toggle transparency for assembly' is active -- the 'show connected elements' button of a selected constraint doesn't work for me. No error messages, just an inactive button.
Hi Manuel,
it is not a bug, it is a feature ! :mrgreen:
project4 implemented this behaviour. As both, toggleTransparency and viewConstraints, are switching/restoring transparency of assembly, he deactivated the viewMode if your are inside transparency mode. This is to avoid mismatch when restoring old visible mode.

You do not need to be in transparency mode when you want to view your constraints. The view mode is doing it by himself.
@kbwbe:
Then I had been too short with my words again:
I often use and like the 'toggle transparency' to see what's going on/ or not inside an assembly.
E.g. when in transparency mode and recognizing a wrong constraint, I wish to be able to check in the view, click at once, and not going back to the assembly's default transparency, e.g. 0, to search and click it again. Takes unneeded workflow steps IMO.

Manuel
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

Thought about it:
Not the 'view connected elements' should be blocked in 'transparency mode' -- but the 'toggle transparency' should be blocked when in 'view connected elements' mode. Maybe a simple coding error?
I'm sure this makes sense to you.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Post by manuelkrause »

I've just seen another BUG with that approach:
When saving an assembly in "transparency mode" it won't be able to load it with the original parts transparencies. They're all getting the 80% value. Even reloading the parts doesn't help.

Manuel
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: Tue Jul 31, 2018 7:28 pm I've just seen another BUG with that approach:
When saving an assembly in "transparency mode" it won't be able to load it with the original parts transparencies. They're all getting the 80% value. Even reloading the parts doesn't help.

Manuel
I think i will split up the modes: highlighing regardless if assembly transparent or not, toggleTransparency when ever you want.

P.S.: Sorry, did not answer this post correctly.
If saving in transparent mode and close the file, it is saved as 'is' at this moment. After reloading, hit toggleTransparency again. All parts will become intransparent again.
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: Tue Jul 31, 2018 7:43 pm
manuelkrause wrote: Tue Jul 31, 2018 7:28 pm I've just seen another BUG with that approach:
When saving an assembly in "transparency mode" it won't be able to load it with the original parts transparencies. They're all getting the 80% value. Even reloading the parts doesn't help.

Manuel
I think i will split up the modes: highlighing regardless if assembly transparent or not, toggleTransparency when ever you want.
I don't know what you mean regarding the code, but to split those behaviours, to act independently, sounds good. I'd test it anyways. I assume it'll come into the "devel" branch at first.
Post Reply