Another approach to assembly solver (A2plus)

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

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Thu Aug 09, 2018 5:55 pm

kbwbe wrote:
Thu Aug 09, 2018 3:29 pm
@Turro75

Hi Turro,
i created a new branch "turro-DOF-1" on Github including your recently changed files.

Doing first tests, there seems to be a problem within the new algorithm. It only solves the parts with distance 1 from fixed Part. Other parts beginning with distance 2 are not moved, but solver gives message "system solved". I attach 2 test assemblies which show this effect on my machine. Perhaps it is only a small bug.

After a quick look at the report-view, the DOF calculation seems to be correct. Only processing of the resulting chain does not work.

FYI: 6DOF-Platform example is solved without any problems. Stage 5 of your new algorithm seems to work.
I think I found the problem,
If You press several time the solver button You'll get it solved one piece at a time.
The rigid misplaced simply has not been updated the placement. Tonight (if not drunk 8-) ) I'll look for a workaround
Turro75
Posts: 109
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Fri Aug 10, 2018 8:43 am

@Kbwbe

I checked the code but I didn't find anything bad. What happens is that the the movement seems always calculated based on position the rigids had at the time of solver button pressed. Applysolution is surely executed on all rigid and deps. May be I need to recreate from zero self.rigids after each stage?

Any suggestion?
kbwbe
Posts: 341
Joined: Tue Apr 10, 2018 3:12 pm

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Fri Aug 10, 2018 10:00 am

Turro75 wrote:
Fri Aug 10, 2018 8:43 am
@Kbwbe

I checked the code but I didn't find anything bad. What happens is that the the movement seems always calculated based on position the rigids had at the time of solver button pressed. Applysolution is surely executed on all rigid and deps. May be I need to recreate from zero self.rigids after each stage?

Any suggestion?
Hi Turro,
i do not really understand the data flow in your new algorithm up to now. I only had some small looks at it and there are a lot of changes. I have some time to check later this afternoon.
Best you compare code with master. Your stages are somehow equal to getCandidates() which project4 made. I think there has not been a complete recreation of self.rigids from zero. But i am not sure at moment...
KBWBE

find recent version of A2plus here: https://github.com/kbwbe/A2plus
manuelkrause
Posts: 111
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Fri Aug 10, 2018 12:44 pm

Hi guys!
Thank you for the new code to experiment with.
I don't want to disturb the party, but I had a hard time to get turro-DOF-1 branch to work on here, due to missing parentheses in the print commands.
Attached are a shortlog of the "Workbench failures" (tracebacks omitted) and a linux style .diff patch for the changes needed on here. In the lines Turro commented out still may remain further missing parentheses.

At my first tests I've seen a wrong calculation of "DOF Rotation free" with a plane and a pointIdentity applied, telling it's 0, but in fact there's still one axis to spin around (It's the normal between the plane and the point). Correct me, if I'm wrong.

Manuel
Attachments
Parentheses-20180809.diff.txt
(10.99 KiB) Not downloaded yet
A2plus-turro-DOF-1-failures.20180809.short-log.txt
(3.36 KiB) Downloaded 1 time
Jee-Bee
Posts: 1129
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Another approach to assembly solver (A2plus)

Postby Jee-Bee » Fri Aug 10, 2018 12:46 pm

Is it possibel to add A2Plus to the workbench/addon tool?
kbwbe
Posts: 341
Joined: Tue Apr 10, 2018 3:12 pm

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Fri Aug 10, 2018 1:11 pm

Jee-Bee wrote:
Fri Aug 10, 2018 12:46 pm
Is it possibel to add A2Plus to the workbench/addon tool?
Hi Jee-Bee,

i intend do do this, but not yet at moment. I want to have the solver running with Turro's improvements. When done, i will ask for inclusion of A2Plus to the addon manager. It is still to early now.
KBWBE

find recent version of A2plus here: https://github.com/kbwbe/A2plus
kbwbe
Posts: 341
Joined: Tue Apr 10, 2018 3:12 pm

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Fri Aug 10, 2018 1:21 pm

