Can't get assembly3 to work

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
lcorley
Posts: 32
Joined: Tue Feb 16, 2021 5:12 pm

Can't get assembly3 to work

Post by lcorley »

Here's my version data:

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28697 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * A2plus 1.4.3
  * Assembly3 0.11.3
  * Assembly4 1.4.3
  * fcgear 1.4.3
  * LCInterlocking
  * Manipulator 1.4.3
  * sheetmetal 0.2.49
I'm trying to make an axial joint between two bodies. Here's the two bodies.
as3test1.png
as3test1.png (35.68 KiB) Viewed 1572 times
Here's what happens when I try to make the axial alignment
as3test2.png
as3test2.png (44.38 KiB) Viewed 1572 times
The bar doesn't move over to the rectangle. The rectangle is fixed. What should I check?

regards,
Leon
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Can't get assembly3 to work

Post by chrisb »

Moved from Help forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Can't get assembly3 to work

Post by FBXL5 »

lcorley wrote: Fri Apr 15, 2022 12:03 am The bar doesn't move over to the rectangle. The rectangle is fixed. What should I check?
:shock: I createt a similar situation as yours and experienced the same strange behaviour.
I deleted the constraint and recreated it once: same strange behaviour.
I deleted the constraint and recreated it again: same strange behaviour.
I deleted the constraint and recreated it a third time: all turned out as expected.

With the strange behaviour I got two messages:
- orange: ...redundant constraints
- black: ...dof remaining: 0

If it works well it is only:
- black: ...dof remaining: 2

2 is correct as the bar can move along and spin around the z axis of the element coordinate system.

I have no idea what puzzles the solver that it fails in this case. But I'm curious if this can be fixed easily.
User avatar
bambuko
Veteran
Posts: 2160
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Can't get assembly3 to work

Post by bambuko »

lcorley wrote: Fri Apr 15, 2022 12:03 am ...What should I check?
you should always (if possible) attach your file

Why should I have to spend time recreating your file? when you can save me the job by attaching it?

Anyway...
by locking one body/part in the assembly you are locking the whole assembly.
put each body in it's own assembly container and use Plane coincident constraint not Axial alignment
In the example shown, you are left with 1 degree of freedom.
BTW you can also use element offset and element flip to get things the aligning the way you want...
ass3.png
ass3.png (101.96 KiB) Viewed 1414 times
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Can't get assembly3 to work

Post by FBXL5 »

bambuko wrote: Fri Apr 15, 2022 9:28 am by locking one body/part in the assembly you are locking the whole assembly.
Not true. Only one part within the assembly (branch) is locked. The assembly can still be moved via e.g. placement properties.

If there had been a file I wouldn't have built a similar setup to confirm the strange behaviour.
But in most cases you are right, an attached file helps a lot.

And why should one use plane coincidence if axes should be aligned? For me it looks like a hinge im development.
But on the other hand there are several combinations of constraints possible to reach a goal.

The problem wasn't a wrong constraint, but that the solver did not perform as expected, which could be recreated on a different computer:

Code: Select all

OS: macOS 10.15
Word size of FreeCAD: 64-bit
Version: 0.20.28671 (Git)
Build type: Release
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * Reinforcement
  * Render 2022.1.0
  * sheetmetal 0.2.49
  * Curves 0.3.0
User avatar
bambuko
Veteran
Posts: 2160
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Can't get assembly3 to work

Post by bambuko »

Yes, you can use axial alignment, but that leaves you with two degrees of freedom, so you would need additional constraint.
Other issue with axial alignment is that, if the two are not reasonably close to each other the solver cannot cope with it
FBXL5 wrote: Fri Apr 15, 2022 12:18 pm
bambuko wrote: Fri Apr 15, 2022 9:28 am by locking one body/part in the assembly you are locking the whole assembly.
Not true. Only one part within the assembly (branch) is locked. The assembly can still be moved via e.g. placement properties.
I think we are misunderstanding each other... I didn't say that the assembly cannot be moved... :mrgreen:


FBXL5 wrote: Fri Apr 15, 2022 12:18 pm And why should one use plane coincidence if axes should be aligned? ...
Screenshot from 2022-04-15 13.40.15.png
Screenshot from 2022-04-15 13.40.15.png (42.36 KiB) Viewed 1372 times

If you are convinced that there is a genuine solver issue, you should report it here:
https://github.com/realthunder/FreeCAD_assembly3/issues
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: Can't get assembly3 to work

Post by FBXL5 »

bambuko wrote: Fri Apr 15, 2022 12:48 pm Other issue with axial alignment is that, if the two are not reasonably close to each other the solver cannot cope with it
I have read that somewhere before, but have never experienced problems (that could be recreated)...
bambuko wrote: Fri Apr 15, 2022 12:48 pm If you are convinced that there is a genuine solver issue, you should report it here:
... and so I have no idea if that is an issue or just the way the solver works and we have to live with that. :?
User avatar
bambuko
Veteran
Posts: 2160
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Can't get assembly3 to work

Post by bambuko »

FBXL5 wrote: Fri Apr 15, 2022 2:44 pm ... and so I have no idea if that is an issue or just the way the solver works and we have to live with that. :?
Part of the problem is that neither OP or you have shared your files so I don't know what have you chosen for the elements used in the constraint?
Have you used edges, cylindrical faces or planar faces?

I can use Axial alignment OK (and unlike OP my bar moves correctly to the rectangle with 2 degrees of freedom remaining...) - see below
In this example I have used cylindrical faces
Screenshot from 2022-04-15 16.04.01.png
Screenshot from 2022-04-15 16.04.01.png (112.72 KiB) Viewed 1319 times
Yes, I know it doesn't look OK, but here it is from another angle:
Screenshot from 2022-04-15 16.17.02.png
Screenshot from 2022-04-15 16.17.02.png (99.52 KiB) Viewed 1319 times
and here the elements I have used:
Screenshot from 2022-04-15 16.23.39.png
Screenshot from 2022-04-15 16.23.39.png (115.4 KiB) Viewed 1315 times
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
User avatar
bambuko
Veteran
Posts: 2160
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Can't get assembly3 to work

Post by bambuko »

FBXL5 wrote: Fri Apr 15, 2022 2:44 pm ... and so I have no idea if that is an issue or just the way the solver works and we have to live with that. :?
https://github.com/realthunder/FreeCAD_ ... ssues/1208
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
lcorley
Posts: 32
Joined: Tue Feb 16, 2021 5:12 pm

Re: Can't get assembly3 to work

Post by lcorley »

I apologize for not including the file. I as so busy patting myself on the back for remembering the version info that I apparently forgot. I tried repeating the constraint several times (per FBXL5) but it never worked. I used transform and moved the link arm close to its desired destination (per bambuko) to give the solver a hint, but still nothing.

I got started on this after watching the demo from JOKO Engineering (https://www.youtube.com/watch?v=Q6pbU2dVCfQ&t=2346s). The way he presented the "engine" model resonated with my concept of assemblies of parts.

regards,
Leon
Attachments
as3test.FCStd
(29.02 KiB) Downloaded 19 times
as3test3.png
as3test3.png (49.32 KiB) Viewed 1216 times
Post Reply