A parametric assembly to test Assembly4 new features

Discussion about the development of the Assembly workbench.
Post Reply
FCuser2019
Posts: 22
Joined: Fri Sep 13, 2019 12:15 pm

A parametric assembly to test Assembly4 new features

Post by FCuser2019 » Sat Nov 23, 2019 10:35 am

Hello, to test the new features introduced in Assembly 4 I tried to make an assembly of two pipes with flanged connection.
The assembly is fully parametric and is controlled by the parameters present in the spreadsheet contained in the Parametri_globali.FCStd file.
In the first version of the assembly it happened that the assembly broke modifying the number of holes of the flange (i.e. a voluntary modification of the topology). I solved the problem by changing the LCS map mode of the flange holes from "concentric to hole edge" to "ObjectXYZ" and using the expressions for the association offsets. In this way the assembly doesn't break anymore even if you change the number of holes.
I used the new functionality inside Assembly 4 to insert the screws and nuts, but not the washers. For washers I find it more convenient to have two LCSs: one LCS for one side of the washer and another LCS for the other side. In this way it is not necessary to know the actual thickness of the washer used by the author of the WB Fasteners: the washer attaches to the flange and the nut (or screw) attaches to the washer from the opposite side without needing to set an offset for the nut (or screw).
The new feature to create an array of linked objects is really very convenient to place all screws, washers and nuts defining only one LCS in a hole of the flange. But I'm not sure that the method I used is the most correct/easy to do this, also because it was not an immediate operation to find the correct values for the parameter "center" of Polar Array. However, also in this case the assembly works in a fully parametric way.

I have attached the .FCStd files (for more clarity with partially translated names and labels) for any suggestions/criticisms.

Thanks.
assembly.FCStd
(98.61 KiB) Downloaded 18 times
Attacco_flangiato-A4.FCStd
(31.25 KiB) Downloaded 15 times
Guarnizione-A4.FCStd
(21.99 KiB) Downloaded 15 times
rondella-ISO7089-M8-A4.FCStd
(7.13 KiB) Downloaded 15 times
Parametri_globali.FCStd
(2.45 KiB) Downloaded 16 times
User avatar
Zolko
Posts: 648
Joined: Mon Dec 17, 2018 10:02 am

Re: A parametric assembly to test Assembly4 new features

Post by Zolko » Sat Nov 23, 2019 8:26 pm

FCuser2019 wrote:
Sat Nov 23, 2019 10:35 am
The assembly is fully parametric and is controlled by the parameters present in the spreadsheet contained in the Parametri_globali.FCStd file.
nice ... but why did you put the spreadsheet in a separate file ? Why not put it directly in the assembly file ? I did that, to try, and it seems to work.

FCuser2019 wrote:
Sat Nov 23, 2019 10:35 am
In the first version of the assembly it happened that the assembly broke modifying the number of holes of the flange (i.e. a voluntary modification of the topology). I solved the problem by changing the LCS map mode of the flange holes from "concentric to hole edge" to "ObjectXYZ" and using the expressions for the association offsets. In this way the assembly doesn't break anymore even if you change the number of holes.
good to know. Are you talking about the Hole-LCS things that you make when clicking on the edge of a hole ?

FCuser2019 wrote:
Sat Nov 23, 2019 10:35 am
I used the new functionality inside Assembly 4 to insert the screws and nuts, but not the washers. For washers I find it more convenient to have two LCSs: one LCS for one side of the washer and another LCS for the other side. In this way it is not necessary to know the actual thickness of the washer used by the author of the WB Fasteners: the washer attaches to the flange and the nut (or screw) attaches to the washer from the opposite side without needing to set an offset for the nut (or screw).
yes, I was thinking about it too, but didn't know what to decide. So I left it as it was originally in the Fasteners WB

FCuser2019 wrote:
Sat Nov 23, 2019 10:35 am
The new feature to create an array of linked objects is really very convenient to place all screws, washers and nuts defining only one LCS in a hole of the flange. But I'm not sure that the method I used is the most correct/easy to do this, also because it was not an immediate operation to find the correct values for the parameter "center" of Polar Array. However, also in this case the assembly works in a fully parametric way.
I think that what you did is very good, now this should somehow be automated. We can't assume that every user will be able to reproduce what you did. What you put into the spreadsheet should be in the LinkArray class.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
FCuser2019
Posts: 22
Joined: Fri Sep 13, 2019 12:15 pm

Re: A parametric assembly to test Assembly4 new features

Post by FCuser2019 » Sun Nov 24, 2019 11:46 am

Zolko, thank you for your remarks.

Zolko wrote:
Sat Nov 23, 2019 8:26 pm
nice ... but why did you put the spreadsheet in a separate file ? Why not put it directly in the assembly file ? I did that, to try, and it seems to work.
I put the spreadsheet in a separate file just to learn how to use this possibility, of course the spreadsheet can be in one of the other files.