manuelkrause wrote:
Fri Aug 10, 2018 12:44 pm
Hi guys!
Thank you for the new code to experiment with.
I don't want to disturb the party, but I had a hard time to get turro-DOF-1 branch to work on here, due to missing parentheses in the print commands.
Attached are a shortlog of the "Workbench failures" (tracebacks omitted) and a linux style .diff patch for the changes needed on here. In the lines Turro commented out still may remain further missing parentheses.

At my first tests I've seen a wrong calculation of "DOF Rotation free" with a plane and a pointIdentity applied, telling it's 0, but in fact there's still one axis to spin around (It's the normal between the plane and the point). Correct me, if I'm wrong.

Manuel
Hi Manuel,
Turros's code is not ready to work with. At first step we will try to get his idea's to run at all, as second step we will refactor the code and clean it up.
KBWBE

find recent version of A2plus here: https://github.com/kbwbe/A2plus
manuelkrause
Posts: 111
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Fri Aug 10, 2018 1:37 pm

kbwbe wrote:
Fri Aug 10, 2018 1:21 pm
manuelkrause wrote:
Fri Aug 10, 2018 12:44 pm
Hi guys!
Thank you for the new code to experiment with.
I don't want to disturb the party, but I had a hard time to get turro-DOF-1 branch to work on here, due to missing parentheses in the print commands.
Attached are a shortlog of the "Workbench failures" (tracebacks omitted) and a linux style .diff patch for the changes needed on here. In the lines Turro commented out still may remain further missing parentheses.

At my first tests I've seen a wrong calculation of "DOF Rotation free" with a plane and a pointIdentity applied, telling it's 0, but in fact there's still one axis to spin around (It's the normal between the plane and the point). Correct me, if I'm wrong.

Manuel
Hi Manuel,
Turros's code is not ready to work with. At first step we will try to get his idea's to run at all, as second step we will refactor the code and clean it up.
Hi Klaus,
you already know, that I know that it's experimental, and you also know that this fact doesn't prevent me from testing it... It's more like the contrary. :-D

I've seen another thing: Rotating a part to fulfill a "planesParrallel" results in a visibly(!) bad accuracy (Not seen in devel branch).
Just want to share my findings, so you can fix things early.

Manuel
Turro75
Posts: 109
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Fri Aug 10, 2018 2:00 pm

manuelkrause wrote:
Fri Aug 10, 2018 12:44 pm
Hi guys!
Thank you for the new code to experiment with.
I don't want to disturb the party, but I had a hard time to get turro-DOF-1 branch to work on here, due to missing parentheses in the print commands.
Attached are a shortlog of the "Workbench failures" (tracebacks omitted) and a linux style .diff patch for the changes needed on here. In the lines Turro commented out still may remain further missing parentheses.

At my first tests I've seen a wrong calculation of "DOF Rotation free" with a plane and a pointIdentity applied, telling it's 0, but in fact there's still one axis to spin around (It's the normal between the plane and the point). Correct me, if I'm wrong.

Manuel
Hi Manuel,

Which python version are You using? I'm working on 2.7.14 on win and I never been noticed about missing parenthesys, I'll pay attention on that in future.

You are right, atm the algorythm isn't able to know if an axis is forced in position by a specific point or it is simply a random axis normal to a plane. I'll fix this. As soon as I get the solver working with a single button press....
Btw I need exactly this kind of suggestion.

Regards
manuelkrause
Posts: 111
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Fri Aug 10, 2018 2:16 pm

Turro75 wrote:
Fri Aug 10, 2018 2:00 pm
Hi Manuel,

Which python version are You using? I'm working on 2.7.14 on win and I never been noticed about missing parenthesys, I'll pay attention on that in future.

You are right, atm the algorythm isn't able to know if an axis is forced in position by a specific point or it is simply a random axis normal to a plane. I'll fix this. As soon as I get the solver working with a single button press....
Btw I need exactly this kind of suggestion.

Regards
Hi Turro,

my Python console says: "Python 3.6.5 (default, Mar 31 2018, 19:45:04) [GCC] on linux" -- and in fact I eliminated all (at least I hope so) Python 2 duplicates to Python 3, mainly just to save disk space.

I like to play with the new code and don't see a reason not to point out flaws early, they need to be fixed anyway, earlier or later. ;-)

Thank you for your hard work and good luck!