[Assembly3] Super simple assembly fails to solve

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
fvollmer
Posts: 1
Joined: Sat Jan 02, 2021 2:03 pm

[Assembly3] Super simple assembly fails to solve

Post by fvollmer »

Hi,
I've freshly installed freecad and the assembly3 workbench via the addon manager, but even super simple assemblies aren't working. I just tried to assembly two rectangular objects. Is there somthing that I'm doing wrong?
freecad issue.JPG
freecad issue.JPG (68.3 KiB) Viewed 1145 times

Code: Select all

22:55:29  378.207122 <asm3.gui> gui.py(475): command "asm3CmdQuickSolve" exception
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\FreeCAD\Mod\Assembly3\.\freecad\asm3\solver.py", line 110, in __init__
    self.system.solve(group=self.group,reportFailed=reportFailed)
  File "C:\Users\user\AppData\Roaming\FreeCAD\Mod\Assembly3\.\freecad\asm3\sys_slvs.py", line 70, in solve
    raise RuntimeError(reason)
RuntimeError: not converging

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 675, in report
  File "C:\Users\user\AppData\Roaming\FreeCAD\Mod\Assembly3\.\freecad\asm3\solver.py", line 412, in solve
    return _solve(*args,**kargs)
  File "C:\Users\user\AppData\Roaming\FreeCAD\Mod\Assembly3\.\freecad\asm3\solver.py", line 382, in _solve
    Solver(assembly,reportFailed,dragPart,recompute,rollback)
  File "C:\Users\user\AppData\Roaming\FreeCAD\Mod\Assembly3\.\freecad\asm3\solver.py", line 113, in __init__
    raise RuntimeError(translate('asm3', 'Failed to solve {}: {}').format(
RuntimeError: Failed to solve simple#Assembly: not converging

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Assembly3 0.11.4
Attachments
simple.FCStd
(24.15 KiB) Downloaded 42 times
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: [Assembly3] Super simple assembly fails to solve

Post by jpg87 »

Hi,
I tested your file with the latest version of the Master branch as well as with the latest version of the Link branch.
The PlaneCoincident constraint does indeed seem to no longer work correctly, while the Attachment and PlaneAlignment constraints work from the same constraint elements. I created another body: same results.

@realthunder could you take a look please?
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: [Assembly3] Super simple assembly fails to solve

Post by FBXL5 »

This is a situation where the solver is unable to find a solution. If you move the part that is not fixed with either the Move part or Axial move tool to a different position (on the local XY plane) the solver will be able to find a solution.

The movement has to be larger than I expected before I tried and moving along the z axis was not successful.
You have to pull the handler alone until it reaches a position where the problematic part jumps into the expected place.

Somewhere in the Assembly3 wiki pages is a hint like: If the solver fails in first attempt, try to improve initial conditions by moving parts near the desired positions
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: [Assembly3] Super simple assembly fails to solve

Post by jpg87 »

Damn, I hadn't thought of this problem since Attachment was working! Obviously, as PlaneCoincident aligns the centers, we were far from the mark. But Attachment also aligns them, so why one and not the other?
My website : http://help-freecad-jpg87.fr updated 2023/11/06
Post Reply