Assembly 4 workbench

Discussion about the development of the Assembly workbench.
User avatar
Zolko
Posts: 1185
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko » Mon Nov 02, 2020 1:10 pm

goopypanther wrote:
Mon Nov 02, 2020 9:00 am
Previous to v0.9 the "New Hole LCS" button created an LCS concentric to the selected hole.
...
Starting in v0.9 the button was changed to "New Hole Axis" and now creates a datum line on the axis of curvature of the selected hole.
...
The change throws a monkey-wrench in my workflow, I can't figure out what I'm supposed to do with a datum line.
Actually, a datum line is, internally to FreeCAD, the same as a datum coordinate system. SO you can do the same things with both. But there was a small bug that confused Names and Labels, should be fixed now with v0.9.10.

Basically, Hole Axis is the same as Hole LCS apart from the visual: you can create them in the same way, and also use them in the same way: you can attach Fasteners to them, and you can also attach part with/at datum axes in the same way as you'd do with datum LCS.

Could you please update the workbench (to 0.9.10) and check the behaviour ? Ideally, it should not change your workflow at all, and all your previous models should be preserved. If not, if everything breaks, I'll revert to the "Hole LCS" behaviour. But please check first, because when there are lots of holes than this axis visual is much more eye-friendly.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here

goopypanther
Posts: 5
Joined: Mon Nov 02, 2020 7:54 am

Re: Assembly 4 workbench

Post by goopypanther » Mon Nov 02, 2020 11:11 pm

Zolko wrote:
Mon Nov 02, 2020 1:10 pm
Actually, a datum line is, internally to FreeCAD, the same as a datum coordinate system. SO you can do the same things with both. But there was a small bug that confused Names and Labels, should be fixed now with v0.9.10.

Basically, Hole Axis is the same as Hole LCS apart from the visual: you can create them in the same way, and also use them in the same way: you can attach Fasteners to them, and you can also attach part with/at datum axes in the same way as you'd do with datum LCS.

Could you please update the workbench (to 0.9.10) and check the behaviour ? Ideally, it should not change your workflow at all, and all your previous models should be preserved. If not, if everything breaks, I'll revert to the "Hole LCS" behaviour. But please check first, because when there are lots of holes than this axis visual is much more eye-friendly.
Oh, yes now I see what you mean. The problem seems to be that the hole axis datum is created as a child of the body and is inaccessible from the assembly4 model. I can drag it out of the body into the higher level assembly4 model and then mate parts to it as expected, however it causes the part features to un-nest and they all sit inside the assembly4 model object instead of inside the body. My older assemblies seem fine after the update.

I agree, the datum line looks cleaner. The only benefit I can think of with the traditional LCS is that you can see rotation of the coordinate system more easily. For example, when attaching LCS to a hole that was produced by a polar pattern feature the geometry of each hole is actually rotated compared to the next. This normally results in attached nuts all having rotation with respect to one another, but sometimes I need to rotate them back to all align along the same axis because they fit inside hexagonal recesses I've pocketed into the part with specific orientation to minimize overhangs while 3D printing. (Haha, a bit of an edge case I suppose. ;) )

Running on a daily release from a couple days ago, nesting issues could maybe be weirdness from that. I'll try against v0.19_pre next.

OS: Ubuntu 18.04.5 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 9eb080488d970d313c538473e7272117ea0a7cd1
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

---

Update:

This is highly experimental and I don't know what I'm doing but I added the following at ln 198 of newDatumCmd.py:

Code: Select all

# Create datum in parent of body instead of inside
if parentPart.TypeId=='PartDesign::Body':
    parentPart = parentPart.getParentGeoFeatureGroup()
The hole datum is now generated in the assembly object instead of inside the body and attachment works as expected. Not sure yet if this has unintended consequences but the dependency graph seems fine. I was a bit worried about a "Links go out of the allowed scope" warning on the console but on second glance it looks like it generates these for ordinary LCS as well.

EskiBrew
Posts: 72
Joined: Fri Apr 24, 2015 10:21 am

Re: Assembly 4 workbench

Post by EskiBrew » Fri Nov 06, 2020 5:09 pm

I've persevered with Assembly4 workbench to assemble a stirling engine which I constructed years ago. Now I have got to grips with Assembly4, I can see the advantage of not needing a traditional solver and I like it.😎
StirlingAssembly4small.gif
StirlingAssembly4small.gif (286.66 KiB) Viewed 638 times

User avatar
Zolko
Posts: 1185
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko » Sun Nov 08, 2020 11:29 am

goopypanther wrote:
Mon Nov 02, 2020 11:11 pm
Update:

This is highly experimental and I don't know what I'm doing but I added the following at ln 198 of newDatumCmd.py:

Code: Select all

