Page 169 of 185

Re: Another approach to assembly solver (A2plus)

Posted: Thu Jan 16, 2020 10:59 am
by Koemi
You should delete the complete A2plus subfolder in your Mod directory and reinstall the workbench.

Thanks kbwbe, this is the solution :mrgreen:

Re: Another approach to assembly solver (A2plus)

Posted: Sat Jan 18, 2020 4:33 am
by dan-miel
I get an error when I try to constrain two edges. I removed FreeCAD 18 and installed 19 on my machine. There are no modified files in the Mod directory. I cannot find where to copy the versions of the programs to the post but I aam attaching a screen shot of the error code and the assembly file. Any thoughts?
Thanks for your time.

Dan Miel

Re: Another approach to assembly solver (A2plus)

Posted: Sat Jan 18, 2020 7:20 am
by vocx
dan-miel wrote: Sat Jan 18, 2020 4:33 am I cannot find where to copy the versions of the programs to the post but I aam attaching a screen shot...
Important information

Do not take a picture of the report view.

Code: Select all

Just copy the lines and paste them inside code tags. Like this.

Re: Another approach to assembly solver (A2plus)

Posted: Sat Jan 18, 2020 4:40 pm
by dan-miel
vocx wrote: Sat Jan 18, 2020 7:20 am I cannot find where to copy the versions of the programs to the post but I am attaching a screen shot...

Important information

Do not take a picture of the report view.

Code: Select allJust copy the lines and paste them inside code tags. Like this.
Thanks vocx, you are right.
After some machine maintenance and several down loads the new versions seems to be working. I'm not sure what single thing cleared the problem.
Where is a good source for the updated api commands? What code editors will work with it? VS is not giving me anything to work with.
Thanks
Dan

Re: Another approach to assembly solver (A2plus)

Posted: Sun Jan 19, 2020 10:46 am
by kbwbe
dan-miel wrote: Sat Jan 18, 2020 4:33 am I get an error when I try to constrain two edges
Hi Dan,
i also get this error:

Code: Select all

<Exception> Geometry.cpp(3829): Geom_TrimmedCurve::parameters out of range
It seems to be a FreeCAD bug, as i can reproduce this by using only the Part-WB.

I have reported this error here:
https://forum.freecadweb.org/viewtopic.php?f=3&t=42568

Re: Another approach to assembly solver (A2plus)

Posted: Sun Jan 19, 2020 3:44 pm
by kbwbe
dan-miel wrote: Sat Jan 18, 2020 4:33 am I get an error when I try to constrain two edges.

Code: Select all

<Exception> Geometry.cpp(3829): Geom_TrimmedCurve::parameters out of range
I have found this bug. Please update A2plus to version V0.4.40a

Re: Another approach to assembly solver (A2plus)

Posted: Sun Jan 19, 2020 6:26 pm
by unit1
Hello, is there possibility or workaround to know which constraints exactly are failing in A2+ assembly?

Because when going back and forth when editing parts need do some changes. I recently updating parts with update function, but then when adding more parts solver complains about new constraints and it saying that "delete last created constraint", but is aware of that failing constraints are with the part, which was changed and updated. Thus not knowing which constraints are failing, it is needed to delete all already edited part's constraints and redo from beginning(it's very cumbersome). Maybe it's my problem which I've not figured out reading all A2+ WB manual.

P. S. This experience is influenced by Soliworks assembly. When you do changes to parts, the changes reflects to assembly, if the constrains are failing, but solver shows which constraints exactly fail by some reason, that loses some plane, vertex etc. And you know what is wrong.

P. S. S.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Lithuanian/Lithuania (lt_LT)
A2+ WB V0.4.39a

Re: Another approach to assembly solver (A2plus)

Posted: Mon Jan 20, 2020 5:16 am
by dan-miel
kbwbe wrote: Sun Jan 19, 2020 3:44 pm <Exception> Geometry.cpp(3829): Geom_TrimmedCurve::parameters out of range

I have found this bug. Please update A2plus to version V0.4.40a
I updated to the new code and the edge constraint works. A couple of 'No control key" programs I'm working also had the same error. They also have this error when I select two planes They use your code but in a different way to return the true/false. The code starts on line 779 and In the Inigui you need to add lines 67 import and line 98.
I'm changing my code to use yours I thought you might want to know in case it might be a problem. I get the error in both FC 18 and 19. It did not show up until WB 39.a
Dan Miel




Traceback (most recent call last):
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_autoselect.py", line 158, in addSelection
selcontrol.divergehere(FreeCAD.ActiveDocument.Name, sel.Object.Name, sub)
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_autoselect.py", line 1687, in divergehere
self.name2(objinfo,sub)
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_autoselect.py", line 1725, in name2
form1.iconsSecondselection(FreeCADGui.Selection.getSelectionEx())
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_autoselect.py", line 783, in iconsSecondselection
list.append(a2p_constraints.AxialConstraint.isValidSelection(selection))
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_constraints.py", line 371, in isValidSelection
if ValidSelection(s1) and ValidSelection(s2):
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2p_constraints.py", line 364, in ValidSelection
return cylindricalFaceSelected(selectionExObj) \
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2plib.py", line 749, in cylindricalFaceSelected
axis, center, error = fit_rotation_axis_to_surface1(face.Surface)
File "C:\Users\dan-m\AppData\Roaming\FreeCAD\Mod\A2plus\a2plib.py", line 323, in fit_rotation_axis_to_surface1
uv = sum( [ [ (u,v) for u in linspace(0,1,n_u)] for v in linspace(0,1,n_v) ], [] )
<class 'NameError'>: name 'linspace' is not defined

Re: Another approach to assembly solver (A2plus)

Posted: Mon Jan 20, 2020 5:26 am
by dan-miel
unit1 wrote: Sun Jan 19, 2020 6:26 pm Hello, is there possibility or workaround to know which constraints exactly are failing in A2+ assembly?
Hi unit1 I have been trying to create a way to deal with these constraints. If you want to put you file up here I could use a real case problem to see if my idea works. If you want to try the program out I may have it working again in a day or two. but I can try it before then/
Dan Miel

Re: Another approach to assembly solver (A2plus)

Posted: Mon Jan 20, 2020 8:59 pm
by unit1
dan-miel wrote: Mon Jan 20, 2020 5:26 amHi unit1 I have been trying to create a way to deal with these constraints. If you want to put you file up here I could use a real case problem to see if my idea works. If you want to try the program out I may have it working again in a day or two. but I can try it before then/
Dan Miel
Hi, Dan,

I woul love to experiment :) Hmm I can share my model, but is it not finished yet completely. And it's made like in pseudo "explosion" view and some parts are left with 1 DOF to move them arround. See 7zip file with freecad files and assembly which is named "Cavity_assembly". The files: https://drive.google.com/open?id=1OelZj ... 79ygJ6_2uX