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
openfablab
Posts: 62
Joined: Wed Nov 02, 2016 4:42 pm
Contact:

Re: Assembly 4 workbench

Post by openfablab »

Zolko wrote: Mon Sep 07, 2020 9:01 pm What I'd do is to create the module(s) as separate files, save, close and re-open them. Then create in the module document window the feature you want, approximatively. Insert the module into the main assembly, close the module document window so that the module document is only opened through the assembly.

Then, edit the feature (sketch ?) from the main assembly tree.
Thank you, this works but with some complications:

1) When I edit sketch (created in part document) in assembly document, this part get invisible and I see sister parts but not the part itself. It can be cured by selecting it in tree view and pressing space, but looks like a bug behavior.

2) When I create end go editing new sketch on part from assembly document, all other bodies in assembly get invisible. They also can be made visible by pressing space button in hierarchy view. And they get visible back when I close sketch. This behavior can be useful sometimes, but sometimes not. It would be good to make it optional, may be add hotkey cycling through "all invisible" - "dimmed visible" - "all visible" modes. Dimmed (non-interactable) mode as in some CADs looks the best from my point of view.

3) Trying to use external references from sister parts of assembly reference objects are created but in not correct place and I get "PropertyLinkList does not support external object" or "Expects sequence of items of type DocObj, (DocObj,SubName), or (DocObj, (SubName,...))".

4) I have got some PartDesign error warning exclamation signs when did the next:
* Create PartA
* Copy file and edited it to get PartB
* Inserted both parts to the same assembly
* Edited PartB (added new sketch and PartDesign feature)

Something altered in PartA and I got exclamation signs. Probably it is because of generating some objects with the same ID. I had also seen this problem in 0.18 when copying some parts from one file to another.

OS: Debian GNU/Linux 10 (buster) (XFCE/lightdm-xsession)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22198 (Git) AppImage
Build type: Release
Branch: master
Hash: 76e74294894bbce46d006e149315c6274d206278
Python version: 3.8.5
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

openfablab wrote: Tue Sep 08, 2020 7:37 am 3) Trying to use external references from sister parts of assembly reference objects are created but in not correct place and I get "PropertyLinkList does not support external object" or "Expects sequence of items of type DocObj, (DocObj,SubName), or (DocObj, (SubName,...))".
No, this doesn't work this way.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
openfablab
Posts: 62
Joined: Wed Nov 02, 2016 4:42 pm
Contact:

Re: Assembly 4 workbench

Post by openfablab »

And can not switch View > Draw Style to Points or Wireframe in documents with at least one Assembly4 Model object.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

openfablab wrote: Tue Sep 08, 2020 10:35 am And can not switch View > Draw Style to Points or Wireframe in documents with at least one Assembly4 Model object.
no, App::Link objects don't follow the display rules (yet).

You must understand that App::Link is a new feature of FreeCAD, very powerful and stable, but still in its infancy. What would be very useful is if you could collect all your remarks together and submit them is some usable form. Reporting them here 1 by 1 will be lost in the noise.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
openfablab
Posts: 62
Joined: Wed Nov 02, 2016 4:42 pm
Contact:

Re: Assembly 4 workbench

Post by openfablab »

Zolko wrote: Tue Sep 08, 2020 11:05 am
openfablab wrote: Tue Sep 08, 2020 10:35 am And can not switch View > Draw Style to Points or Wireframe in documents with at least one Assembly4 Model object.
no, App::Link objects don't follow the display rules (yet).

You must understand that App::Link is a new feature of FreeCAD, very powerful and stable, but still in its infancy. What would be very useful is if you could collect all your remarks together and submit them is some usable form. Reporting them here 1 by 1 will be lost in the noise.
OK. I am very interested it its development. Last years I made manual assembly of thousands of parts in 0.18 for this machine:
7.png
7.png (50.72 KiB) Viewed 2313 times
IMG_20200316_104507.jpg
IMG_20200316_104507.jpg (178.48 KiB) Viewed 2313 times
To say it was hard is to say nothing :) Now I have to design more and far more complex machines and I want to make use of FreeCAD more straightforward and compatible with top-down and MBSE approach. Especially because junior designers are coming for whom I want to present more convenient FreeCAD workflow. Assembly4 looks very good way for this. Thus I would be happy if I could help in its development. Even I hope to convince my boss to spend some money on it.
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly 4 workbench

