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!
jbe
Posts: 368
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: Another approach to assembly solver (A2plus)

Post by jbe »

Thank you kbwbe
I will test.
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 »

Hi all,

and the next update of A2plus is available, V0.1.8

Whats new:
- a new "axisPlaneParallel" constraint

An axis (linear edge or axis of a cylindrical face) is aligned parallel to a selected face. But the parts are not moved to be coincident.

Have fun !
Turro75 wrote:ping
Hi Turro,
this was your issue #4, you was waiting for to be solved.
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: Sun Nov 18, 2018 1:43 pm Hi all,

and the next update of A2plus is available, V0.1.8

Whats new:
- a new "axisPlaneParallel" constraint

An axis (linear edge or axis of a cylindrical face) is aligned parallel to a selected face. But the parts are not moved to be coincident.

Have fun !
Turro75 wrote:ping
Hi Turro,
this was your issue #4, you was waiting for to be solved.
Hi @kbwbe:
When testing FreeCAD_0.18.15221_Conda_Py3Qt5_glibc2.12-x86_64.AppImage with A2plus I get the following:
No module named 'a2p_partinformation'
Traceback (most recent call last):
File "<string>", line 67, in Initialize

Have I made a mistake or someone else?

TIA for a reply :-)

EDIT:
Same when copying in a a2p_partinformation.py from somewhere new.
Now:
No module named a2p_partlistglobals
Traceback (most recent call last):
File "<string>", line 67, in Initialize
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_partinformation.py", line 28, in <module>
from a2p_partlistglobals import PARTLIST_COLUMN_NAMES
/EDIT
Last edited by manuelkrause on Wed Nov 21, 2018 2:42 pm, edited 1 time in total.
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: Wed Nov 21, 2018 1:24 pm When testing FreeCAD_0.18.15221_Conda_Py3Qt5_glibc2.12-x86_64.AppImage with A2plus I get the following:
No module named 'a2p_partinformation'
Traceback (most recent call last):
File "<string>", line 67, in Initialize
Hi Manuel,
i downloaded the "FreeCAD_0.18.15221_Conda_Py3Qt5_glibc2.12-x86_64.AppImage" and tested it. A2plus is working for me. There is no errormessage on my side.

Does the file "a2p_partinformation.py" exist within your ModFolder/A2plus ? Or is it deleted somehow ?
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: Wed Nov 21, 2018 2:41 pm
manuelkrause wrote: Wed Nov 21, 2018 1:24 pm When testing FreeCAD_0.18.15221_Conda_Py3Qt5_glibc2.12-x86_64.AppImage with A2plus I get the following:
No module named 'a2p_partinformation'
Traceback (most recent call last):
File "<string>", line 67, in Initialize
Hi Manuel,
i downloaded the "FreeCAD_0.18.15221_Conda_Py3Qt5_glibc2.12-x86_64.AppImage" and tested it. A2plus is working for me. There is no errormessage on my side.

Does the file "a2p_partinformation.py" exist within your ModFolder/A2plus ? Or is it deleted somehow ?
Sorry for bothering,

I've also cross-tested my local vs. your devel.
The Bug is in my "improve-color" code, that I've already had submitted.

Your devel code works well. Meaning, without errors. But also without keeping transparency...

BR, 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: Wed Nov 21, 2018 1:24 pm Same when copying in a a2p_partinformation.py from somewhere new.
Now:
No module named a2p_partlistglobals
Traceback (most recent call last):
File "<string>", line 67, in Initialize
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_partinformation.py", line 28, in <module>
from a2p_partlistglobals import PARTLIST_COLUMN_NAMES
/EDIT
Why same ? Your error message changed. Now the file "a2p_partlistglobals.py" is not recognized on your system.
Try deleting all *.pyc files in A2plus folder and start again. These files are automatically created new on restarting A2plus.

On my system, also partlist is running correctly with Conda build AppImage.

Edit: Posts overlapped by time, sorry.
Last edited by kbwbe on Wed Nov 21, 2018 3:56 pm, edited 1 time in total.
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 »

manuelkrause wrote: Wed Nov 21, 2018 3:31 pm Your devel code works well. Meaning, without errors. But also without keeping transparency...
Good that it is working for you.
Yesterday, i had a look around again in sourcefiles of recent Assembly2. Perhaps there is something interesting for you regarding transparency. In file "/FreeCAD_assembly2/assembly2/importPart/__init__.py" are code sections commented with "Transparency workaround". Perhaps you can find hints there.

/Edit: filename was wrong...
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: Wed Nov 21, 2018 3:45 pm
manuelkrause wrote: Wed Nov 21, 2018 1:24 pm Same when copying in a a2p_partinformation.py from somewhere new.
Now:
No module named a2p_partlistglobals
Traceback (most recent call last):
File "<string>", line 67, in Initialize
File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_partinformation.py", line 28, in <module>
from a2p_partlistglobals import PARTLIST_COLUMN_NAMES
/EDIT
Why same ? Your error message changed. Now the file "a2p_partlistglobals.py" is not recognized on your system.
Try deleting all *.pyc files in A2plus folder and start again. These files are automatically created new on restarting A2plus.

On my system, also partlist is running correctly with Conda build AppImage.

Edit: Posts overlapped by time, sorry.
Hi Klaus,
thank you very much for trying to help me. And sorry for all that confusion.

With "same" I meant that it's pointing to the same source of error. Namely: On the way of catching up with your devel-branch, by applying your commit patches one by one to my local improve-colors-branch, I've completely messed it up. Actually I'm missing several files (6!) in my improve-colors branch that are in your devel-branch, although I thought to have carefully applied every commit. No idea how I was able to break it. (Maybe untracked new files??)

Is there a known "best practice" to follow, so that I can fix my local and remote branch(es) without confusing the current states in your and my remote trees?

TIA, Manuel

P.S.: Thank you for your hint about assembly2's workaround! I've also noticed it a while ago but haven't completely understood it and thus haven't experimented with it so far. I'll give it a try once I've fixed the current mess... :oops:
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 Klaus,
again, sorry for that last confusion with my branch... It was really about untracked files from your newer commits within my local version. I'm still too unexperienced with git... And so, I may have ignored some git (commit) messages in order to add the new files to be tracked.
(I've solved it now, by making a comparison diff to find the 8(!) culprit files, re-clone my tree, and commit the comparison diff to my local and remote branch improve-colors, finally.)

This source of error was quite new to me. Hopefully I'm going to remember it for the next times and I check my files...

Please don't be too angry about this embarrassing waste of time,
Manuel
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: Wed Nov 21, 2018 3:53 pm ...
Yesterday, i had a look around again in sourcefiles of recent Assembly2. Perhaps there is something interesting for you regarding transparency. In file "/FreeCAD_assembly2/assembly2/importPart/__init__.py" are code sections commented with "Transparency workaround". Perhaps you can find hints there.
...
Hi guys and girls,
mmmh. I've now made some tests and code changes based on that assembly2 code. But I'm not any step ahead with that.
Please have a close look at it, maybe I simply don't put the needed algorithms in the right place / order.
I've taken the changes only into my github for now, to not disturb your (@kbwbe) version.
The patch in question is: https://github.com/ManuelKrause/A2plus/ ... ef590747ca
only useful to patch with the actual A2plus improve-colors branch.

I'm appreciating any hint on how to improve this (https://forum.freecadweb.org/viewtopic. ... 4&start=30)

Manuel
Post Reply