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!
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

@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
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (A2plus)

Post by easyw-fc »

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 1254 times
but I would like to obtain the same of @Kbwbe in his picture:
Kbwbe.png
Kbwbe.png (464.3 KiB) Viewed 1254 times
Thanks in advance
M
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: 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.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
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

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
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 »

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.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
Turro75
Posts: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

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: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

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
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Another approach to assembly solver (A2plus)

Post by wandererfan »

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
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Another approach to assembly solver (A2plus)

Post by wandererfan »

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: 179
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Post by Turro75 »

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'
>>>
Post Reply