Post by project4 »

Code question:

Assuming I have a part with a hole. I add hole-axis LCS, which is hidden after I finish the work on that part.
I link that part into an assembly.
Is there a way to find the LCS of the hole based on the hole location?
If I didn't hide the LCS, I could see it and click on it in 3D view and with pre-selection feature enabled, I could also see its topo-name in the status bar.
But since it's hidden, its not there to select it...

Will the LCS position be the same as the center of the hole circle?
Or any other programmable way to find the specific hole LCS in Part's object?

I saw the T-Flex tutorial videos someone linked here before and you can clearly see that the user selects the circle section of parts and not the LCSs themselves. T-Flex somehow is able to find the proper LCS for attachment.
Maybe they manage the data differently, having the LCS somehow "attached/linked" to the faces/edges, but I wonder if we can get similar effect with FreeCAD available GUI as well.
louisgag
Posts: 75
Joined: Fri Jan 17, 2020 9:59 am

Re: Assembly 4 workbench - Nested variables

Post by louisgag »

This is maybe already known by the Assembly4 programmers but here is a somewhat faulty behavior I noticed:

The "variables" object in the part of a nested assembly does not show the variables of the part even though the part itself has the properties given by its own variable.

Here is a screenshot to clarify.
Screenshot from 2020-09-11 14-15-30.png
Screenshot from 2020-09-11 14-15-30.png (40.29 KiB) Viewed 2163 times
Would it not make more sense that the actual variables from the part where given there and that they were also accessible from the assembly itself?
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench - Nested variables

Post by Zolko »

louisgag wrote: Fri Sep 11, 2020 12:24 pm This is maybe already known by the Assembly4 programmers but here is a somewhat faulty behavior I noticed

Would it not make more sense that the actual variables from the part where given there and that they were also accessible from the assembly itself?
Yes, you're right, this is known and is in the list of good-to-have but currently there is no solution. Sorry
try the Assembly4 workbench for FreCAD — tutorials here and here
project4
Posts: 237
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly 4 workbench

Post by project4 »

@Zolko, @realthunder
Code question:
I traverse over the App.ActiveDocument.Objects with getSubObjects function, and get the object with getSubObject.
What I want to achieve is recognize the LCSs in the tree.
I'm looking on the object's TypeId in hope to recognize the LCSs.
I see that LCSs nn the top document level are "PartDesign::CoordinateSystem" type, while the LCSs of the linked parts are "Part::TopoShape".
Is it a bug?
Is there another way to determine that the object I get is LCS? Beside the Name/Label ofcause.
Zolko wrote:
realthunder wrote:
EDIT:
Actually other shapes are also appearing as TopoShape instead of their real shape, such as PartDesign::Line.
If I dive into the linked document with the obj.LinkedObject.Document.Objects I can get to the real type.
Still puzzled why in the link object the type is not restored to the original meaning.

Thanks.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly 4 workbench

Post by realthunder »

project4 wrote: Fri Sep 11, 2020 5:24 pm Actually other shapes are also appearing as TopoShape instead of their real shape, such as PartDesign::Line.
If I dive into the linked document with the obj.LinkedObject.Document.Objects I can get to the real type.
Still puzzled why in the link object the type is not restored to the original meaning.

Thanks.
getSubObject() by default return a Shape of the object. To return the object, add an extra argument retType=1. Checkout the docstring of getSubObject() to find out more details.

To obtain the linked object, you can use obj.getLinkedObject(). This function is available in all types of document object, it will recursively resolve to a non-link type object if it is a link. Or, if the object is not a link, it will return itself. Checkout docstring of getLinkedObject() to find out more options.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
Post Reply