Assembly 4 workbench

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ecorm
Posts: 18
Joined: Tue May 04, 2021 5:35 am

Re: Assembly 4 workbench

Post by ecorm »

project4 wrote: Wed Aug 25, 2021 1:26 pm I've updated to last version.
Get my freecad freeze in the "Place linked part" dialog.
Killing the application is the only way out of it.

Anyone experiencing something similar?

Don't know if it's somehow related to my files.
I'm experiencing the same problem (and have the exact same error traceback). This is blocking me from progressing with my project. I was foolish and made a bunch of edits with the newest version, so if roll back to the previous version, I'll have to redo all my work! I should have known better to upgrade mid-project.

I noticed that it freezees when attaching one subassembly to another, but not when attaching a subassembly to the parent assembly.

I'm not willing to share the files of the project where this problem occurs. Hopefully someone can create a minimal project that reproduces the problem.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

ecorm wrote: Thu Aug 26, 2021 5:37 am
project4 wrote: Wed Aug 25, 2021 1:26 pm Get my freecad freeze in the "Place linked part" dialog.
Killing the application is the only way out of it.
I'm experiencing the same problem (and have the exact same error traceback).
yeah, I had seen it also but I thought I did fix it: I tried to make this function so smart that one could select any datum anywhere in the list, tree or 3D window, but this is harder than I thought. Si I removed the option to select LCS in the tree: now, the LCS can be selected in the list or the 3D window, but NOT directly in the tree.

I've pushed v0.10.1 that should fix the freeze, can you please update and test ?
try the Assembly4 workbench for FreCAD — tutorials here and here
ecorm
Posts: 18
Joined: Tue May 04, 2021 5:35 am

Re: Assembly 4 workbench

Post by ecorm »

Zolko,

Before I saw your reply about pushing v0.10.1, I tried adding a bunch of print statements in the placeLinkUI::addSelection method to try to determine where it freezes, and it no longer freezes. :? Perhaps some kind of race condition?

Full disclosure: I'm not fluent in Python, nor have I studied the FreeCAD & Assembly 4 source code. I was trying to help expedite a fix to this problem.
ecorm
Posts: 18
Joined: Tue May 04, 2021 5:35 am

Re: Assembly 4 workbench

Post by ecorm »

Zolko wrote: Thu Aug 26, 2021 6:47 am yeah, I had seen it also but I thought I did fix it: I tried to make this function so smart that one could select any datum anywhere in the list, tree or 3D window, but this is harder than I thought. Si I removed the option to select LCS in the tree: now, the LCS can be selected in the list or the 3D window, but NOT directly in the tree.

I've pushed v0.10.1 that should fix the freeze, can you please update and test ?
I just updated to v0.10.1 and tested it. It did not crash when I attach a subassembly to another. Thanks for the rapid response! Is there a way I can tip you?
ecorm
Posts: 18
Joined: Tue May 04, 2021 5:35 am

Re: Assembly 4 workbench

Post by ecorm »

project4 wrote: Wed Aug 25, 2021 1:26 pm But it looks like the view is not updating when linking a new part.
Pressing the buttons seems to update the data, sice after I press OK, the part will appear in proper position.
When I use the same dialog to update existing part attacjment, the view will update on any click of the buttons.
I mostly tried the rotation, not sure about the translation.
I'm experiencing the same problem. Not a showstopper, but annoying when you have many LCSes named LCS_1, LCS_2, etc and you're not sure which one it's supposed to attach to.

When updating part attachment, clicking the rotate buttons update the "ghost" view, but attaching to a different LCS will not update the ghost view.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 workbench

Post by Zolko »

project4 wrote: Wed Aug 25, 2021 1:26 pm But it looks like the view is not updating when linking a new part. Pressing the buttons seems to update the data, sice after I press OK, the part will appear in proper position. When I use the same dialog to update existing part attacjment, the view will update on any click of the buttons.
Did you try to hit the "Apply" button ? In the current scheme you have to select both LCS, check in the 3D-view that they are really where you intend them, and then hit Apply, and then adjust orientation and offset.

I changed the behaviour some time ago and re-introduced that button, so the user can see to which LCS the part is going to be attached. This is IMHO better for complex assemblies with lots of LCS, rather than directly shifting the part to its destination which can lead to errors if 2 LCS are close.

ecorm wrote: Thu Aug 26, 2021 7:32 am When updating part attachment, clicking the rotate buttons update the "ghost" view, but attaching to a different LCS will not update the ghost view.
it's trivial to revert back to this behavior, but I'm not sure which is better. I think I prefer the current scheme where the user has to click "Apply" rather than do it automatically.
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 »

I think better user experience will be to update the 3D view with every change.
LCS selection/change, rotate, traslation... any change.

The OK button should "finalize" the change, update the data and whatever needed.
The Cancel should revert everying to previous state.

It's possible that the objects should be attached in order for the 3D view to update, that means cancel button should remove the attachments if were already done.
mirksen
Posts: 1
Joined: Mon Apr 12, 2021 5:54 am

Re: Assembly 4 workbench

Post by mirksen »

Hi Zolko,

Thank you for this great work! I just discovered the configurations feature, but it only works on models which were created with a version prior to v0.10 (where model Type == 'Assembly4 Model'). Is there something wrong with my files or is this an expected behavior?
User avatar
Vincent B
Veteran
Posts: 4731
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Assembly 4 workbench

Post by Vincent B »

A full assembled valve with assembly4. :D
from French sub:
https://forum.freecadweb.org/viewtopic.php?f=12&t=61462
...
thanks to Zolko for this workbench.
let's try to animate now. :roll: maybe some help?
Attachments
Capture.JPG
Capture.JPG (70.69 KiB) Viewed 4129 times
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 »

Excellent model!
GlouGlou wrote: Sun Aug 29, 2021 7:37 pm let's try to animate now. :roll: maybe some help?
For a similar animated mechanism please see this example: https://forum.freecadweb.org/viewtopic. ... 20#p416937
Perhaps it will give you some ideas how to animate your valve using the Assembly4 workbench.
"It is a poor workman who blames his tools..." ;)
Post Reply