Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Oct 23, 2018 1:29 pm

kbwbe wrote:
Mon Oct 22, 2018 7:47 pm
manuelkrause wrote:
Mon Oct 22, 2018 6:56 pm
The new devel branch complained about 4 constraints to be fixed, which corresponds to my changes minus 1 change. I've written them down to paper and tried to consecutively fix them.
Hi Manuel,
are you trying to rework an existing assembly in order to use toponaming ?
Hi Klaus,
yes, it was an existing assembly, but IIRC already assembled with a toponaming-A2plus.
I don't know if this (my) workflow is allowed: I've manually changed the Pleuel-filename in the assembly's properties to the changed part-name and then reloaded imported parts.
In fact there had been so many faces, edges and points removed in the new part, that I can be glad that the A2plus solver + toponaming can figure out at least one existing constraint at all -- and the re-work was quickly done. Only problematic part of it was to identify the "killer"-constraint leading to the error messages.
So, please don't take my report as too important.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Oct 23, 2018 1:43 pm

@kbwbe:
Hi Klaus,
just forgotten to add: I can confirm, that after constraining and then adding new features like e.g. 4 fillets, the constraint system remains intact.
This is a real advantage over the pre-toponaming times!
Many thanks for your good work!
kbwbe
Posts: 881
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Oct 23, 2018 3:02 pm

manuelkrause wrote:
Tue Oct 23, 2018 1:43 pm
@kbwbe:
Hi Klaus,
just forgotten to add: I can confirm, that after constraining and then adding new features like e.g. 4 fillets, the constraint system remains intact.
This is a real advantage over the pre-toponaming times!
Many thanks for your good work!
Hi Manuel,
after a long time (because of development of A2plus), i am doing my first real world assembly again. I have toponaming always turned ON and it helps greatly. But someone has to keep it in mind already during designing the parts. It is important to know how the algo works. (No problem for me, but perhaps for others!) ;)

General rules:
- design your parts in very small steps
- use a lot of sketches, do not place everything into one sketch
- if you intend to do constraints to a feature, place this feature as soon as possible in feature history

If doing so, a2p-toponaming keeps away 80% of the trouble when changing the topology of a part and assemblies keep stable.
It's a matter of training. There are some comments in the sourcefile "a2p_topomapper.py". They give an idea how it is working.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.30, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Oct 23, 2018 4:16 pm

kbwbe wrote:
Tue Oct 23, 2018 3:02 pm
manuelkrause wrote:
Tue Oct 23, 2018 1:43 pm
@kbwbe:
Hi Klaus,
just forgotten to add: I can confirm, that after constraining and then adding new features like e.g. 4 fillets, the constraint system remains intact.
This is a real advantage over the pre-toponaming times!
Many thanks for your good work!
Hi Manuel,
after a long time (because of development of A2plus), i am doing my first real world assembly again. I have toponaming always turned ON and it helps greatly. But someone has to keep it in mind already during designing the parts. It is important to know how the algo works. (No problem for me, but perhaps for others!) ;)

General rules:
- design your parts in very small steps
- use a lot of sketches, do not place everything into one sketch
- if you intend to do constraints to a feature, place this feature as soon as possible in feature history

If doing so, a2p-toponaming keeps away 80% of the trouble when changing the topology of a part and assemblies keep stable.
It's a matter of training. There are some comments in the sourcefile "a2p_topomapper.py". They give an idea how it is working.
Hi Klaus!
Do you really think that your proposals are needed at the current evolved state of devel-A2plus?
Of course they can help to avoid troubles.
Regarding my rework of my former Pleuel: It was another try to ease the work of the solver. Don't know why I've had made it in such a complicated way earlier (most likely because of missing experience with FreeCAD in my first trials and also unsafe data from drawings printed from a .pdf with falsified measurements). And in the end the result eases my brain (not so many features to maintain) and makes a more beautiful shape. In the former file version I was not able to apply the fillets due to conflicting faces/ edges (no A2plus problem). But the involved parts are now really simply-made.

