Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
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 » Sun May 26, 2019 4:42 pm

easyw-fc wrote:
Sun May 26, 2019 1:06 pm
Hi Maurice,
thank you for the PR, which i just merged to version V0.23. It is fore sure useful.

I also integrated a fix for this problem here: https://forum.freecadweb.org/viewtopic.php?f=3&t=36588

Thx a lot, Klaus
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
toralf
Posts: 33
Joined: Fri May 03, 2019 3:54 am

Re: Another approach to assembly solver (A2plus)

Postby toralf » Sun May 26, 2019 5:45 pm

kbwbe wrote:
Sun May 26, 2019 11:53 am
Unfortunately ATM i do not know a working solution to prevent that.
Is there an area in the FC data structure that A2p could write data into?
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 » Sun May 26, 2019 8:04 pm

toralf wrote:
Sun May 26, 2019 5:45 pm
Is there an area in the FC data structure that A2p could write data into?
What data are you thinking about to write ?

All A2p objects are scripted objects based on "Part::featurepython" . So we have full access to their entries and even can add new ones, if they are considered to be useful.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
AIMEDSOLUTIONS
Posts: 39
Joined: Sun Sep 02, 2018 12:33 pm
Location: Karachi Pakistan
Contact:

Re: Another approach to assembly solver (A2plus)

Postby AIMEDSOLUTIONS » Fri Jul 12, 2019 4:26 am

HI Guys
Every time I am trying to involve myself in FC development, I got busy as hell. Now I am trying to work on some project and check the issues and solutions in FC.
I tried to read whole discussion but its too long and I lose my patience.
You people handling a hell lot of issues right now. IMO, very first problem is inconsistent constraints. If this will solve, we can design a lot of things in FC. But only because of this, I specially cant work as I have to deal with assemblies and need to refine the project until it get finalized. I want to design this fixture in FC only but I cant just because of assy constraints fails every time.
If we only get this issue solve we can work even with a lot of other issues but this is the foundation stone of an assy.
Attachments
1.PNG
1.PNG (116.64 KiB) Viewed 684 times
Dell Precision M6600
14GB RAM with Nvidea Quadro 3000 (2GB)
Windows 10 64 bit.
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 » Fri Jul 12, 2019 6:40 am

AIMEDSOLUTIONS wrote:
Fri Jul 12, 2019 4:26 am
Hi,

with this description of your problem it will be hard to help you.

Please give more information.
- your freecad version
- your A2plus version
- a description which constraint fails and when it does this
- a sample file for testing.

Usually most of the constraints work well. Failing of constraints can also be caused by a design, where some parts do not really fit together.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
AIMEDSOLUTIONS
Posts: 39
Joined: Sun Sep 02, 2018 12:33 pm
Location: Karachi Pakistan
Contact:

Re: Another approach to assembly solver (A2plus)

Postby AIMEDSOLUTIONS » Fri Jul 12, 2019 7:08 am

HI Kbwbe (i dont know your name or what I can call you)
I think I didnt clearly mentioned my problem. Constaint doesnt fail when I apply. its fails when we make a change in component.
I am using FC 0.18 and 0.19, A2P4.24
before hole.PNG
before hole.PNG (19.49 KiB) Viewed 656 times
after hole problem.PNG
after hole problem.PNG (39.95 KiB) Viewed 656 times
Attachments
FREE.rar
(106.28 KiB) Downloaded 19 times
Dell Precision M6600
14GB RAM with Nvidea Quadro 3000 (2GB)
Windows 10 64 bit.
User avatar
Zolko
Posts: 443
Joined: Mon Dec 17, 2018 10:02 am

Re: Another approach to assembly solver (A2plus)

Postby Zolko » Fri Jul 12, 2019 9:16 am

AIMEDSOLUTIONS wrote:
Fri Jul 12, 2019 7:08 am
Constraint doesn't fail when I apply. It fails when we make a change in component.
probably the classical topological naming problem of FreeCAD : when creating any object, FreeCAD gives it a name, and when you assemble those objects the constraints apply to the name of the object, not the visual of the object. When you modify the object, FreeCAD may - or may not - attribute a new name to the object, but the constraint doesn't know this, and thus the constraint applies to inexistant - or wrong - objects.

This problem exists in all CAD systems, more or less severe, and in FreeCAD it's very severe.

As far as I understood, Asm2+ is very good for assembling finished (frozen) parts, but less well suited to assemble evolving parts (which are modified after having been assembled).

Assembly 4 doesn't have this issue because constraints apply to coordinate systems which are explicit objects, not implicit ones like an edge, thus you can give a name to the coordinate system and not let FreeCAD decide what name to attribute it. Also, if something does go wrong - because word censored happens - you can re-define the mapping/placement of the coordinate system and everything falls back into place. This exact issue was my motivation to develop the assembly without solver, which became Asm4. But you need realthunder's FreeCAD-asm3 branch for it (actually you only need the App::Link of FreeCAD-LinkStage3)
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here
User avatar
easyw-fc
Posts: 2687
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (A2plus)

Postby easyw-fc » Fri Jul 12, 2019 9:51 am

AIMEDSOLUTIONS wrote:
Fri Jul 12, 2019 7:08 am
I think I didnt clearly mentioned my problem. Constaint doesnt fail when I apply. its fails when we make a change in component.
kbwbe wrote:
Fri Jul 12, 2019 6:40 am
Hi,
Hi @Klaus,
any news on Datum Plane in A2+?
dan-miel
Posts: 65
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Fri Jul 12, 2019 1:47 pm

Zolko wrote:
Fri Jul 12, 2019 9:16 am
probably the classical topological naming problem of FreeCAD
Zolko wrote:
Fri Jul 12, 2019 9:16 am
This problem exists in all CAD systems, more or less severe, and in FreeCAD it's very severe
I think the main reason that FreeCAD's seems so severe is that the error message just says to delete the last mate. In many cases the last mate may have caused the error but it may not be the mate that you want to delete. In this case it would be nice to know which mates are failing.

Hi Kbwbe. Can the mates that fail be highlighted in the tree or perhaps a list of the mates be made so that we can easily see which mates we need to fix?
Thanks.
Dan
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 » Fri Jul 12, 2019 4:38 pm

AIMEDSOLUTIONS wrote:
Fri Jul 12, 2019 7:08 am
HI Kbwbe (i dont know your name or what I can call you)
I think I didnt clearly mentioned my problem. Constaint doesnt fail when I apply. its fails when we make a change in component.
Hi @AIMEDSOLUTIONS,
thank you for the additional information. As @Zolko wrote correctly, you have been running into the infamous topological naming issue of FC. During modifications of parts FC very often renumbers the vertexes, edges and faces. But the constraints refer to the original numbering before the modifications.

To improve this situation, A2plus offers an option within preferences: "use experimental topological naming". If activating this (before placing the very first part into an assembly), the constraints will break much less. But it helps not always. Best way then is to delete all constraints of the modified part and define them again. (Sorry for no better way at moment).
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
cron