PDN Files very big - hint to a problem?

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

PDN Files very big - hint to a problem?

Post by chrisb »

I have realized that the size of identical objects is very different depending on using Part or Part Design. While the attached Part-file has a size of 160 KB the PartDesign-file has more than double the size.
The situation is similar with the time for a recompute: 13 seconds for Part vs. 29 sec. for PartDesign.
I would like to ask here if there is a good reason for this or if it is a hint to a more or less serious problem.

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12999 (Git)
Build type: Release
Branch: (HEAD detached at c8af1d1)
Hash: c8af1d16afee607f3125268c6f830ac7b815c33e
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
Attachments
poked.gif
poked.gif (13.88 KiB) Viewed 1409 times
bodyMultiTrans.FCStd
(348.05 KiB) Downloaded 54 times
partMultiArray.FCStd
(162.61 KiB) Downloaded 54 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: PDN Files very big - hint to a problem?

Post by DeepSOIC »

File size difference is easy to explain.
file-size-difference.png
file-size-difference.png (405.69 KiB) Viewed 1386 times
The two largest shapes in PD-file are shape of last feature and shape of body (a copy of shape of last feature). There is room for improvement right here.

As for recompute speed:

Code: Select all

PART WB project

6 features are touched
Generating execution order...
Number of features to execute: 6
Execution order:
    Cylinder001
    Cylinder
    Array
    Array001
    Thickness
    Cut
Recomputing... (time in seconds, label)
	0.0160000324249	Cylinder001
	0.0	Cylinder
	0.0150001049042	Array
	0.0	Array001
	0.0369999408722	Thickness
	1.04999995232	Cut

Code: Select all

PARTDESIGN WB project

15 features are touched
Generating execution order...
Number of features to execute: 15
Execution order:
    XY_Plane
    Sketch
    Pad
    XZ_Plane
    Sketch001
    Pocket
    YZ_Plane
    Z_Axis
    X_Axis
    Y_Axis
    Origin
    LinearPattern
    PolarPattern
    MultiTransform
    Body
Recomputing... (time in seconds, label)
	0.0	XY_Plane
	0.0160000324249	Sketch
	0.0160000324249	Pad
	0.0	XZ_Plane
	0.0	Sketch001
	0.0620000362396	Pocket
	0.0	YZ_Plane
	0.0	Z_Axis
	0.0	X_Axis
	0.0	Y_Axis
	0.0	Origin
	0.0	LinearPattern
	0.0	PolarPattern
	4.36599993706	MultiTransform
	0.0709998607635	Body
So the slowness comes from MultiTransform. I suspect, it might be cutting holes one by one instead of one go like Part workbench does.

PS. Why is it so much faster on my laptop than on your machine? I have a laptop with intel i5 from circa 2012.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: PDN Files very big - hint to a problem?

Post by wmayer »

I don't know the reason for the longer recomputing time but for the double file size the reason is that a PDN feature actually stores two shapes. It saves the actual output shape but also the additive/subtractive shape used to perform the operation. Then the tip of the body is usually set to the shape of the last operation which is saved as a separate brep file into the project.
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: PDN Files very big - hint to a problem?

Post by chrisb »

Thanks for the information, so there is room for improvement but nothing to worry about.
DeepSOIC wrote: Thu Jan 18, 2018 9:40 am PS. Why is it so much faster on my laptop than on your machine? I have a laptop with intel i5 from circa 2012.
Which OS do you use, Windows or linux? I have an 1,4 GHz Intel Core i5, 8GB Ram. Usually it's fast enough, but when the models grow too big it gets a bit, well, lazy.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: PDN Files very big - hint to a problem?

Post by DeepSOIC »

chrisb wrote: Thu Jan 18, 2018 1:57 pm Which OS do you use, Windows or linux?
Windows 10 on intel core i5-3317U @ 2.3 GHz
Post Reply