Assembly3 preview

Discussion about the development of the Assembly workbench.
User avatar
easyw-fc
Posts: 1636
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Thu Jun 14, 2018 6:10 pm

freecad-heini-1 wrote:
Thu Jun 14, 2018 6:06 pm
easyw-fc wrote:
Thu Jun 14, 2018 6:01 pm
freecad-heini-1 wrote:
Thu Jun 14, 2018 5:58 pm
easyw-fc wrote:
Thu Jun 14, 2018 5:50 pm
I noticed only a different behavior compared to main branch when handling a big model like i.e.
[url=https://github.com/sgrogan/FreeCAD/rele ... teptest.7z]00_server-tla_25ou-barreleye_asm.stp 7zipped[/url
My computer is curently loading this file since 1 hour 45 minutes and the viewport still is blank.

@maurice, how long will it take to load this file?
it is about 360 seconds on my PC...
I have an SSD, so loading may be faster than with a normal HD.

But I cannot load at all the very huge file of 1GB...
Sorry, this is not the 1GB file. Currently I try to open the 1GB file since almost 1:57.
Do you know if there is a possibility so check how many percent are already loaded?
A part the indicator at the bottom statusbar, which gets triggered by the OCC parsing, I don't think there is nothing available to indicate the loading process percent...
User avatar
easyw-fc
Posts: 1636
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Thu Jun 14, 2018 8:12 pm

realthunder wrote:
Thu Jun 14, 2018 3:20 pm
New bug fix version released.
A small comparison with DSM
A3 is even faster when using the buttons to change the view!
standard-views.gif
standard-views.gif (694.95 KiB) Viewed 337 times
The difference comes when the spinning is done by the mouse:
DSM
dsm-spin.gif
dsm-spin.gif (909.62 KiB) Viewed 337 times
FC
fc-spin.gif
fc-spin.gif (175.6 KiB) Viewed 337 times
May be you can do an other magic here :D
triplus
Posts: 6940
Joined: Mon Dec 12, 2011 4:45 pm

Re: Assembly3 preview

Postby triplus » Thu Jun 14, 2018 10:42 pm

Does "VBO setting speed issue" need any more testing or was the issue resolved?

P.S. Will have some time on Sunday if testing is still needed.
realthunder
Posts: 617
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jun 15, 2018 3:13 am

easyw-fc wrote:
Thu Jun 14, 2018 8:12 pm
The difference comes when the spinning is done by the mouse:
May be you can do an other magic here :D
I see. Looks like caching at the graph scene root node is too radical. The initial cache rebuild time is very noticable for large model. It seems that caching at each viewprovider root is a good enough middle ground. For smaller model, the AriaMech PCB you posted, cache at scene graph root gains about 10fps at my computer. But for that large model, there is no obvious gain.

triplus wrote:
Thu Jun 14, 2018 10:42 pm
Does "VBO setting speed issue" need any more testing or was the issue resolved?
More testing is always welcome. But just wait for a while, I'll release another version shortly.
Try Assembly3 (latest version 0.6.7) along with my custom build of FreeCAD at here.
And if you like to show your support, you can find the donate button at here.
realthunder
Posts: 617
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jun 15, 2018 5:29 am

New version released

I removed cache mode auto change when dragging, because of the obvious cache rebuild delay for larger model. You can still manually change the cache mode at the preference page. 'Centralized' cache mode will give the fastest rendering time once the cache is fully established. However, any mouse over highlight will invalidates the cache and cause some delay. For normal usage, leave it as 'Auto' will probably give good enough results. 'Auto' here means that for normal object, cache is disabled everywhere except for the view provider root node, whose caching will be turned on/off by Coin automatically, and the decision may be different on each individual node.

I have also added progress indicator during STEP importing stage, so that FC no longer freezes at that stage.
Try Assembly3 (latest version 0.6.7) along with my custom build of FreeCAD at here.
And if you like to show your support, you can find the donate button at here.
freecad-heini-1
Posts: 3956
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 preview

Postby freecad-heini-1 » Fri Jun 15, 2018 7:06 am

Here are the loading time for the 1GB step file:

Code: Select all

<Import> AppImportGuiPy.cpp(477): file read time: 1294.13s
<Import> AppImportGuiPy.cpp(478): import time: 12096.9s
<Import> AppImportGuiPy.cpp(479): total time: 13391.1s
1GB_step_file_import_and_handling_Freecad.gif
1GB_step_file_import_and_handling_Freecad.gif (262.76 KiB) Viewed 245 times
I guess for such assembly it's needed to have a high power workstation with a lot of ram, ssd, hight end cad-graphic-card and many fast cpu cores.

Code: Select all

OS: Linux
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Zoom in with rectangle:
zoom_in_1gb_assembly.gif
zoom_in_1gb_assembly.gif (146.18 KiB) Viewed 238 times
My hardware:

Code: Select all

inxi -Fz
System:    Host: xubu-1 Kernel: 4.4.0-128-generic x86_64 (64 bit)
           Desktop: Xfce 4.12.3 Distro: Ubuntu 16.04 xenial
Machine:   Mobo: ASRock model: 990FX Extreme3
           Bios: American Megatrends v: P1.50 date: 10/12/2012
CPU:       Octa core AMD FX-8350 Eight-Core (-MCP-) cache: 16384 KB 
           clock speeds: max: 4000 MHz 1: 1400 MHz 2: 1400 MHz 3: 2800 MHz
           4: 1400 MHz 5: 2100 MHz 6: 1400 MHz 7: 1400 MHz 8: 1400 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Whistler LE [Radeon HD 6610M/7610M]
           Display Server: X.Org 1.18.4 drivers: ati,radeon (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: AMD TURKS (DRM 2.43.0 / 4.4.0-128-generic, LLVM 5.0.0)
           GLX Version: 3.0 Mesa 17.2.8
Audio:     Card-1 Advanced Micro Devices [AMD/ATI] Turks/Whistler HDMI Audio [Radeon HD 6000 Series]
           driver: snd_hda_intel
           Card-2 Advanced Micro Devices [AMD/ATI] SBx00 Azalia (Intel HDA)
           driver: snd_hda_intel
           Card-3 C-Media driver: USB Audio
           Card-4 Logitech Webcam C270 driver: USB Audio
           Sound: Advanced Linux Sound Architecture v: k4.4.0-128-generic
Network:   Card: Broadcom NetLink BCM57781 Gigabit Ethernet PCIe driver: tg3
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 2360.5GB (12.9% used)
           ID-1: /dev/sda model: Crucial_CT240M50 size: 240.1GB
           ID-2: /dev/sdb model: KINGSTON_SV300S3 size: 120.0GB
           ID-3: USB /dev/sdc model: External_USB_3.0 size: 2000.4GB
Partition: ID-1: / size: 213G used: 176G (88%) fs: ext4 dev: /dev/sda1
           ID-2: swap-1 size: 8.54GB used: 5.88GB (69%) fs: swap dev: /dev/sda5
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 40.5C mobo: 46.0C gpu: 40.5
           Fan Speeds (in rpm): cpu: N/A fan-1: 0 fan-2: 2581 fan-3: 0 fan-4: 0 fan-5: 0
Info:      Processes: 306 Uptime: 12:56 Memory: 7181.3/7941.2MB
           Client: Shell (bash) inxi: 2.2.35 
What about this message? Could this be true? I guess not.

Code: Select all

file read time: 1294.13s
Yesterday evening I started it at about 8:00 p.m. And this morning I was at 9.00 a.m in the office and the big file was loaded.
So there was maximum 7 hours time.
realthunder
Posts: 617
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Fri Jun 15, 2018 7:39 am

freecad-heini-1 wrote:
Fri Jun 15, 2018 7:06 am
What about this message? Could this be true? I guess not.

Code: Select all

file read time: 1294.13s
Yesterday evening I started it at about 8:00 p.m. And this morning I was at 9.00 a.m in the office and the big file was loaded.
So there was maximum 7 hours time.
This is OCCT file reading time. And the second message shows the time to import OCCT results into FC. And it took about 4 hours, which means there is probably something wrong. The 200MB step file only take about 70 second import time on my humble machine. The import time is directly correlated to number of objects. The 200MB server model has only 1K objects. Can you please run the following command with that monster file,

Code: Select all

len(App.ActiveDocument.Objects)
Admittedly, current FC does have some inefficiency with large amount of objects. It doesn't scale well.
Try Assembly3 (latest version 0.6.7) along with my custom build of FreeCAD at here.
And if you like to show your support, you can find the donate button at here.
User avatar
easyw-fc
Posts: 1636
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Fri Jun 15, 2018 7:51 am

realthunder wrote:
Fri Jun 15, 2018 5:29 am
New version released

I removed cache mode auto change when dragging, because of the obvious cache rebuild delay for larger model. You can still manually change the cache mode at the preference page. 'Centralized' cache mode will give the fastest rendering time once the cache is fully established. However, any mouse over highlight will invalidates the cache and cause some delay. For normal usage, leave it as 'Auto' will probably give good enough results. 'Auto' here means that for normal object, cache is disabled everywhere except for the view provider root node, whose caching will be turned on/off by Coin automatically, and the decision may be different on each individual node.
very nice result! Now it is possible to handle also huge models! :D
Thx a lot!
realthunder wrote:
Fri Jun 15, 2018 5:29 am
I have also added progress indicator during STEP importing stage, so that FC no longer freezes at that stage.
This is good too. At the same time would it be possible to consider this as an option? This can increase loading time ... i.e. n my pc the 'AriaMech.step' file goes from 34sec without the progress indicator, to 44sec with it (about 30% payload).
realthunder wrote:
Fri Jun 15, 2018 7:39 am
Admittedly, current FC does have some inefficiency with large amount of objects. It doesn't scale well.
At the same time big progress have been made! The actual behavior is very similar to what other CADs do... DSM and CAD Assistance have similar benchmark...
freecad-heini-1 wrote:
Fri Jun 15, 2018 7:06 am
Here are the loading time for the 1GB step file:
Thanks a lot @freecad-heini-1 for testing!
Did you get a chance to load it also on ProE?
Last edited by easyw-fc on Fri Jun 15, 2018 10:07 am, edited 1 time in total.
freecad-heini-1
Posts: 3956
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Assembly3 preview

Postby freecad-heini-1 » Fri Jun 15, 2018 8:33 am

realthunder wrote:
Fri Jun 15, 2018 7:39 am
This is OCCT file reading time. And the second message shows the time to import OCCT results into FC. And it took about 4 hours, which means there is probably something wrong.
That was the 1GB file.

The 209,6MB file:

Code: Select all

<Import> AppImportGuiPy.cpp(477): file read time: 234.258s
<Import> AppImportGuiPy.cpp(478): import time: 77.8405s
<Import> AppImportGuiPy.cpp(479): total time: 312.098s
With the appimage 0.17.5235:

Code: Select all

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Whow - it really fast and great to handle, zooming in, rotating.

It's great to see this work to make Freecad faster.

There is one thing that is sometimes really slow. The measurement tool for distance and the FCInfo macro to calculate the part volume and weight. If you are intested, I could send you some customer files (top-secret) via PM.

Thank you so much for your great work and best regards
Wilfried
easyw-fc wrote:
Fri Jun 15, 2018 7:51 am
Did you get a chance to load it also on ProE?
No, next week I could try, but it's running in a virtual machine (virtualbox), so I guess it will take very long to load and it's not really useable.
Mark Szlazak
Posts: 260
Joined: Tue Apr 04, 2017 6:06 pm

Re: Assembly3 preview

Postby Mark Szlazak » Fri Jun 15, 2018 3:31 pm

freecad-heini-1 wrote:
Fri Jun 15, 2018 8:33 am
realthunder wrote:
Fri Jun 15, 2018 7:39 am
This is OCCT file reading time. And the second message shows the time to import OCCT results into FC. And it took about 4 hours, which means there is probably something wrong.
That was the 1GB file.

The 209,6MB file:

Code: Select all

<Import> AppImportGuiPy.cpp(477): file read time: 234.258s
<Import> AppImportGuiPy.cpp(478): import time: 77.8405s
<Import> AppImportGuiPy.cpp(479): total time: 312.098s
With the appimage 0.17.5235:

Code: Select all

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.5235 (Git shallow) AppImage
Build type: None
Branch: LinkStage3
Hash: ccaa87e12aaadbd3106607fc503542a863b742da
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: German/Germany (de_DE)
Whow - it really fast and great to handle, zooming in, rotating.

It's great to see this work to make Freecad faster.

There is one thing that is sometimes really slow. The measurement tool for distance and the FCInfo macro to calculate the part volume and weight. If you are intested, I could send you some customer files (top-secret) via PM.

Thank you so much for your great work and best regards
Wilfried
easyw-fc wrote:
Fri Jun 15, 2018 7:51 am
Did you get a chance to load it also on ProE?
No, next week I could try, but it's running in a virtual machine (virtualbox), so I guess it will take very long to load and it's not really useable.
I have Creo 4.0 on my system but have not done this before(Sorry lost track in this thread). If you point me to the file and walk me through this on Creo i can attempt it Monday.