realthunder / FreeCAD

Link branch FreeCAD
Other
790 stars 45 forks source link

WIP: testing sympy solver #460

Open looooo opened 6 years ago

looooo commented 6 years ago

some first tests with sympy (trying to constraint 2 simple boxes, point to point-constraint):

<asm3.gui> 122.859145 - gui.py(226): command "asm3CmdSolve" exception
Traceback (most recent call last):
  File ".../lib/python3.6/site-packages/freecad/assembly3/FCADLogger.py", line 106, in report
    return func(*args,**kargs)
  File ".../lib/python3.6/site-packages/freecad/assembly3/solver.py", line 348, in solve
    return _solve(*args,**kargs)
  File ".../lib/python3.6/site-packages/freecad/assembly3/solver.py", line 318, in _solve
    Solver(assembly,reportFailed,dragPart,recompute,rollback)
  File ".../lib/python3.6/site-packages/freecad/assembly3/solver.py", line 91, in __init__
    self.system.solve(group=self.group,reportFailed=reportFailed)
  File ".../lib/python3.6/site-packages/freecad/assembly3/sys_sympy.py", line 1278, in solve
    tol=algo.Tolerance,method=algo.getName(),options=algo.Options)
  File ".../lib/python3.6/site-packages/scipy/optimize/_minimize.py", line 593, in minimize
    return _minimize_powell(fun, x0, args, callback, **options)
  File ".../lib/python3.6/site-packages/scipy/optimize/optimize.py", line 2560, in _minimize_powell
    fval = squeeze(func(x))
  File ".../lib/python3.6/site-packages/scipy/optimize/optimize.py", line 293, in function_wrapper
    return function(*(wrapper_args + args))
  File ".../lib/python3.6/site-packages/freecad/assembly3/sys_sympy.py", line 1080, in F
    res = eq(*params)
TypeError: _lambdifygenerated() missing 6 required positional arguments: '_Dummy_49', '_Dummy_50', '_Dummy_51', '_Dummy_52', '_Dummy_53', and '_Dummy_54'
realthunder commented 6 years ago

I guess the sympy solver is pretty broken now. I'll get it back online after the next release.

looooo commented 6 years ago

great looking forward to test it.

luzpaz commented 3 years ago

@realthunder this issue is being de-prioritized? (just asking)