Assembly4 with fasteners doesn't work when following tutorials

Discussion about the development of the Assembly workbench.
Post Reply
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Assembly4 with fasteners doesn't work when following tutorials

Post by moriraaca »

Hello, hope someone will be able to help me here.

I'm trying to use fasteners in Assembly 4. I've read the following topics:
- https://forum.freecadweb.org/viewtopic.php?t=54517
- https://forum.freecadweb.org/viewtopic.php?p=572262

But when I follow the steps, it just doesn't work... Here's how my test project looks like (I'm also attaching it as a file):
Screenshot 2022-05-11 043112.png
Screenshot 2022-05-11 043112.png (70.31 KiB) Viewed 518 times
As you can see I have a part, an assembly, I've added a link to the part to the assembly, I've created the "Hole Axis", added the bolt. Now the next step should be:
select that fastener, and click on "Place Fastener" ("Place Part" in new versions) command, and select the "Hole Axis" you created.
When I try to do that, I select the Bolt, then click the "Place Part" and nothing happens - when I then click the Hole Axis, the only thing that happens is the selection changes from the bolt to the Hole Axis. So the action did not work at all.

The only other thing that happens is a message "Object has MapMode property, you should use that" in the Report view after clicking "Place Part" - not sure if this is even relevant.

This seems to be working for everyone, so I'm assuming I'm doing something wrong, but what?

I've just updated everything to make sure I'm not using a buggy version:
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +148 (Git)
Build type: Release
Branch: Branch_0.19.4
Hash: 476ecf091941bead59b14e44afa6064d5a66afa3
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United Kingdom (en_GB)

Assembly 4 version: 0.11.12
Attachments
a4fasteners.FCStd
(342.41 KiB) Downloaded 14 times
User avatar
Zolko
Veteran
Posts: 1805
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 with fasteners doesn't work when following tutorials

Post by Zolko »

moriraaca wrote: Wed May 11, 2022 3:42 am The only other thing that happens is a message "Object has MapMode property, you should use that" in the Report view after clicking "Place Part" - not sure if this is even relevant.
...
Assembly 4 version: 0.11.12
You seem to be doing the right things ... there was a bug in version 0.11.5 which triggered that message, did you use that version to create the fastener ? Can you start with an empty part and see if the problem persists ?

EDIT: with your file, the existing fastener cannot be placed (and produces the message) but I can insert a new fastener and that one works

EDIT 2: you don't need to wrap the Body into a Part, you can use the Body directly in the assembly
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Re: Assembly4 with fasteners doesn't work when following tutorials

Post by moriraaca »

All right, thank you! The file I've attached was created literally yesterday, with the most recent versions of FreeCAD and A4. But, seeing you are able to work with the file if you add a new fastener, made me think - I've originally installed A4 few months ago, possibly around 0.11.5. From what I see, workbenches update on their own (I've never manually updated any of them) so I'm not sure which version I've installed initially, but if it worked for you in the latest version, but not for me with the latest version, I did the next logical thing: I've uninstalled A4 completely, and re-installed it again. And lo and behold, it worked (with newly placed fastener)! :-) So apparently the automated update process didn't work well, and even after updating the workbench the old bug was present.

But, unfortunately, my joy was only temporary because I've immediately stumbled upon another issue :-( I've modified the same file slightly to test adding multiple fasteners at the same time, and that's when I've realized that with the new, working version, when I click "Move/Attach Part" with my fastener, I can choose a part I can attach it to, but the only attachment point I'm getting is the LCS of the Part - I've created 3 "Hole Axis" objects, but none of them shows in the picker:
Screenshot 2022-05-11 165311.png
Screenshot 2022-05-11 165311.png (66.17 KiB) Viewed 392 times
Screenshot 2022-05-11 165332.png
Screenshot 2022-05-11 165332.png (61.14 KiB) Viewed 392 times
I'm assuming my Hole Axis objects are defined in a wrong way, but what's the issue? I'm attaching the updated file.

Also, one more question about your other comment: I kind of always encapsulate Bodies in Parts, from watching some video tutorials I understood this is a good practice, am I wrong? Is there a downside in using Parts everywhere?
Zolko wrote: Wed May 11, 2022 12:59 pm EDIT 2: you don't need to wrap the Body into a Part, you can use the Body directly in the assembly
Attachments
a4fasteners.FCStd
(36.57 KiB) Downloaded 7 times
User avatar
Zolko
Veteran
Posts: 1805
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly4 with fasteners doesn't work when following tutorials

Post by Zolko »

moriraaca wrote: Wed May 11, 2022 4:03 pm I'm assuming my Hole Axis objects are defined in a wrong way, but what's the issue?
this :

Zolko wrote: Wed May 11, 2022 12:59 pm EDIT 2: you don't need to wrap the Body into a Part, you can use the Body directly in the assembly
The datums are in the body, they don't show up in the Part. If you *really* want to wrap the Body into the Part, you need to "import" the hole-axes into the Part: select them, and click Image.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
moriraaca
Posts: 10
Joined: Thu Apr 21, 2022 4:59 pm

Re: Assembly4 with fasteners doesn't work when following tutorials

Post by moriraaca »

Got it, thank you so much - with some further trial and error I think I understand how this works, and I was successful in my tests.

Just one more question - as I've said I was under the impression that encapsulating bodies in parts is a good practice, but you seem to suggests it's not the case - should I do that? I was trying to find a good description of what Body is and what Part is conceptually, but it seems I still don't understand it completely
Post Reply