Zolko wrote:
Sat Nov 23, 2019 8:26 pm
good to know. Are you talking about the Hole-LCS things that you make when clicking on the edge of a hole ?
Yes. In the first version of the assembly, LCS_1 of the gasket it was concentrically attached to the edge of the central hole (as visible in the following image of a 6-hole flange):
LCS1_gask_6holes.png
LCS1_gask_6holes.png (45.27 KiB) Viewed 492 times

Changing the number of holes from 6 to 8 changes the names associated with the edges:
LCS1_gask_8holes.png
LCS1_gask_8holes.png (53.11 KiB) Viewed 492 times

and obviously the assembly is ruined in this way:
broken_assembly_8holes.png
broken_assembly_8holes.png (108.18 KiB) Viewed 492 times

if instead LCS_1 is attached to the gasket as the LCS_0 created by default by Assembly 4 and then is placed in the right place through the expressions, then the problem does not occur anymore.

Zolko wrote:
Sat Nov 23, 2019 8:26 pm
What you put into the spreadsheet should be in the LinkArray class.
Is it already possible to do this?
User avatar
Zolko
Posts: 648
Joined: Mon Dec 17, 2018 10:02 am

Re: A parametric assembly to test Assembly4 new features

Post by Zolko » Sun Nov 24, 2019 1:36 pm

FCuser2019 wrote:
Sun Nov 24, 2019 11:46 am
Zolko wrote:
Sat Nov 23, 2019 8:26 pm
What you put into the spreadsheet should be in the LinkArray class.
Is it already possible to do this?
not quite, but some others are also working on the same subject:
https://forum.freecadweb.org/viewtopic. ... 20#p349073
https://forum.freecadweb.org/viewtopic. ... 30#p349276

My gut feeling is that taking the Draft.Array as-is will not fit the Assembly4 workbench very well, and instead we should try to replicate the same functionality, by duplicating some of the Draft.Array code. I'm not sure that code for 2D drawings can be best used for 3D assemblies.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
vocx
Posts: 2829
Joined: Thu Oct 18, 2018 9:18 pm

Re: A parametric assembly to test Assembly4 new features

Post by vocx » Sun Nov 24, 2019 4:38 pm

Zolko wrote:
Sat Nov 23, 2019 8:26 pm
...
I think that what you did is very good, now this should somehow be automated. We can't assume that every user will be able to reproduce what you did. What you put into the spreadsheet should be in the LinkArray class.
I guess FCuser2019 did what I was thinking, which is using expressions to define the properties of the array.
vocx wrote:
Fri Nov 22, 2019 4:04 pm
I guess it could be done with expressions. You'd need a way to calculate the new properties of the array to use those variables that you define.
Zolko wrote:
Sun Nov 24, 2019 1:36 pm
My gut feeling is that taking the Draft.Array as-is will not fit the Assembly4 workbench very well, and instead we should try to replicate the same functionality, by duplicating some of the Draft.Array code. I'm not sure that code for 2D drawings can be best used for 3D assemblies.
I think this would be a good idea if you think the current Draft Array is limited. As I mentioned before, the Array is not a 2D object; it is a generic object which can create arrays of planar objects but also 3D solids. This tool is in the Draft Workbench for historical reasons but it could well be a generic command usable in all workbenches.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
Zolko
Posts: 648
Joined: Mon Dec 17, 2018 10:02 am

Re: A parametric assembly to test Assembly4 new features

Post by Zolko » Sun Nov 24, 2019 10:38 pm

vocx wrote:
Sun Nov 24, 2019 4:38 pm
This tool is in the Draft Workbench for historical reasons but it could well be a generic command usable in all workbenches.
yes, that was exactly my though: that tool is so useful that it should be available for every workbench. And to be even more usable, the axis of the polar array should be selectable from any datum axis (PartDesign::Line)
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
FCuser2019
Posts: 22
Joined: Fri Sep 13, 2019 12:15 pm

Re: A parametric assembly to test Assembly4 new features

Post by FCuser2019 » Mon Nov 25, 2019 8:44 pm

Zolko wrote:
Sun Nov 24, 2019 1:36 pm
not quite, but some others are also working on the same subject:
https://forum.freecadweb.org/viewtopic. ... 20#p349073
https://forum.freecadweb.org/viewtopic. ... 30#p349276
Thanks for this information.


vocx wrote:
Sun Nov 24, 2019 4:38 pm
I guess FCuser2019 did what I was thinking, which is using expressions to define the properties of the array.
Yes.


Zolko wrote:
Sun Nov 24, 2019 10:38 pm
...
And to be even more usable, the axis of the polar array should be selectable from any datum axis (PartDesign::Line)
I agree.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests