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!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Another approach to assembly solver (A2plus)

Post by Jee-Bee »

I like to follow this topic!!
Keep up the good work. Great to see another assembly tool in FC
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

Koemi wrote: Thu Sep 06, 2018 1:02 pm
Your nr. 5) idea, what I think you mean works the same in SolidWorks ('Width'): http://help.solidworks.com/2017/english ... SWassy.htm
Yes it is
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: Thu Sep 06, 2018 5:07 pm Hi Klaus,
please just don't feel any time pressure!
Like @Turro75 said yesterday or so,
"it's ready, when it's ready." Period.
I like him for this expression!
Hi Manuel,
the recompute issue is fixed, your icon for DOF printouts is within the toolbar.
.
DOF-Button.png
DOF-Button.png (25.33 KiB) Viewed 1374 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
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 »

wandererfan wrote: Thu Sep 06, 2018 1:55 pm
easyw-fc wrote: Thu Sep 06, 2018 12:47 pm this is working if I switch the WB to A2p before opening the FC file.
If I open it without having loaded A2p WB before, the icons are not displayed.
I get the same result:

Our resources are loaded in InitGui.py so they are not available until A2p is initialized. Maybe there is a better place to put the Resources?
Hi all,
issue is now really fixed. The ressource-files are now imported instantly at head of InitGui.py. I now can see the correct icons even when other WB is activated and A2plus has not been started before.

For tests, you have to update your A2Plus files from github. (master or devel)

Edit: Please test with the file attached...
Attachments
icons-test.fcstd
(16.71 KiB) Downloaded 46 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: Thu Sep 06, 2018 6:53 pm
manuelkrause wrote: Thu Sep 06, 2018 5:07 pm Hi Klaus,
please just don't feel any time pressure!
Like @Turro75 said yesterday or so,
"it's ready, when it's ready." Period.
I like him for this expression!
Hi Manuel,
the recompute issue is fixed, your icon for DOF printouts is within the toolbar.
.
DOF-Button.png
Hi Klaus,
thank you for your work... But can you please check your latest commit for the recompute issue? After editing the first angledPlanes constraint (from 0° to 120°) after inserting in my crankshaft I get the following Error:

Code: Select all

Traceback (most recent call last):
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 253, in execute
    self.callSolveConstraints()
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 282, in callSolveConstraints
    autoSolveConstraints( FreeCAD.activeDocument(), cache = None )
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_solversystem.py", line 554, in autoSolveConstraints
    FreeCAD.activeDocument().recompute() # perhaps a constraint was inserted or edited
<class 'RuntimeError'>: Nested recomputes of a document are not allowed
Thanks!
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

manuelkrause wrote: Fri Sep 07, 2018 9:12 am
kbwbe wrote: Thu Sep 06, 2018 6:53 pm
manuelkrause wrote: Thu Sep 06, 2018 5:07 pm Hi Klaus,
please just don't feel any time pressure!
Like @Turro75 said yesterday or so,
"it's ready, when it's ready." Period.
I like him for this expression!
Hi Manuel,
the recompute issue is fixed, your icon for DOF printouts is within the toolbar.
.
DOF-Button.png
Hi Klaus,
thank you for your work... But can you please check your latest commit for the recompute issue? After editing the first angledPlanes constraint (from 0° to 120°) after inserting in my crankshaft I get the following Error:

Code: Select all

Traceback (most recent call last):
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 253, in execute
    self.callSolveConstraints()
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 282, in callSolveConstraints
    autoSolveConstraints( FreeCAD.activeDocument(), cache = None )
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_solversystem.py", line 554, in autoSolveConstraints
    FreeCAD.activeDocument().recompute() # perhaps a constraint was inserted or edited
<class 'RuntimeError'>: Nested recomputes of a document are not allowed
Thanks!
Hi Manuel,

I faced the same, this happens because the value changes from 0 to 1 to 12 to 120, so with autosolve active there are "overlapped" solving processes which leads in multiple recomputes.

Maybe the autosolve could be optimized in a way to avoid multiple solving and /or a filter of some seconds letting the editing completed.
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: Fri Sep 07, 2018 9:46 am
Hi Manuel,

I faced the same, this happens because the value changes from 0 to 1 to 12 to 120, so with autosolve active there are "overlapped" solving processes which leads in multiple recomputes.

Maybe the autosolve could be optimized in a way to avoid multiple solving and /or a filter of some seconds letting the editing completed.
Oh, then I need to add, that I had "autosolve" off!

AND EDIT:
...and that the part doesn't get rotated although the value is in.
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 »

Turro75 wrote: Fri Sep 07, 2018 9:46 am
manuelkrause wrote: Fri Sep 07, 2018 9:12 am
kbwbe wrote: Thu Sep 06, 2018 6:53 pm
manuelkrause wrote: Thu Sep 06, 2018 5:07 pm Hi Klaus,
please just don't feel any time pressure!
Like @Turro75 said yesterday or so,
"it's ready, when it's ready." Period.
I like him for this expression!
Hi Manuel,
the recompute issue is fixed, your icon for DOF printouts is within the toolbar.
.
DOF-Button.png
Hi Klaus,
thank you for your work... But can you please check your latest commit for the recompute issue? After editing the first angledPlanes constraint (from 0° to 120°) after inserting in my crankshaft I get the following Error:

Code: Select all

Traceback (most recent call last):
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 253, in execute
    self.callSolveConstraints()
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_viewProviderProxies.py", line 282, in callSolveConstraints
    autoSolveConstraints( FreeCAD.activeDocument(), cache = None )
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_solversystem.py", line 554, in autoSolveConstraints
    FreeCAD.activeDocument().recompute() # perhaps a constraint was inserted or edited
<class 'RuntimeError'>: Nested recomputes of a document are not allowed
Thanks!
Hi Manuel,

I faced the same, this happens because the value changes from 0 to 1 to 12 to 120, so with autosolve active there are "overlapped" solving processes which leads in multiple recomputes.

Maybe the autosolve could be optimized in a way to avoid multiple solving and /or a filter of some seconds letting the editing completed.
Hi Turro, hi Manuel
i am working on this topic. The nested recomputes are more complicated than i thougt. Tomorrow i have more time, i hope that there will be a solution!
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: Fri Sep 07, 2018 4:31 pm Hi Turro, hi Manuel
i am working on this topic. The nested recomputes are more complicated than i thougt. Tomorrow i have more time, i hope that there will be a solution!
Just nice to read that you're working on it.

On here, btw, formerly just a click on FC recompute did the job. But one needs to do it each time, from time to time.

You'd get it!
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: Fri Sep 07, 2018 4:44 pm
kbwbe wrote: Fri Sep 07, 2018 4:31 pm Hi Turro, hi Manuel
i am working on this topic. The nested recomputes are more complicated than i thougt. Tomorrow i have more time, i hope that there will be a solution!
Just nice to read that you're working on it.

On here, btw, formerly just a click on FC recompute did the job. But one needs to do it each time, from time to time.

You'd get it!
Hi Manuel,
i just committed my last work and switched back to old recompute strategy. (Manually to do from time to time)
Some small things changed towards going to release...
- New button to create visual hierarchy. Automatic mode was messing my disk with not needed files... (We need a better icon)
- several new message boxes if user is doing something wrong (what leads to a lot of error printouts)

Mainly, it should work as before.
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