Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

freedman wrote: Fri Aug 03, 2018 4:25 am I think we want to draw a line (no pun intended) in assy3, it should assemble. If we want to go off and start modifying parts and expect assy3 to tell you a file->Body->Face->dim has been modified, that's a big order. That could be the next level "Assemble parametrics".
I agree with that, in general.

However, let's not limit our imagination here. The assembly container can always do boolean operation from the beginning, just no way of displaying the result shape, until next release, that is. I am not sure what this function can lead to yet, maybe something similar to the multi-body design pattern that someone is all so very fond of.

Image
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
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Assembly3 preview

Post by fosselius »

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

Re: Assembly3 preview

Post by realthunder »

fosselius wrote: Tue Aug 07, 2018 6:22 am 0.8 is out now https://github.com/realthunder/FreeCAD_ ... 3/releases
Oops, you beat me here. I didn't announce it here because I am busy writing documents and tutorials for the new features.
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
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

Hi Realthunder and the team,

I cannot wait to test 0.8! Specifically the multiplication of the constraints looks impressive.

In the meanwhile, I have some reports regarding previous version. Shred it if it's already fixed :-).

1) Dropping part into assembly Parts container gets (sometimes) wrong label. In the example bellow, it took a name of the next part in the tree, instead of the one being dropped.
FC_namingError.PNG
FC_namingError.PNG (37.1 KiB) Viewed 2098 times
2) Second may be not error but a (probably unwanted) "property" of links. When you insert a part, insert constraints for the part and then decide to multiplicate it via link count, the new members are fixed int he position of the original one. So they cannot be moved neither via "Move" command or constraints. I cannot figure out a reason why this would be a wanted behavior, whereas allowing to move new links would be certainly benefitial. I'd call it a common scenario.

3) I have a weird behavior with PlaneCoincident constraints on some members. Seems like one of the LCS is messed up. Bellow is a picture and attached is ZIP file with the frame assembly. Obviously, the member marked 1 is correct and 2 and 3 are messed up. They should have mate the longitudinal beam the same way as 1. The solver doesn't shout any error, the assembly is stable, it's just out of place.
FC_PlaneAlignmentError.PNG
FC_PlaneAlignmentError.PNG (69.43 KiB) Viewed 2098 times
Attachments
PlHouse.zip
(165.29 KiB) Downloaded 51 times
Regards,

Oak
User avatar
fosselius
Posts: 381
Joined: Sat Apr 23, 2016 10:03 am
Contact:

Re: Assembly3 preview

Post by fosselius »

I have tested the PIHouse.zip file
When i pressed solve assembly in asm3 with all shapes selected i got:

Code: Select all

maiden@Slaven2:~/Downloads$ ./FreeCAD-asm3-20180806-7e75d680-b678c36.glibc2.17-x86_64.AppImage 
FreeCAD 0.17, Libs: 0.17R5235 (Git shallow)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


** (freecad-daily:26245): WARNING **: 19:31:33.605: invalid source position for vertical gradient

** (freecad-daily:26245): WARNING **: 19:31:33.605: invalid source position for vertical gradient
<asm3.main> 23.600631 - mover.py(291): exception when moving part
Traceback (most recent call last):
  File "/tmp/.mount_FreeCA4faxLK/usr/lib/freecad-daily/Ext/freecad/asm3/FCADLogger.py", line 83, in _catch
    return func(*args,**kargs)
  File "/tmp/.mount_FreeCA4faxLK/usr/lib/freecad-daily/Ext/freecad/asm3/mover.py", line 243, in getMovingElementInfo
    raise RuntimeError('no sub-object in selection')
RuntimeError: no sub-object in selection

Killed
Without selection i got when the following result after pressing solve assembly:

Code: Select all

maiden@Slaven2:~/Downloads$ ./FreeCAD-asm3-20180806-7e75d680-b678c36.glibc2.17-x86_64.AppImage 
FreeCAD 0.17, Libs: 0.17R5235 (Git shallow)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


** (freecad-daily:26367): WARNING **: 19:32:32.731: invalid source position for vertical gradient

** (freecad-daily:26367): WARNING **: 19:32:32.731: invalid source position for vertical gradient
Killed
I tried again after closing google-chrome (freeing up a little more memory) and this time i got:

Code: Select all

FreeCAD 0.17, Libs: 0.17R5235 (Git shallow)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2018
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##


** (freecad-daily:15690): WARNING **: 21:00:25.337: invalid source position for vertical gradient

** (freecad-daily:15690): WARNING **: 21:00:25.337: invalid source position for vertical gradient
<asm3.sys> 30.756612 - sys_slvs.py(52): redundant constraints

** (freecad-daily:15690): WARNING **: 21:01:05.964: invalid source position for vertical gradient

** (freecad-daily:15690): WARNING **: 21:01:05.964: invalid source position for vertical gradient
		Terminated
In this last try i had to kill FreeCAD from my terminal, HTOP told me i had almost no CPU utilization but 100% MEM consumed by 10x instances! of freecad-daily...
@realthunder, memory leak? I had this running on a 4 core, 8 thread system with 8GB ram.
I am curious, why do FreeCAD launch 10x instances of freecad-daily?

I tested to open/close assembly files several times but memory usage did not increase.
Pressing solve increases memory usage, closing assembly files do not reduce memory usage, closing freecad will result in memory cleanup a few seconds after freecad GUI have closed. I can take a deeper look at this with valgrind/gdb, but i guess you have a good idea on what is happening?
My guess is that the python solver keeps the memory "active/referenced" so its not released/freed.
Screenshot from 2018-08-07 21-23-38.png
Screenshot from 2018-08-07 21-23-38.png (253.6 KiB) Viewed 2066 times
image after pressing solve and then closed all files
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

