Use draft / array to make holes in Part Design
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Use draft / array to make holes in Part Design
OS: Linux Mint 19.3 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.25025 (Git) AppImage
Build type: Release
Branch: master
Hash: fb8b21ec43dca706a4aa2d63d59a4fb79f050369
Python version: 3.9.4
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Memory : 7.7 Gio
i3
Word size of FreeCAD: 64-bit
Version: 0.20.25025 (Git) AppImage
Build type: Release
Branch: master
Hash: fb8b21ec43dca706a4aa2d63d59a4fb79f050369
Python version: 3.9.4
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Memory : 7.7 Gio
i3
Re: Use draft / array to make holes in Part Design
That is funny, FreeCAD crash before it is out of RAM?
Greetings
user1234
Greetings
user1234
- papyblaise
- Veteran
- Posts: 8027
- Joined: Thu Jun 13, 2019 4:28 pm
- Location: France
Re: Use draft / array to make holes in Part Design
Ha that reassures me I'm not alone
- papyblaise
- Veteran
- Posts: 8027
- Joined: Thu Jun 13, 2019 4:28 pm
- Location: France
Re: Use draft / array to make holes in Part Design
I would like to believe you, here is an examplenot more! This is fixed in 0.20dev
1600 spiral holes: with part 2.5mn, with Partdesign: crash after 10mn
I warn: wear sunglasses, because it makes the eyes spiral too
Fc V20pre
- Attachments
-
- spirale.PNG (52.88 KiB) Viewed 666 times
-
- spirale.FCStd
- (964.62 KiB) Downloaded 16 times
Re: Use draft / array to make holes in Part Design
This example has nothing to to with the array (transformation) tools in PartDesign. Your example is Draft + Part only. Also PartDesign has not a spiral array.
No problem here, is done in 72 seconds.papyblaise wrote: ↑Wed Jun 16, 2021 11:47 am 1600 spiral holes: with part 2.5mn, with Partdesign: crash after 10mn
Greetings
user1234
- papyblaise
- Veteran
- Posts: 8027
- Joined: Thu Jun 13, 2019 4:28 pm
- Location: France
Re: Use draft / array to make holes in Part Design
always these phony excuses, and each time I evoke this figure, I receive a fall of mockery, I nevertheless find this form nice
Re: Use draft / array to make holes in Part Design
What excuses? I think you get not he point. The issue was, that the PartDesign transformation tools was slow. Now they are fast as the Draft array + Part workaround. The only issue is now that PartDesign have no special array like spiral array in Draft.
Flippancy forms does not matter, only function.
Greetings
user1234
- papyblaise
- Veteran
- Posts: 8027
- Joined: Thu Jun 13, 2019 4:28 pm
- Location: France
Re: Use draft / array to make holes in Part Design
good, good if you prefer the classic: 2500holes:
2mn50 "with Partdesignet a 760mb file
1mn and 306mo with Draft array
so there is no equal
2mn50 "with Partdesignet a 760mb file
1mn and 306mo with Draft array
so there is no equal
- Attachments
-
- 2500trous1.FCStd
- (306.81 KiB) Downloaded 12 times
Re: Use draft / array to make holes in Part Design
The differences between Part and PartDesign are fairly good visible but by far not as serious as they used to be.
I took papyblaises's model and made the Part model completely independent from the Body to avoid the "link goes out of allowed scope" message.
The uploaded file has only few holes in the Body, for a comparison set the following values. I recommend to check skip recomputes before changing the values:
- in LinearPattern the number of occurrences to 50 instead of 5
- in LinearPattern001 the number of occurrences to 50 instead of 5
- in Array change NumberX from 5 to 50
- in Array change NumberY from 5 to 50
Mark everything in the body and measure the time for recompute and compare it to marking everything in the Cut for recompute.
Results here:
PartDesign
Recompute Body and everythig inside with autodetecting overlap mode: 181-184sec CPU time / 176-178sec elapsed time
Recompute Body and everythig inside with manually setting non-overlap mode: 178-182 sec CPU time / 73-77sec elapsed time
Part
Recompute Cut and everything below: 179-180sec CPU time / 51-56sec elapsed
So it seems that the CPU time is the same, but the Part model's recompute can be better parallelized.
Here is a script to measure the time for the recompute. Some lines are commented out for slightly different use cases.
I took papyblaises's model and made the Part model completely independent from the Body to avoid the "link goes out of allowed scope" message.
The uploaded file has only few holes in the Body, for a comparison set the following values. I recommend to check skip recomputes before changing the values:
- in LinearPattern the number of occurrences to 50 instead of 5
- in LinearPattern001 the number of occurrences to 50 instead of 5
- in Array change NumberX from 5 to 50
- in Array change NumberY from 5 to 50
Mark everything in the body and measure the time for recompute and compare it to marking everything in the Cut for recompute.
Results here:
PartDesign
Recompute Body and everythig inside with autodetecting overlap mode: 181-184sec CPU time / 176-178sec elapsed time
Recompute Body and everythig inside with manually setting non-overlap mode: 178-182 sec CPU time / 73-77sec elapsed time
Part
Recompute Cut and everything below: 179-180sec CPU time / 51-56sec elapsed
So it seems that the CPU time is the same, but the Part model's recompute can be better parallelized.
Here is a script to measure the time for the recompute. Some lines are commented out for slightly different use cases.
Code: Select all
# measure the time elapsed for a recompute
# exec(open('/Users/cb/panhard/coupe/sanssoupapes/timeToRecompute.py').read())
import time
import FreeCAD
# # touch everything:
# for obj in FreeCAD.ActiveDocument.Objects:
# obj.touch()
# Uncomment exactly one of these two:
timeFn = time.perf_counter # measure real time
## timeFn = time.process_time # measure process time, ignore sleep, count each processor
# measure recompute
startTime = timeFn()
App.ActiveDocument.recompute()
endTime = timeFn()
elapsed = int(endTime - startTime)
print('{:02d}:{:02d}:{:05.2f}'.format(int(elapsed) // 3600, (int(elapsed) % 3600 // 60), elapsed % 60))
print(endTime - startTime)
- Attachments
-
- 2500trous_cb.FCStd
- (28.95 KiB) Downloaded 14 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Use draft / array to make holes in Part Design
You know that the RAM depends on the graphical (tessellation) settings? Of course the must be the same for a comparison.papyblaise wrote: ↑Wed Jun 16, 2021 4:14 pm 2mn50 "with Partdesignet a 760mb file
1mn and 306mo with Draft array
I never said that, only that almost, since PartDesign have not all default patterns like Draft.
And if you do not believe me, read:
https://github.com/FreeCAD/FreeCAD/pull/4504
https://forum.freecadweb.org/viewtopic.php?t=55860
Greetings
user1234