Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
gjbgeo
Posts: 4
Joined: Wed Feb 27, 2019 3:39 am

Re: Assembly 4 workbench

Post by gjbgeo »

Apologies if this has already been addressed.

I have just noticed if I move the folder containing an assembly, the links to object uses the full file path. For example, see the error in the image below.

Is is possible to use relative paths?

Thanks!

Image

OS: Debian GNU/Linux 10 (buster) (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18614 (Git) AppImage
Build type: Release
Branch: master
Hash: efd55884ad7d40e77571a60c5bb906bbd8d1cbbd
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

gjbgeo wrote: Sat Nov 30, 2019 10:38 pm Apologies if this has already been addressed.
yes, it was reported, it was an App::Link bug that saved path absolute and not relative, and it's fixed now. Please use the latest v0.19 built.

https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
try the Assembly4 workbench for FreCAD — tutorials here and here
aapo
Posts: 615
Joined: Mon Oct 29, 2018 6:41 pm

Re: Assembly 4 workbench

Post by aapo »

Zolko wrote: Sat Nov 30, 2019 10:55 pm yes, it was reported, it was an App::Link bug that saved path absolute and not relative, and it's fixed now. Please use the latest v0.19 built.

https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre
As a side note, you can fix your old model to use relative paths by simply loading it in its original directory structure into a newer version of FreeCAD, and then saving everything without making any changes. After that it will be possible to freely move/copy your model to some other directory path. At least, that worked for me in the same situation.
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly 4 workbench

Post by ppemawm »

Zolko wrote: Sun Nov 24, 2019 10:25 pm new version 0.7.4: I added an animate command. It allows to easily move parts in an Assembly4 assembly, by setting a variable in the Variables entity.
Thank you for those two enhancements. I especially appreciate the Variables tool which I will use from now on for sketches. Now, if we could just get the capability to add Expressions to the variable value?

So, I continued to explore top-down-design or in-context modelling with Assembly4 this week and tried something different by using shapebinders of the master sketch and external references rather than carbon copy. I was wondering if the animation performance would be improved. It was not. It seems all the time is in solving the master sketch for a change in the variable.

This assembly model of an articulating mechanism was built using drawings from a design by Brian Rupnow (2008), similar in complexity to my last project. A few comments regarding the process with a few screenshots:

This is a flyball governor typically used in a steam engine to signal an overspeed condition.  As the pulley speed increases to the maximum, the air valve closes which provides a control signal.<br /><br />The model was created in the same manner as my previous models starting with a top level master sketch.  In this example, however, I used shapebinders with external references of the master sketch for each articulating body.<br /><br />Assembly4 was only used for the pins in the articulating joints.
This is a flyball governor typically used in a steam engine to signal an overspeed condition. As the pulley speed increases to the maximum, the air valve closes which provides a control signal.

The model was created in the same manner as my previous models starting with a top level master sketch. In this example, however, I used shapebinders with external references of the master sketch for each articulating body.

Assembly4 was only used for the pins in the articulating joints.
Picture1.1.png (213.03 KiB) Viewed 2398 times
This is the master sketch which controls the articulation by the single variable &quot;spring length&quot; as defined in an Assembly4 Variables.  It takes about 10-12 seconds for the sketch solver for each change in the variable value.<br /><br />The variable can only be changed in small steps (&lt;2 mm) to avoid breaking the sketch due to ambiguous constraints in the sketches for the Lower Ball Arm.  I spent sometime trying to improve these but gave up after several iterations.
This is the master sketch which controls the articulation by the single variable "spring length" as defined in an Assembly4 Variables. It takes about 10-12 seconds for the sketch solver for each change in the variable value.

The variable can only be changed in small steps (<2 mm) to avoid breaking the sketch due to ambiguous constraints in the sketches for the Lower Ball Arm. I spent sometime trying to improve these but gave up after several iterations.
Picture1.2.png (229.83 KiB) Viewed 2398 times
A carbon copy of the master sketch was used to capture the LCS's for all of the pin joints.  The pins were merged from a generic pin Part file and edited for the appropriate length and diameter for each joint.  Assembly4 was used to link each pin to its proper LCS, define the variable spring length, and animate the mechanism to verify proper motion.
A carbon copy of the master sketch was used to capture the LCS's for all of the pin joints. The pins were merged from a generic pin Part file and edited for the appropriate length and diameter for each joint. Assembly4 was used to link each pin to its proper LCS, define the variable spring length, and animate the mechanism to verify proper motion.
Picture1.3.png (201.45 KiB) Viewed 2398 times
The compression spring returns the flyballs to their resting position at zero speed.  The spring's Helix parameters (height and pitch) are related to the Variables spring length as shown above.  The pitch of the helix is simply its height/no. of coils.<br /><br />Part&gt;mirrors were used for the upper and lower control arms and the flyballs.
The compression spring returns the flyballs to their resting position at zero speed. The spring's Helix parameters (height and pitch) are related to the Variables spring length as shown above. The pitch of the helix is simply its height/no. of coils.

Part>mirrors were used for the upper and lower control arms and the flyballs.
Picture1.4.png (178.84 KiB) Viewed 2398 times
This GIF is from several images rather a screen recorder of the Assembly4 animator<br /> since it was much too slow and it generated a too large of file to attach.
This GIF is from several images rather a screen recorder of the Assembly4 animator
since it was much too slow and it generated a too large of file to attach.
3hy0ly.gif (308.28 KiB) Viewed 2398 times
.
Assembly4 is proving to be an excellent vehicle for top-down-design or in-context modelling. It has become my starting workbench!

Questions for Zolko:
Is there any way to delete Assembly4 Variables?
Can expressions be added to the Variables value?

If anyone has interest in the FreeCAD file of this model please PM me for a Dropbox download link.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18778 (Git)
Build type: Release
Branch: master
Hash: f55cf3ef103532c9718c108bd856a4ef06ad49a5
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Sun Dec 01, 2019 5:47 pm I especially appreciate the Variables tool which I will use from now on for sketches. Now, if we could just get the capability to add Expressions to the variable value?
You already can: you can set the value of one variable based on entries from other variables by an ExpressionEngine: right-click in the Properties window and toggle "Show All". You'll see a bunch of new parameters, AND in your variables value field appears on the right the "function" icon with which you can enter an expression. I only tried to divide by 2, I don't know how much it can do.

In this Show-All mode you can also delete variables

ppemawm wrote: Sun Dec 01, 2019 5:47 pm So, I continued to explore top-down-design or in-context modelling with Assembly4 this week and tried something different by using shapebinders of the master sketch and external references rather than carbon copy. I was wondering if the animation performance would be improved. It was not. It seems all the time is in solving the master sketch for a change in the variable.
OK. I would have many questions, so may-be I'd rather take your offer:

If anyone has interest in the FreeCAD file of this model please PM me for a Dropbox download link.
Could-you please send me by PM a download link to your assembly ?
I'm curious to see how you built your model in the details.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly 4 workbench

Post by ppemawm »

Zolko wrote: Sun Dec 01, 2019 9:33 pm You already can: you can set the value of one variable based on entries from other variables by an ExpressionEngine:
In this Show-All mode you can also delete variables
Exactly what I needed. Thanks. Quite powerful.
Zolko wrote: Sun Dec 01, 2019 9:33 pm Could-you please send me by PM a download link to your assembly ?
I'm curious to see how you built your model in the details.
Will do...I am interested in any feedback regarding the proper work flow as the software intends.
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Mon Dec 02, 2019 12:49 am Will do...I am interested in any feedback regarding the proper work flow as the software intends.
thank-you, very interresting. I wouldn't have done it like that though: I'd rather use a first — static — master sketch at a particular position of the movement, and another — dynamic — master sketch representing the movement, where the movement's parameter is set to be one of the variables in the Variables object. And then, I attach all the LCS to the dynamic master sketch, and then I link the static parts to the dynamic LCS: thus, the parts are not recalculated at each step.

This of course doesn't apply to the spring which needs recalculation at each step, and I think that that is the longest calculation.

I'd be happy to get your feedback on my modifications to your assembly.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly 4 workbench

Post by ppemawm »

Zolko wrote: Mon Dec 02, 2019 3:20 pm I'd rather use a first — static — master sketch at a particular position of the movement, and another — dynamic — master sketch representing the movement, where the movement's parameter is set to be one of the variables in the Variables object....
thus, the parts are not recalculated at each step....
the spring which needs recalculation at each step, and I think that that is the longest calculation.
Quite clever. Now I have a whole new direction to explore.
Thank you for your time to investigate and improve my model.

I disabled the spring and it cuts the cycle time approximately in half.
"It is a poor workman who blames his tools..." ;)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ppemawm wrote: Mon Dec 02, 2019 4:30 pm I disabled the spring and it cuts the cycle time approximately in half.
I made an update to the Assembly4 workbench (v0.7.5), which should improve the variable's handling and the animation speed. With that, when I disabled the spring calculation, the movement was in real-time. May-be you could give it a try ?

(what the animation now does is to update the assembly only, the Model, and not the entire document. Thus, parts that are in the same document but are linked into the assembly are not recalculated, only their positions. Except of course for the spring.)
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Assembly 4 workbench

Post by ppemawm »

Zolko wrote: Mon Dec 02, 2019 5:42 pm I made an update to the Assembly4 workbench (v0.7.5), which should improve the variable's handling and the animation speed.May-be you could give it a try ?
Yes, indeed. Much improved. Thanks, again.

That makes an excellent case to add all of the moving parts to the assembly Model as they are created so that clearances and collisions can be conveniently checked with the animator as the design progresses.
"It is a poor workman who blames his tools..." ;)
Post Reply