In the early revisions of A2plus your proposals may have had a great impact on solving... but today?

BTW, is @Turro75's rule still valid: To first select the defined part and then the part to be moved by a constraint or is this done by recursive unfixing? TBH I haven't paid much attention to this lately. (As it always worked :-) ) When testing with your link files e.g., I issued several constraints with autosolve=off and then solved them all at once without problems within less than a second. And my notebook is quite old.
kbwbe
Posts: 881
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Oct 23, 2018 4:36 pm

manuelkrause wrote:
Tue Oct 23, 2018 4:16 pm
In the early revisions of A2plus your proposals may have had a great impact on solving... but today?
Hi Manuel,
now my proposals have heavy impact on toponaming. Without obeying this, the generated names are not very useful. Therefore my remarks...
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.30, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
kbwbe
Posts: 881
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Oct 23, 2018 4:44 pm

manuelkrause wrote:
Tue Oct 23, 2018 4:16 pm
BTW, is @Turro75's rule still valid: To first select the defined part and then the part to be moved by a constraint or is this done by recursive unfixing? TBH I haven't paid much attention to this lately. (As it always worked :-) )
With our solverimplementation, this rule is now obsolete. As A2plus forces order of constraint subelements by itself. (pointOnPlane: first select point, then select plane). Is does not matter which part is to be moved.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.30, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Oct 23, 2018 4:49 pm

@kbwbe:
Hi again, Klaus,
ATM I'm reading through your introduction in a2p_topomapper.py. Not finished yet.
But your

Code: Select all

- Some geometry causes multiple keys. So for plane faces there are stored
  two keys per vertex. One with positive axis value, one with neg.axis value.
  This is necessary because normals can flip during build history.
rings a bell for me.
Would it now be possible to enhance the angleBetweenPlanes with these means to do a full 360° coverage? As in my humble understanding it only depends on the correct axis flip to be set (-179.99 <-- 0.0 (planesParallel) --> 179.99).
Am I wrong?
kbwbe
Posts: 881
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Oct 23, 2018 5:09 pm

manuelkrause wrote:
Tue Oct 23, 2018 4:49 pm
@kbwbe:
Hi again, Klaus,
ATM I'm reading through your introduction in a2p_topomapper.py. Not finished yet.
But your

Code: Select all

- Some geometry causes multiple keys. So for plane faces there are stored
  two keys per vertex. One with positive axis value, one with neg.axis value.
  This is necessary because normals can flip during build history.
rings a bell for me.
Would it now be possible to enhance the angleBetweenPlanes with these means to do a full 360° coverage? As in my humble understanding it only depends on the correct axis flip to be set (-179.99 <-- 0.0 (planesParallel) --> 179.99).
Am I wrong?
The solver and the topomapper are very different things which do different jobs. There is still no solution. But some days ago, i did a test with Hamish's improvements on A2. The angleBetweenPalnes constraint is working pretty well. We will have to look at his new code.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.30, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Oct 23, 2018 5:22 pm

kbwbe wrote:
Tue Oct 23, 2018 5:09 pm
The solver and the topomapper are very different things which do different jobs. There is still no solution. But some days ago, i did a test with Hamish's improvements on A2. The angleBetweenPalnes constraint is working pretty well. We will have to look at his new code.
Thank you for your many replies!

Does the actual Assembly2 really work for you?
Even with your former earlier hints I've never got it running. Too many errors to not be fixed easily.
Turro75
Posts: 170
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (A2plus)

Postby Turro75 » Tue Oct 23, 2018 5:48 pm

Hey Guys,

I'm still alive, very busy at work but alive.

@Kbwbe I'm really impressed by Your whole work

@Manuelkrause in the end You are becoming a serious Python developer ;)
the sequence of selection became obsolete after the introduction of DOF handling.

see You on the air!