perforated sheet

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: perforated sheet

Post by NormandC »

easyw-fc wrote: Sat Dec 08, 2018 11:43 am An other suggestion would be to create a sketch with a square filled with circles. Then extrude it.
This should be very fast.
Not really. For one thing, the Sketcher does not deal well with a huge quantity of objects. With so many circles, it becomes sluggish. Also, the Sketcher Array feature is not as flexible as the Draft one.

Padding a sketch that contains the hole pattern and a rectangle to enclose them takes about 1 minute on my 2012 i5@3.5GHz desktop PC.

What I think would be an optimal work flow would be to create first a small plate with a small portion of the pattern; then use Draft Array with Fuse property set to true to array the plate to the final size. Draft Array is pretty efficient.
User avatar
Willem
Veteran
Posts: 1854
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: perforated sheet

Post by Willem »

triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Post by triplus »

Array.png
Array.png (47.51 KiB) Viewed 1945 times
Example on how to perform a multi-threaded Boolean Cut operation in FreeCAD. Open the attached file and copy/paste the code snippet in Python console.

Code: Select all

import Part
Part.show(App.ActiveDocument.Box.Shape.cut(App.ActiveDocument.Array.Shape.Solids))
Attachments
Array.fcstd
(23.87 KiB) Downloaded 89 times
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Post by triplus »

Does anybody have a CPU like Ryzen Threadripper at disposal? Basically hardware with high number of cores/threads (and higher amount of RAM). It would be nice to test on just how beneficial such hardware is. In regards to doing basic Boolean operation (single vs. multi-threaded).
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: perforated sheet

Post by Kunda1 »

triplus wrote: Tue Dec 11, 2018 1:07 pm Does anybody have a CPU like Ryzen Threadripper at disposal?
Yes, good question. Thanks for asking.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Post by f3nix »

triplus wrote: Tue Dec 11, 2018 1:07 pm Does anybody have a CPU like Ryzen Threadripper at disposal? Basically hardware with high number of cores/threads (and higher amount of RAM). It would be nice to test on just how beneficial such hardware is. In regards to doing basic Boolean operation (single vs. multi-threaded).
Hi.
I have just tested with AMD Ryzen 7 2700X. 32GB RAM. 8 cores. 16 threads.

Array: 60x60

Run time ~ 1 minute 7 seconds

Memory usage ~9GB.

It does not seem that all cores are used 100% during this time.

It looks like there is a memory leak somewhere. Even after closing the document the memory consumption goes down by only 3GB. 6GB are unusable.

With an array of 100x100 I ran out of RAM.

Code: Select all

[577569.982894] Out of memory: Kill process 3687 (FreeCAD) score 843 or sacrifice child
[577569.982938] Killed process 3687 (FreeCAD) total-vm:30599288kB, anon-rss:27713384kB, file-rss:25020kB, shmem-rss:8668kB
[577570.632037] oom_reaper: reaped process 3687 (FreeCAD), now anon-rss:0kB, file-rss:27388kB, shmem-rss:8668kB
Screenshot_20190223_223657.png
Screenshot_20190223_223657.png (359.64 KiB) Viewed 1748 times

Cheers,
Mateusz
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Post by triplus »

f3nix wrote: Sat Feb 23, 2019 10:12 pm Hi.
I have just tested with AMD Ryzen 7 2700X. 32GB RAM. 8 cores. 16 threads.

Array: 60x60

Run time ~ 1 minute 7 seconds

Memory usage ~9GB.
Great! Could you by any chance repeat the same test again, this time using Part Cut command?
It looks like there is a memory leak somewhere.
Yes, highly likely currently things misbehave a bit:

https://forum.freecadweb.org/viewtopic.php?f=8&t=18332
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Post by f3nix »

triplus wrote: Tue Feb 26, 2019 5:05 pm Great! Could you by any chance repeat the same test again, this time using Part Cut command?
Array: 60x60

Run time ~ 1 minute 20 seconds

Memory usage ~9GB

It looks like only 2 to 3 cores are used during this time. Not 100% all the time.

It looks like there is a memory leak somewhere.
triplus wrote: Yes, highly likely currently things misbehave a bit:

https://forum.freecadweb.org/viewtopic.php?f=8&t=18332
Thanks for confirming.
It seems that using Part Cut causes a memory leak too...

Cheers,
Mateusz

P.S. Sorry for late reply.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: perforated sheet

Post by triplus »

Hi Mateusz

Thanks for making the tests and providing the data. I expected a bit better results, as with less cores/threads i get bigger performance boost on my side.

What is the OCCT version you used in the tests?
User avatar
f3nix
Posts: 346
Joined: Sat May 30, 2015 11:58 am

Re: perforated sheet

Post by f3nix »

Here is my FreeCAD info:

Code: Select all

OS: Debian GNU/Linux buster/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16084 (Git)
Build type: Debug
Branch: master
Hash: 568faf67a05454125db21452c35ce915bceb05cb
Python version: 2.7.16
Qt version: 5.11.3
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
It uses opencascade from Debian repository. 7.3.0+dfsg1-5
It is compiled with TBB on.

As I mentioned before not all cores are used during the operation.

For example while compiling FreeCAD with make -j17 I see all cores go to 100% for the whole compile time.
But while doing the test only 3-4 cores are used and not all the time.

Cheers,
Mateusz
Post Reply