Assembly 4 workbench

Discussion about the development of the Assembly workbench.
User avatar
bambuko
Posts: 129
Joined: Thu Oct 24, 2019 12:53 pm

Re: Assembly 4 workbench

Postby bambuko » Thu Sep 24, 2020 6:25 pm

Kunda1 wrote:
Thu Sep 24, 2020 5:12 pm
Post your About info
sorry, my bad :oops:
Have updated my original post
User avatar
Zolko
Posts: 1041
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Postby Zolko » Thu Sep 24, 2020 9:33 pm

bambuko wrote:
Thu Sep 24, 2020 4:32 pm
When I fire FreeCAD and select Assembly 4 workbench, I get following reports:

Code: Select all

17:27:03  Unknown command 'Part_Import'
17:27:03  Unknown command 'Asm4_insertRod'
17:27:03  Unknown command 'Asm4_FSparameters'
it was a bug, should be fixed now, please update the workbench to 0.9.9
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
louisgag
Posts: 47
Joined: Fri Jan 17, 2020 9:59 am

Re: Assembly 4 workbench

Postby louisgag » Fri Sep 25, 2020 4:23 am

Fixed for me. Thank you.
User avatar
bambuko
Posts: 129
Joined: Thu Oct 24, 2019 12:53 pm

Re: Assembly 4 workbench

Postby bambuko » Fri Sep 25, 2020 7:00 am

Zolko wrote:
Thu Sep 24, 2020 9:33 pm
...it was a bug, should be fixed now, please update the workbench to 0.9.9
Thank you, updated and OK
User avatar
Kunda1
Posts: 8405
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 workbench

Postby Kunda1 » Fri Sep 25, 2020 1:26 pm

Thanks for fix, Zolko!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
catman
Posts: 260
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly 4 workbench

Postby catman » Tue Sep 29, 2020 12:22 pm

The following is a quote from FreeCAD wiki on Expressions:
There is no concept of global variables in FreeCAD at the moment. Instead, arbitrary variables can be defined as cells in a spreadsheet using the Spreadsheet workbench...
I think this is not true any more.
Assembly4's variable feature in my view is exactly that.


Its not really global, however, because Its available only to Assembly4 parts. But I found that this feature even works when I move the variables folder out of the Assembly4 model and delete the remains of the Assembly4 model. The image below is an example of a very simple and intuitive-to-use parametric FreeCAD part
VariablesForAll.png
VariablesForAll.png (85.67 KiB) Viewed 234 times
FreeCAD parametric part with Assembly4's Variable feature

Looking into the Python code files, it seems to me that the variable code is in the single file 'VariablesLib.py'. If that is not really closely connected to other Assembly4 code, I am thinking whether it would be an idea to move the variable part into a separate workbench?
That way all other FreeCAD documents could greatly benefit from this feature.

However, as its code from @zolko, I would like to ask whether he thought about such a thing before or if there is something that would prevent that on a conceptual level.
project4
Posts: 192
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly 4 workbench

Postby project4 » Tue Sep 29, 2020 12:28 pm

I've asked zolko a while ago how do I access variables from sub-sub-links and his answer was that it's impossible to set such variables, only read them...
His proposal was to create a separate document, which will be linked to all other documents that want to use it.
It's very much the same as having a spreadsheet that will be linked to other documents.

Apparently there is no real "global" variable solution after all.
User avatar
Zolko
Posts: 1041
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Postby Zolko » Tue Sep 29, 2020 1:06 pm

catman wrote:
Tue Sep 29, 2020 12:22 pm
However, as its code from @zolko, I would like to ask whether he thought about such a thing before or if there is something that would prevent that on a conceptual level.
1) it's open/free source, you can copy it without my permission

2) you can create variables in pure parts: in the Assembly4 WB, create a new document, a new part, select the new part, and choose "Add Variable" and it will create the Variables placeholder to have variables in the part, which you can then use with whatever FreeCAD tool you want. Doesn't work with Bodies because they cannot contain such variables. Hum ... thinking about this ... would that make sense to create the Variables in the same document but outside a Body if no Part is selected ? EDIT: bah, I did it all the same: you can now create the Variables in any document.

3) there is already the "Dynamic Data" WB which also does that already (I think)

Therefore I'd not advise you to create a specific WB for variables.
Last edited by Zolko on Tue Sep 29, 2020 1:31 pm, edited 1 time in total.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
catman
Posts: 260
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly 4 workbench

Postby catman » Tue Sep 29, 2020 1:14 pm

project4 wrote:
Tue Sep 29, 2020 12:28 pm
I've asked zolko a while ago how do I access variables from sub-sub-links and his answer was that it's impossible to set such variables, only read them...
I did not think about referencing the variables from other files, just from the own document, mainly because a spreadsheet is a lot more cumbersome to use. For linking cross-document variables the spreadsheet allows to adds documentation more easily, maybe its better suited for this kind of use, indeed.

Very interesting. I would have expected that they could be addressed in expressions like any other object in the document:
documentName.Variables.<<myVariable>>
Thanks for that info.
catman
Posts: 260
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly 4 workbench

Postby catman » Tue Sep 29, 2020 1:33 pm

Zolko wrote:
Tue Sep 29, 2020 1:06 pm
2) you can create variables in pure parts: in the Assembly4 WB, create a new document, a new part, select the new part, and choose "Add Variable" and it will create the Variables placeholder to have variables in the part, which you can then use with whatever FreeCAD tool you want. Doesn't work with Bodies because they cannot contain such variables. Hum ... thinking about this ... would that make sense to create the Variables in the same document but outside a Body if no Part is selected ?
Works fine. I am not sure why the part selection is relevant. I think it does make sense to have one Variable leaf at the trees root level to contain all user modifiable parmeters for a document - especially if there are multiple bodies in it.
Zolko wrote:
Tue Sep 29, 2020 1:06 pm
3) there is already the "Dynamic Data" WB which also does that already (I think)
good point. Have not really checked that one out.
Zolko wrote:
Tue Sep 29, 2020 1:06 pm
Therefore I'd not advise you to create a specific WB for variables.
Thanks for the fast feedback.