Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Wed Sep 05, 2018 6:43 pm

@Kbwbe,

of course a more intensive test has to be put in place, anyway with the latest improvements and bug fixes the solver seems working very well.
I would like to know if You already planned a sort of roadmap to first "public" release or what do You think we are still missing to reach the feature freeze stage.

Of course no pressure at all, it's ready when it is ready.

P.S.

immediately implemented the latest modification on a2p_dependencies, very good shot!
User avatar
easyw-fc
Posts: 2980
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (A2plus)

Postby easyw-fc » Wed Sep 05, 2018 8:23 pm

Turro75 wrote: Wed Sep 05, 2018 6:43 pm Of course no pressure at all, it's ready when it is ready.
Hi to all devs! Very nice team work! :D
BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
turro.png
turro.png (741.99 KiB) Viewed 499 times
but I would like to obtain the same of @Kbwbe in his picture:
Kbwbe.png
Kbwbe.png (464.3 KiB) Viewed 499 times
Thanks in advance
M
kbwbe
Posts: 1044
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Wed Sep 05, 2018 8:58 pm

Turro75 wrote: Wed Sep 05, 2018 6:43 pm @Kbwbe,

of course a more intensive test has to be put in place, anyway with the latest improvements and bug fixes the solver seems working very well.
I would like to know if You already planned a sort of roadmap to first "public" release or what do You think we are still missing to reach the feature freeze stage.

Of course no pressure at all, it's ready when it is ready.
.
Hi Turro,
the job to first public release ( it will be v0.1 ) is nearly done. We reached the feature freeze state. I am sure, worst bugs are found and the WB is working fine. I am only finishing some small things.

- enhancing accuracy:
I will add some extra solving steps, to get better final accuracy. When divergence is encountered during these extra loops, the system is still defined to be solved. This is to have better accuracy if the assembly later will be imported as subassembly. I already committed some changes regarding this to devel branch.
- cleaning up
- testing

Version v0.1 will be according state of devel now, with my simplified partial solver. It should be as stable as possible.

After release, we will start towards v0.2. Goals for this new release are:

- implementing your solver additions.
We have to do this step by step, as it is complex and we do not want to introduce bugs. Main advantage, i assume, is moving merged rigids.
- work on the importer regarding updating of parts.
Constraints should mainly not break during these updates.
- One or two new constraints
We can discuss, which are most important.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.54b, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Wed Sep 05, 2018 9:02 pm

easyw-fc wrote: Wed Sep 05, 2018 8:23 pm
Turro75 wrote: Wed Sep 05, 2018 6:43 pm Of course no pressure at all, it's ready when it is ready.
Hi to all devs! Very nice team work! :D
BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
turro.png
but I would like to obtain the same of @Kbwbe in his picture:
Kbwbe.png

Thanks in advance
M
You're not alone, I get the right colored icons only on assembly created on my pc, every time I open an assembly created by another pc leads in green icons on constraints.
kbwbe
Posts: 1044
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Wed Sep 05, 2018 9:05 pm

easyw-fc wrote: Wed Sep 05, 2018 8:23 pm BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
Hi @easyw-fc,
i could not solve this problem up to now. The icons exist in WB-files, but are not found if opening assembly on another machine. Do you have an idea ?
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.54b, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Wed Sep 05, 2018 9:38 pm

kbwbe wrote: Wed Sep 05, 2018 8:58 pm
Turro75 wrote: Wed Sep 05, 2018 6:43 pm @Kbwbe,

of course a more intensive test has to be put in place, anyway with the latest improvements and bug fixes the solver seems working very well.
I would like to know if You already planned a sort of roadmap to first "public" release or what do You think we are still missing to reach the feature freeze stage.

Of course no pressure at all, it's ready when it is ready.
.
Hi Turro,
the job to first public release ( it will be v0.1 ) is nearly done. We reached the feature freeze state. I am sure, worst bugs are found and the WB is working fine. I am only finishing some small things.

- enhancing accuracy:
I will add some extra solving steps, to get better final accuracy. When divergence is encountered during these extra loops, the system is still defined to be solved. This is to have better accuracy if the assembly later will be imported as subassembly. I already committed some changes regarding this to devel branch.
- cleaning up
- testing

Version v0.1 will be according state of devel now, with my simplified partial solver. It should be as stable as possible.

After release, we will start towards v0.2. Goals for this new release are:

- implementing your solver additions.
We have to do this step by step, as it is complex and we do not want to introduce bugs. Main advantage, i assume, is moving merged rigids.
- work on the importer regarding updating of parts.
Constraints should mainly not break during these updates.
- One or two new constraints
We can discuss, which are most important.
Thanks for the precise feedback, I agree.

regarding new features, my hand is high for:
1) as assembly2 does, the multiple constraints for screws, bolts,... very useful, I guess that hamish's code is nearly ready to be integrated
2) be able to enable/disable a constraint without the need to delete and recreate it.
3) constraint to system axes
4) symmetric constraint
5) make symmetric 2 faces of a part to 2 faces of another part (I'll provide an example at the right moment), I found it very useful in the past, in the end it is a plane constraint where the offset is defined by the distances of faces.
6) direct stp importing, and hopefully a command to make all objs in the current file as a2p parts
7) BOM to spreadsheet

and as last...
8) a command that temporary change color of objects according to its DOF, i.e. red fully constrained, amber partially constrained, green free to move, blue overconstrained or something like that
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Wed Sep 05, 2018 9:44 pm

kbwbe wrote: Wed Sep 05, 2018 9:05 pm
easyw-fc wrote: Wed Sep 05, 2018 8:23 pm BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
Hi @easyw-fc,
i could not solve this problem up to now. The icons exist in WB-files, but are not found if opening assembly on another machine. Do you have an idea ?
EDIT:
Sorry I posted the wrong code

this is what I wanted, on each constraint there is something like that

Code: Select all

c.Proxy = ConstraintObjectProxy()
        c.ViewObject.Proxy = ConstraintViewProviderProxy(
            c,
            path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
            True, cParms[1][2],
            cParms[0][2],
            extraText
            )
does

path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',

keeps the dir of the orignal pc only without properly updating?
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Another approach to assembly solver (A2plus)

Postby wandererfan » Thu Sep 06, 2018 1:24 am

Turro75 wrote: Wed Sep 05, 2018 9:44 pm does
path_a2p + '/icons/a2p_PlaneCoincidentConstraint.svg',
keeps the dir of the orignal pc only without properly updating?
Since the icons are now loaded into the Qt resource system, shouldn't we be using something like this path:

Code: Select all

    def getIcon(self):
        return ":/icons/Draft_Dot.svg"
instead of an absolute path to the icon file itself?

This gets the icons from the compiled resource file which Qt knows how to find.
User avatar
wandererfan
Posts: 4078
Joined: Tue Nov 06, 2012 5:42 pm

Re: Another approach to assembly solver (A2plus)

Postby wandererfan » Thu Sep 06, 2018 1:28 am

easyw-fc wrote: Wed Sep 05, 2018 8:23 pm BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
what do you get back when you enter this in the console?

Code: Select all

>>> import a2plib
>>> a2plib.pathOfModule()
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Thu Sep 06, 2018 5:59 am

wandererfan wrote: Thu Sep 06, 2018 1:28 am
easyw-fc wrote: Wed Sep 05, 2018 8:23 pm BTW I cannot display the icons of the constraints...
what I get is similar to the @Turro75 image I'm attaching
what do you get back when you enter this in the console?

Code: Select all

>>> import a2plib
>>> a2plib.pathOfModule()
Hi Wandererfan,

in my pc (win10) I get

>>> import a2plib
>>> a2plib.pathOfModule()
'C:\\Users\\MYUSERNAME\\AppData\\Roaming\\FreeCAD\\Mod\\A2plus'
>>>