Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
zardozer
Posts: 49
Joined: Sat Nov 07, 2020 2:35 am

Re: Assembly 4 workbench

Post by zardozer »

Hi Zolko,
What do you think about making the 'move/attach a part' function keep the attachments that are already selected for a part? I'm finding that I often use this when I need to make a small attachment adjustment, say in xyz position/rotation, but I don't need to reattach it somewhere else. Right now, it resets the attachments so you have to go in an remake them. It would save a lot of clicks if it didn't do this. And if you did want to reattach it, it would be the same amount of clicks anyway since you're changing the attachment.
jmcornil
Posts: 133
Joined: Mon Nov 02, 2020 9:16 am
Location: Versailles (France)
Contact:

Re: Assembly 4 workbench

Post by jmcornil »

Good morning all

I just highlighted on a simple example a problem which slowed down my animations as well as the reloading of files.

It is just a pierced pad that rotates around its axis (I made the pocket in a second sketch for the needs of the demonstration)

  • In the first file Simple_Ex_01, the basic Sketch is defined with an explicit length of 50mm for the side. If it is rotated by varying <Angle> from 0 to 360 in steps of 1, the speed is correct.
  • In the Simple_Ex_02 file I introduced a variable <Length> of value 50 and I use this variable to define the length of the side of the Sketch. This file was saved before any animation.
  • If I then do the same animation as before, it is horribly slow.
    But especially when I save the same project (after the animation) in Simple_Ex_03 its size has drastically increased. And so it becomes very slow to load.
Is it bad (forbidden) to use such a variable of the <Model>?

Have a good day

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git) AppImage
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: French/France (fr_FR)
Attachments
Simple_Ex_01.FCStd
(21.96 KiB) Downloaded 104 times
Simple_Ex_02.FCStd
(22.55 KiB) Downloaded 88 times
Simple_Ex_03.FCStd
(178.36 KiB) Downloaded 86 times
zardozer
Posts: 49
Joined: Sat Nov 07, 2020 2:35 am

Re: Assembly 4 workbench

Post by zardozer »

Nevermind about the issue of not having the LCS selected when trying to move them. This seems to be an issue only in realthunder's linkstage 3 version. When using main .19, it works fine.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Assembly 4 workbench

Post by uwestoehr »

I need help to make an animation:
- I created a variable
- I want to use it in a formula

In YouTube videos I found they simply type into the formula field "Variables." but this doesn't work for me:
e8vurVwrDc.gif
e8vurVwrDc.gif (197.35 KiB) Viewed 3407 times

Could anybody help me please?
I have 4 parts that are placed according to the LCS so I want to rotate the LCS and all parts will rotate too. When I change the rotation angle manually, it works as i need it, the only issue is that I cannot animate the angle.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Assembly 4 workbench

Post by uwestoehr »

uwestoehr wrote: Mon Jan 11, 2021 5:43 pm In YouTube videos I found they simply type into the formula field "Variables." but this doesn't work for me:
Hmm, this works when I change the Attachment angle of the part, but not when I change the attachment angle of the LCS inside the part.

So I found now a way to animate but would like to understand why I cannot access the variable to any formula I want.
User avatar
alonso_jamm
Posts: 77
Joined: Mon Nov 11, 2019 11:32 pm

Re: Assembly 4 workbench

Post by alonso_jamm »

So I found now a way to animate but would like to understand why I cannot access the variable to any formula I want.
I am pretty sure this happens because the objects inside the linked body only have access to data inside the body which means that the variables stored in the assembly can't be accessed by the formula editor when you try to modify the attachment angle of the LCS. I think you can't access the variables inside the assembly from inside the linked body in order to avoid cyclic dependencies.
schmidtjr
Posts: 31
Joined: Sun Jan 03, 2021 7:27 pm

Re: Assembly 4 workbench

Post by schmidtjr »

Hi,

I've got a question. Maybe it sounds stupid, but here it goes :):
Can I attach a subassembly/part by more than one attachment point?

Scenario: I'm creating a suspension system. I've got a rear shock that consists of 2 parts. the main body and the moving rod. Now I've created an assembly file that combines both of them, let's call it shock assembly. It has a sketch that is used for the movement of the parts (and the sketch also limits max positions). So far it works great, no problem. But...

Now I want to add this shock assembly to be part of a bigger assembly. The bigger assembly contains the two body parts that are dampened by the shock. So this bigger assembly consists of part A and part B. each has a point where the shock should be attached.
Attaching the shock to part A is quite easy of course. (lower shock LCS to part A LCS). But how do I now attach upper shock LCS to part B LCS? In an ideal world keeping the constraints of shock assembly (min/max).
Or is this not possible?
Do I need to embedd main body and rod separatly in the "master assembly"? And define the shock sliding and min/max limits in the master assembly? And do this again for each and every "master assembly" that is using this shock?

Thank you very much for your answer,
Kind regards,
Martin Schmidt


stats:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23323 (Git)
Build type: Release
Branch: master
Hash: 512d5c6141aec52b6eecc67370336a28fde862a6
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/Germany (en_DE)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

schmidtjr wrote: Mon Jan 11, 2021 10:56 pm Can I attach a subassembly/part by more than one attachment point?
...
Or is this not possible?
It's not a stupid question, but it's not possible today: Assmebly4 needs a real 3D solver for that, which it's doesn't have yet. There are plans and discussion about it (see thread Discussion: Merging A2plus and Assembly4 for example).
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

alonso_jamm wrote: Mon Jan 11, 2021 7:44 pm
So I found now a way to animate but would like to understand why I cannot access the variable to any formula I want.
I am pretty sure this happens because the objects inside the linked body only have access to data inside the body
...
I think you can't access the variables inside the assembly from inside the linked body in order to avoid cyclic dependencies.
Exactly: you can access data in linked parts from within the assembly, but not the other way around. If you still wan to do it, you need to trick the system: include the same file in both the assembly and the sub-assembly, and store the common data in that common file. I tried and it works, but I don't know how robust that is.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Assembly 4 workbench

Post by uwestoehr »

Zolko wrote: Mon Jan 11, 2021 11:57 pm Exactly: you can access data in linked parts from within the assembly, but not the other way around
Thanks for the explanation. Meanwhile I created some cool animations. Many thanks for this feature!

However, concerning the variable handling in Assembly 4, I opened these issues:
https://github.com/Zolko-123/FreeCAD_As ... issues/161
https://github.com/Zolko-123/FreeCAD_As ... issues/162
https://github.com/Zolko-123/FreeCAD_As ... issues/163
(Only minor issues.)
Post Reply