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!
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 Jan 18, 2019 2:54 pm
manuelkrause wrote: Fri Jan 18, 2019 2:08 pm Can you please again reset your "improve-colors" branch again to current "devel", that I can clone and restart patching from scratch at current state? Before going the preference step we need to reassure that at least some of my code is working.
Hi Manuel,
all branches are identical at moment.
I'm sorry, that I ask you for this from time to time. I assume it's only one-to-two clicks for you and two or three commands for me, rather than me needing much time to refactor my local repository. Please complain if that bothers you too much!
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: Sat Jan 19, 2019 4:25 pm
Hi Manuel,
no problem. Just i am working on devel branch and the new preferences option "usePerFaceTransparency" is already inside it.

You can now use the function

Code: Select all

if a2plib.getPerFaceTransparency() == True:
	....
to add your additional code in a appropiate section. Shall i reset the branch "improve-colors" to this state 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: ping
Hi, you brave A2plus people!

O.k. - I've now set up a new [improve-colors] coding trial. It's already in my github, I'd post a PR for that very branch soon, if you'd kindly allow.

I limited coding to:
* re-implementing my and @wandererfan's work
* adjusting it to current code base
* removing/changing minor things
* omitting heavy debug messages

So there will be no big surprise.

+ What seems to be working, is per face colors for assemblies and sub-assemblies
EDIT:
+ Transparency seems to work, too, the only thing about them again is:
/EDIT
- This leads to unselectable faces and artefacts. Latest FC 0.18 fixes didn't cause a difference
- Toggle transparency for assemblies containing sub-assemblies would only show at mouse over the faces.

I haven't tested all of the A2plus facility so far, so there may occur weird things, but I have tried my best to avoid this.

For the Coders among you, please help to improve!

BR,
Manuel

Screenshot_20190119_173939.png
Screenshot_20190119_173939.png (21.51 KiB) Viewed 1440 times
Screenshot_20190119_174149.png
Screenshot_20190119_174149.png (15.66 KiB) Viewed 1440 times
Last edited by manuelkrause on Sat Jan 19, 2019 7:39 pm, edited 1 time in total.
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: Sat Jan 19, 2019 4:55 pm
manuelkrause wrote: Sat Jan 19, 2019 4:25 pm
Hi Manuel,
no problem. Just i am working on devel branch and the new preferences option "usePerFaceTransparency" is already inside it.

You can now use the function

Code: Select all

if a2plib.getPerFaceTransparency() == True:
	....
to add your additional code in a appropiate section. Shall i reset the branch "improve-colors" to this state again ?
No, of course no reset for now, please!
I'm quite sure your code fits mine with only some very small edits.
Or vice versa.
Please simply read through the little changes I've made to a2plib within my commit, regarding a2plib.getPerFaceTransparency(). And look at the other functions making use of it. :mrgreen:

EDIT: So some kind of "Gedankenübertragung" - how to translate it to English? - My code uses the same function name.
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: Sat Jan 19, 2019 5:06 pm
OK, i will look through your new code !
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 »

Although they're small and easily to rebuild, here are the reference test files for recent [improve-color] testing:

3 Cubes with different Transparency,
one of them with Transparency = 0, but one face differently colored.

sub-assy loads all 3 sub-model part files,
top-assy the sub-assy.
Attachments
sub-model.03.FCStd
(3.35 KiB) Downloaded 35 times
sub-model.02.FCStd
(3.35 KiB) Downloaded 43 times
sub-model.01.FCStd
(3.36 KiB) Downloaded 38 times
sub-assy.02.FCStd
(6.93 KiB) Downloaded 39 times
top-assy.02.FCStd
(5.27 KiB) Downloaded 31 times
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: Sat Jan 19, 2019 6:00 pm
I rebased your PR to devel branch and merged it there. Devel branch has to be reviewed now, as there are some small unwanted impacts.
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: Sat Jan 19, 2019 8:02 pm
manuelkrause wrote: Sat Jan 19, 2019 6:00 pm
I rebased your PR to devel branch and merged it there. Devel branch has to be reviewed now, as there are some small unwanted impacts.
Thank you, Klaus,
what are the "some small unwanted impacts"? If they are not the ones I've already described?

BR
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: Sat Jan 19, 2019 8:48 pm what are the "some small unwanted impacts"? If they are not the ones I've already described?
Maybe. I will check in detail tomorrow.
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: Sat Jan 19, 2019 9:22 pm
manuelkrause wrote: Sat Jan 19, 2019 8:48 pm what are the "some small unwanted impacts"? If they are not the ones I've already described?
Maybe. I will check in detail tomorrow.
Hi Klaus,
now, after having a closer look at your devel-branch changes I see what you mean.
I identified at least a collision of my variable usage and your implemented new usePerFaceTransparency preference read-out.

ATM, I prepare a little PR that would heal this collision (I hope correctly).

BR

EDIT: O.k., PR #156 is placed. Please check it before accepting. I hope, all is right.
Post Reply