Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
jbe
Posts: 279
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: Another approach to assembly solver (assembly2relaunch)

Postby jbe » Sun Jun 17, 2018 7:55 pm

I use Freecad 0.18.
Don't worry, I use with FreeCAD with pupil to 12 to 15 year's old, and 3D printer for project, and program with Arduino.
Best regard.
jbe
Posts: 279
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: Another approach to assembly solver (assembly2relaunch)

Postby jbe » Sun Jun 17, 2018 8:32 pm

assemblage v2.fcstd
(539.3 KiB) Downloaded 47 times
assemblage phare.fcstd
(7.44 KiB) Downloaded 41 times
When we put a constraint could you add the constraint on the two elements, on the left side of the screen (body construction).
It will easier to understand in complex assembly.

Best regard.
kbwbe
Posts: 986
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Postby kbwbe » Sun Jun 17, 2018 9:14 pm

I noticed the problem and can reproduce it.
It is not intended. Constraints should be visible below both of involved parts. This is a bug, will try to fix it.

kbwbe

PS: Just playing around with fc0.18: solver works. But updating imported parts not. I think i will have to deactivate this function during next next time for users of fc0.17/18
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.48, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
User avatar
easyw-fc
Posts: 2928
Joined: Thu Jul 09, 2015 9:34 am

Re: Another approach to assembly solver (assembly2relaunch)

Postby easyw-fc » Sun Jun 17, 2018 9:25 pm

kbwbe wrote:
Sun Jun 17, 2018 9:14 pm
PS: Just playing around with fc0.18: solver works. But updating imported parts not. I think i will have to deactivate this function during next next time for users of fc0.17/18
for me the updater is working...
What messages do you get in Report panel?

I'm on
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git)
Build type: Release
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
kbwbe
Posts: 986
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Postby kbwbe » Sun Jun 17, 2018 10:13 pm

Good to hear you, several items...

1) please find attached two files. fc0.18 assembly and fc0.18 part
The problem was not reported in report panel. I got messages on screen like "constraint xyz is broken" during reimport.
But now, the problem suddenly disappeared. it works. Do not know why.
Perhaps you can try to reproduce the problematic situation. My old fc0.16-toponamer is shurely involved. It is still present.

2) Prefrence page seems not to be clean. There are relicts (in sourcecode and i think compiled resources), which refer to assembly2.

I intend to work few days on file solversystem.py only. This would be a good point, to have a look about prefences-page and perhaps other things, if this would please to you. If you have some suggestions to other parts of the workbench, it will merge them.

When I start FreeCAD, i often still note messages as: "cannot find module a3lib". Grepping the code, there is nothing to find about a3lib anymore! Whats the problem?

much thanks for your appreciated help,

klaus

My system:
OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6712 (Git) (Tests done with 0.18-daily 13964)
Build type: None
Branch: releases/FreeCAD-0-16
Hash: da2d364457257a7a8c6fb2137cea12c45becd71a
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
part-1.fcstd
(13.66 KiB) Downloaded 32 times
asm-1.fcstd
(8.3 KiB) Downloaded 32 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.48, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
kbwbe
Posts: 986
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Postby kbwbe » Tue Jun 19, 2018 6:18 pm

Find attached new version.

Improvements:
- Solver warns if constraints are not solvable and does not mismatch assembly
- removed some unused old stuff
- small errors fixed.

Next:
- Undo for solving actions

Solver warning looks like:
.
.
Constraint-Mismatch.png
Constraint-Mismatch.png (128.87 KiB) Viewed 1810 times
.
.
EDIT: FOR TESTING DO ALWAYS A FRESH ASSEMBLY. DATASTRUCTURE IS CHANGING MUCH. ASSEMBLIES DONE WITH VERSIONS BEFORE WILL SHOW ERRORS AND WILL NOT OPEN CORRECTLY.
.
kbwbe
Attachments
a2plus-2018-06-19-01.zip
(556.95 KiB) Downloaded 34 times
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.48, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
kbwbe
Posts: 986
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Postby kbwbe » Tue Jun 19, 2018 10:04 pm

Did some test more.
In some usecases, i got the message that the constraints where not to be solvable. But they where correct.
Problem is: The required accuracy could not be reached by solver within the maximum solver steps.
When i reduced the required accuracy, it worked.

I will think about a better way. ( I have to improve convergence of calculations )

kbwbe
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.48, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (assembly2relaunch)

Postby Turro75 » Tue Jun 19, 2018 10:14 pm

Great! really impressive.
testing on realthunder branch, no big issues so far.

One question:

how to do a parallel/angled plane constraints?

Regards
kbwbe
Posts: 986
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (assembly2relaunch)

Postby kbwbe » Wed Jun 20, 2018 6:30 am

@Turro75

parallel/angled constraint is not implemented at moment. I will add soon. In theory it can be implemented adding one new constraint.

First, I will split it up:

1) Parallel constraint: Very easy as only to align one axis. (I will add it shortly in next versions)
2) Angled constraint: Have to think about implementation of additional rotation axis. (will need a bit more time)

Your test where on RealThunder's branch. Yeah! Perhaps it is possible to use his toponaming. (If he will allow! :D )
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.48, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
Turro75
Posts: 176
Joined: Mon Aug 15, 2016 10:23 pm

Re: Another approach to assembly solver (assembly2relaunch)

Postby Turro75 » Wed Jun 20, 2018 7:54 am

Ok thanks