# Create datum in parent of body instead of inside
if parentPart.TypeId=='PartDesign::Body':
    parentPart = parentPart.getParentGeoFeatureGroup()
The hole datum is now generated in the assembly object instead of inside the body and attachment works as expected
This will do what you want it to do, but I'm not sure you really want what you think you want. Also, I'm a bit confused: you *created* a Body inside an assembly Model, or you *linked* a Body into an assembly ? If you linked a Body, then when creating a Hole Axis on the linked Body, it will create a datum inside the Body (which is *not* in the assembly container, only the link is) and this datum is usable for attachments in the assembly.

What your modification will do is that the datum will be created in the container where the Body is, which might or might-not exist. Therefore, apart from some particular use-case, this will not work.

BUT: may-be you have found a new use-case, which could also be of interest to other people, and then the current workflow should be adapted. This has happened before.

Could you please better explain the steps you're taking to make your assemblies ?
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here

goopypanther
Posts: 5
Joined: Mon Nov 02, 2020 7:54 am

Re: Assembly 4 workbench

Post by goopypanther » Tue Nov 10, 2020 9:13 am

Zolko wrote:
Sun Nov 08, 2020 11:29 am
Could you please better explain the steps you're taking to make your assemblies ?
Up until now I've been enclosing every body inside its own assembly model, even though there's nothing else in the document. I wasn't able to create LCSs through the workbench otherwise.

I see now that I can create hole axis datums in naked bodies and link them into assembly models in higher level documents like I do with assembly models. I'm not able to (successfully) mix LCSs and hole axis datums in one part. The LCSs are created in the assembly model and the hole axis datums end up inside the body, rendering it invisible to the assembly model in the higher level document.

Here's an example of how I build my higher level assembly documents:
Image

User avatar
Zolko
Posts: 1185
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko » Tue Nov 10, 2020 11:44 am

goopypanther wrote:
Tue Nov 10, 2020 9:13 am
Up until now I've been enclosing every body inside its own assembly model, even though there's nothing else in the document. I wasn't able to create LCSs through the workbench otherwise.
in order to create a datum with the Asm4 WB, you must select the container - App::Part or PartDesign::Body - into which you wish to create the datum. If no container is selected, but if an Am4 Model exists in the document, then the datum will be created there.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here

goopypanther
Posts: 5
Joined: Mon Nov 02, 2020 7:54 am

Re: Assembly 4 workbench

Post by goopypanther » Tue Nov 10, 2020 8:26 pm

Here's a clearer explanation of my intention. HoleAxis is the only kind of coordinate system generated as a child of Body instead of a child of Model. My goal is for them to all be on the same level.

Image

User avatar
Zolko
Posts: 1185
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko » Wed Nov 11, 2020 8:22 am

goopypanther wrote:
Tue Nov 10, 2020 8:26 pm
Here's a clearer explanation of my intention.
This is not the way Assembly4 was meant to work
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here

Zivatar
Posts: 3
Joined: Thu Nov 12, 2020 5:31 pm

Re: Assembly 4 workbench

Post by Zivatar » Thu Nov 12, 2020 6:36 pm

Dear Zolko!

First I have to tell You that I am very happy about we have the Assembly4 WB, I like it, and thank You for making it!
I googled a lot in the following topic, but I could not find any solution, hence I am asking You now :)
I am building an assembly with a few intersecting parts, and my goal would be if I could split one object with the other. I tried facebinder, but when I try to make one the answer is:
"PropertyLinkSubList does not support external object"
I attach a picture which probably gives more clarification:

This is the assembly:
1.png
1.png (158.09 KiB) Viewed 274 times

I would like to cut out this part...:
2.png
2.png (159.94 KiB) Viewed 274 times

...from this cylinder
3.png
3.png (158.11 KiB) Viewed 274 times
And also I am interested how can I use the Facebinder - or something with similar functionality? And finally: Is there possibility to generate the resulting model as a single body - after cutting out one from the other?

Thank You,
Zivatar

User avatar
Zolko
Posts: 1185
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko » Thu Nov 12, 2020 8:50 pm

Thank-you for your kind words. But I have the impression that you place a Body inside an Asm4 Model : is there a particular reason to do so ? Because it's easier to use pure naked Bodies as assembled parts. Or, if you use imported STEP files then pure naked App::Part containers. Using an Asm4 Model is mandatory for assemblies, not parts.

Zivatar wrote:
Thu Nov 12, 2020 6:36 pm
I would like to cut out this part...:
2.png
...from this cylinder
3.png
You can do that in a non-parametric way: in the Part WB, you convert your linked part to solid (Menu > Part > Convert to solid), then you copy this solid to the document where your cylinder is, and use boolean operation on the cylinder.

But I don't know whether it's possible to do it and keep the parametric design.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here

Post Reply