OakLD wrote: Tue Aug 07, 2018 5:10 pm I cannot wait to test 0.8! Specifically the multiplication of the constraints looks impressive.
I'll publish the document soon.

1) Dropping part into assembly Parts container gets (sometimes) wrong label. In the example bellow, it took a name of the next part in the tree, instead of
This is cause by FC's labeling policy. The default is no duplicate label in the same document. It will auto re-label by appending digits. So it is better not to end your object label with digit, or else you'll get confusing re-label. You can change that policy using Preference->General->Document->Allow duplicate label.

2) Second may be not error but a (probably unwanted) "property" of links. When you insert a part, insert constraints for the part and then decide to multiplicate it via link count, the new members are fixed int he position of the original one. So they cannot be moved neither via "Move" command or constraints. I cannot figure out a reason why this would be a wanted behavior, whereas allowing to move new links would be certainly benefitial. I'd call it a common scenario.
You should be able to move the array instance, maybe it's a bug in the old version. BTW, if you constraint a link and then change it to an array, the first instance will likely be fixed by the original constraint. This is in fact a side effect of how array is implemented. It is recommended to manually remove the original constraint first, and then change the link to array.

3) I have a weird behavior with PlaneCoincident constraints on some members. Seems like one of the LCS is messed up. Bellow is a picture and attached is ZIP file with the frame assembly. Obviously, the member marked 1 is correct and 2 and 3 are messed up. They should have mate the longitudinal beam the same way as 1. The solver doesn't shout any error, the assembly is stable, it's just out of place.
The solver works correctly in 0.8. However, fosselius is right. There is definitely some memory leak. The memory usages shoots to 5.5G after solving on my computer.

fosselius wrote: Tue Aug 07, 2018 7:16 pm I am curious, why do FreeCAD launch 10x instances of freecad-daily?
I didn't see multiple instance of freecad-daily. Maybe that's your system monitor's behavior in stress. My pc has 16G RAM, so 5.5G usage is not consider stressful, and that's probably why I didn't discover this problem earlier.
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
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

SOS!
I just installed version 0.8 under Windows (10 -64) that I was looking forward to: asm3 no longer appears in the list of available workshops !!!!
My website : http://help-freecad-jpg87.fr updated 2023/11/06
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

jpg87 wrote: Wed Aug 08, 2018 6:57 am SOS!
I just installed version 0.8 under Windows (10 -64) that I was looking forward to: asm3 no longer appears in the list of available workshops !!!!
Can you please open the report view (View->Panels->Report view), and scroll up to see if there is any error? I just download the 7z, extract and it is running fine.
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
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

realthunder wrote: Wed Aug 08, 2018 7:09 am Can you please open the report view (View->Panels->Report view), and scroll up to see if there is any error? I just download the 7z, extract and it is running fine.
At startup, no message. When I open a file of my asm3 tests, here is:

Code: Select all

Traceback (most recent call last):
  File "<string>", line 1, in <module>
<type 'exceptions.ImportError'>: No module named AttachmentEditor.Commands
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly
<unknown exception traceback><type 'exceptions.ImportError'>: No module named asm3.assembly

I do have the file Ext / freecad / asm3 present and complete.
I just re-download the archive: same thing.

I downloaded the AppImage on another machine: OK

I have another Windows PC: I will install the archive to see at the end of the day. I'll let you know
My website : http://help-freecad-jpg87.fr updated 2023/11/06
User avatar
OakLD
Posts: 131
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Post by OakLD »

realthunder wrote: Wed Aug 08, 2018 12:23 amThis is cause by FC's labeling policy. The default is no duplicate label in the same document. It will auto re-label by appending digits. So it is better not to end your object label with digit, or else you'll get confusing re-label. You can change that policy using Preference->General->Document->Allow duplicate label.
Oh, there's a misunderstaning. The appending numbers are OK (though I didn't know it can be turned off, I'm fine with it), however it appends to an incorrect source label. I dropped part "100x100x1800" and expected to get "100x100x1801" and "100x100x1802", but instead I got "100x100x2401" and "100x100x2402", where the source label "100x100x2400" is evidently the next one from the next file (the one bellow the item being dropped, in the tree in the picture). I reproduced the error to be sure. Furthermore, I reproduced the same error (on the same file(s)) in your new release 0.8. I got "100x100x2403" when dropping "100x100x1800".
It's a bug of a very little importance, though.
realthunder wrote: Wed Aug 08, 2018 12:23 amYou should be able to move the array instance, maybe it's a bug in the old version. BTW, if you constraint a link and then change it to an array, the first instance will likely be fixed by the original constraint. This is in fact a side effect of how array is implemented. It is recommended to manually remove the original constraint first, and then change the link to array.
Yes, if that worked in the way you describe (first link gets the constraints, the rest are free), it would be great. I think it's a common scenario, that you use a part and along the design you find out you need another one.
realthunder wrote: Wed Aug 08, 2018 12:23 amThe solver works correctly in 0.8. However, fosselius is right. There is definitely some memory leak. The memory usages shoots to 5.5G after solving on my computer.
I din't look for it, but you're certainly right about the memmory leak. It's the solver. It made the weird results in 0.7 and I can too confirm, that in 0.8 is stable. But when I select a free (unconstrained) part and click on a Move command, then click on the arrows, move a part a bit and release the mouse, it takes about 1'05'' and the memmory is during this time aournd 5GB (out of 12GB available), then it drops back to some 126MB. Of course, FreeCAD is during this time unresponsive, but everything goes back in the end.
This slowing happens with all the assemblies I tested, I just didn't paid that much attention to that due to the development status.
Regards,

Oak
Post Reply