Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
OficineRobotica
Posts: 433
Joined: Thu Feb 21, 2019 8:17 am
Contact:

Re: Assembly 4 workbench

Post by OficineRobotica »

Well....for me it's a 404 page. :?:
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

Zolko wrote: Sat Oct 12, 2019 12:46 pm I have put together a tutorial to build a first simple assembly from scratch with Assembly4:
https://github.com/Zolko-123/FreeCAD_As ... TORIAL1.md
Asm_tuto1_final.png
Asm_tuto1_final.png (308.44 KiB) Viewed 3224 times
OficineRobotica wrote: Sat Oct 12, 2019 5:18 pm Well....for me it's a 404 page. :?:
yeah, sorry, it's fixed now
try the Assembly4 workbench for FreCAD — tutorials here and here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly 4 workbench

Post by triplus »

Zolko wrote: Sat Oct 12, 2019 12:46 pm If you could have a look and tell me if that's understandable and useful would be very nice. I can update and complete this tutorial with your comments.
Great. Will take a look in the next days.
fitz
Posts: 18
Joined: Thu Mar 14, 2019 12:03 pm

Re: Assembly 4 workbench

Post by fitz »

When i try to insert an existing part I get an error:
Traceback (most recent call last):
File "C:\Users\davfit\AppData\Roaming\FreeCAD\Mod\Assembly4\insertLinkCmd.py", line 87, in onCreateLink
createdLink = self.activeDoc.getObject('Model').newObject( 'App::Link', linkName )
AttributeError: 'NoneType' object has no attribute 'newObject'


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18504 (Git)
Build type: Release
Branch: master
Hash: f66023a646db4b2502bb3637897443b3525ca3c7
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/Canada (fr_CA)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

fitz wrote: Tue Oct 15, 2019 8:02 pm When i try to insert an existing part I get an error:
Traceback (most recent call last):
File "C:\Users\davfit\AppData\Roaming\FreeCAD\Mod\Assembly4\insertLinkCmd.py", line 87, in onCreateLink
createdLink = self.activeDoc.getObject('Model').newObject( 'App::Link', linkName )
AttributeError: 'NoneType' object has no attribute 'newObject'
Damned !

In the current Assembly4 workbench insertLinkCmd.py, that line:

Code: Select all

createdLink = self.activeDoc.getObject('Model').newObject( 'App::Link', linkName )
is line 98 not 87, so you are probably using an older version of the workbench (probably v0.5.3). Could you please update the Assembly4 WB with the addon manager ?

If it gets a NoneType then probably that the getObjet('Model') command didn't return anything, meaning that there probably is now 'Model'. Did you create a new 'Model' befor trying to insert an existing part ?

Anyway, this error should have been caught, I'll fix it.
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 »

New version 0.6.3 out.

Big difference: it is now possible to make assemblies with parts all in 1 document. There still can be only 1 Assembly4 Model per file (document), but a doc can now contain many parts and they can be linked to form a Assembly4 assembly in the same file. This is limited to 1-level assemblies (no nested assemblies in single-file assemblies) because there can only be 1 Assembly4 Model per file. For multi-level nested assemblies multiple files are needed (as before).

I'm not sure about the use-case, but some people seem to want such a usage.

All the tools are identical : LCS, Placements, App::Link, ExpressionEngine ...
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 workbench

Post by Kunda1 »

Zolko wrote: Tue Oct 15, 2019 9:54 pm New version 0.6.3 out.
Maybe you should add this info in to your forum signature, just like @realthunder does ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
fitz
Posts: 18
Joined: Thu Mar 14, 2019 12:03 pm

Re: Assembly 4 workbench

Post by fitz »

Zolko wrote: Tue Oct 15, 2019 8:40 pm

Damned !

In the current Assembly4 workbench insertLinkCmd.py, that line:

Code: Select all

createdLink = self.activeDoc.getObject('Model').newObject( 'App::Link', linkName )
is line 98 not 87, so you are probably using an older version of the workbench (probably v0.5.3). Could you please update the Assembly4 WB with the addon manager ?

If it gets a NoneType then probably that the getObjet('Model') command didn't return anything, meaning that there probably is now 'Model'. Did you create a new 'Model' befor trying to insert an existing part ?

Anyway, this error should have been caught, I'll fix it.
It work #1 with the updated version.
Thank you!
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 »

https://github.com/Zolko-123/FreeCAD_As ... TORIAL1.md

Thank you for this tutorial. Nicely done. Just what I was waiting for. I was able to complete the assembly model per your instructions and actually understood the concepts for the most part. I like your format better than a video.

Please note in the instructions regarding the bearing file:

"If you haven't done so then download the STEP file bearing_20x37x9.stp to the same local directory as the 3 previous documents: axis.fcstd, bearing.fcstd, and asm_tuto1.fcstd."

This link does not produce the .step file of the bearing but rather a lengthy piece of code, so I just downloaded a similar bearing from
McMaster-Carr: https://www.mcmaster.com/standard-ball- ... r-bearings so that I could finish the tutorial.
Maybe I was supposed to execute the code? But, then I would have to learn how to do that.

I will next try to build the assembly with all the bodies in the same file since this is similar to how I have been working with in-context modelling.
Assembly4 seems similar in concept except I have been using the Body origins as the LCS's which, of course, are not linked or constrained. For comparison, I may go back to one of my larger assemblies and try to build an assembly4 file to gain the constraint advantage.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18356 (Git)
Build type: Release
Branch: master
Hash: 12335c7d52376c140c5328d57902d2c0afdeb588
Python version: 3.6.8
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 workbench

Post by Kunda1 »

ppemawm wrote: Wed Oct 16, 2019 6:46 pm https://github.com/Zolko-123/FreeCAD_As ... TORIAL1.md

"If you haven't done so then download the STEP file bearing_20x37x9.stp to the same local directory as the 3 previous documents: axis.fcstd, bearing.fcstd, and asm_tuto1.fcstd."

This link does not produce the .step file of the bearing but rather a lengthy piece of code
What's you're calling lengthy piece of code is actually the raw (as in no other content should be in the file, just the pure contents of it) .step file. Essentially, you can right click on that link and download it directly to your local machine and it should save as the pure .step.

FYI, if you ever want to download a file from github (and prefer not to use git) you can use https://minhaskamal.github.io/DownGit/

@zolko you should probably add a parenthesis telling the user to (right click and save the file)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply