Exported STEP-File contains surplus PRODUCT

Post here for help on using FreeCAD's graphical user interface (GUI).
User avatar
easyw-fc
Posts: 659
Joined: Thu Jul 09, 2015 9:34 am

Re: Exported STEP-File contains surplus PRODUCT

Postby easyw-fc » Sun Mar 26, 2017 5:33 pm

wmayer wrote:git commit 7901cf7

it works like a charm!
Thx so much! :D

Maurice
User avatar
easyw-fc
Posts: 659
Joined: Thu Jul 09, 2015 9:34 am

Re: Exported STEP-File contains surplus PRODUCT

Postby easyw-fc » Thu Mar 30, 2017 10:10 am

wmayer wrote:git commit 7901cf7

Hi @wmayer
after this commit I noticed that the exporting structure is fine, but the file size increased a lot also when the STEP is a single object...

Here a sample file to compare:
1) original STEP file with hierarchy (84KB)
as1-ac-214.stp
(83.29 KiB) Downloaded 5 times

2) STEP file exported from FC 0.15 as multiple objects (232K)
as1-ac-214-fc015-mp.stp
(231.36 KiB) Downloaded 4 times

3) STEP file exported from FC 0.15 after a fusion and simple copy of the objects (171KB)
as1-ac-214-fc015-sp.stp
(170.16 KiB) Downloaded 3 times

4) STEP file exported from FC 0.16 as multiple objects (172KB)
as1-ac-214-fc016-mp.stp
(86.61 KiB) Downloaded 4 times

5) STEP file exported from FC 0.16 after a fusion and simple copy of the objects (87KB)
as1-ac-214-fc016-sp.stp
(171.7 KiB) Downloaded 4 times

6) STEP file exported from FC 0.17 10661-64b as multiple objects (230KB)
(attaching in the next post)
7) STEP file exported from FC 0.17 10661-64b after a fusion and simple copy of the objects (170KB)
(attaching in the next post)
8) FC source file of the simple copy and simple copy fused of the hierarchy
(attaching in the next post)
I also tested that if I enable WriteSurfaceCurveMode to '1' the file size will increase further

Thx for investigating further
Maurice
User avatar
easyw-fc
Posts: 659
Joined: Thu Jul 09, 2015 9:34 am

Re: Exported STEP-File contains surplus PRODUCT

Postby easyw-fc » Thu Mar 30, 2017 10:12 am

Here the other files
6) STEP file exported from FC 0.17 10661-64b as multiple objects (230KB)
as1-ac-214-fc017-mp.stp
(229.33 KiB) Downloaded 4 times

7) STEP file exported from FC 0.17 10661-64b after a fusion and simple copy of the objects (170KB)
as1-ac-214-fc017-sp.stp
(170 KiB) Downloaded 4 times

8) FC source file of the simple copy and simple copy fused of the hierarchy
as1-ac-214-fc016-mp-source.FCStd
(88.85 KiB) Downloaded 4 times


The best in terms of file size is when exported from FC 0.16 after a fusion and simple copy of the objects (87KB)

Thx for investigating further
Maurice
vejmarie
Posts: 449
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Exported STEP-File contains surplus PRODUCT

Postby vejmarie » Thu Mar 30, 2017 11:19 am

I will try to have a look if wmayer doesn't have the time. I am currently struggling with a crazy step file which is taking for ever to be opened (went from 33 hours to 4 hours, still some improvement ahead to make it usable).
wmayer
Site Admin
Posts: 11348
Joined: Thu Feb 19, 2009 10:32 am

Re: Exported STEP-File contains surplus PRODUCT

Postby wmayer » Mon Apr 03, 2017 7:13 am

after this commit I noticed that the exporting structure is fine, but the file size increased a lot also when the STEP is a single object...

You say you have noticed the bigger file sizes after this commit doesn't mean it is caused by this commit :). All what this commit is about is that when exporting a single shape it doesn't add the ASSEMBLY label to keep the placement separate. So, this means that when exporting several objects effectively nothing has changed at all.

Since the file sizes of the exported models with single and multiple objects are more than twice as big as before it must have a different reason. After looking in the preferences of the STEP export you will find the setting Write out curves in parametric space of surface which wasn't there in previous FreeCAD versions. After switching off this setting you will get more or less the same file size as the original STEP files.
User avatar
easyw-fc
Posts: 659
Joined: Thu Jul 09, 2015 9:34 am

Re: Exported STEP-File contains surplus PRODUCT

Postby easyw-fc » Mon Apr 03, 2017 8:24 am

wmayer wrote:Since the file sizes of the exported models with single and multiple objects are more than twice as big as before it must have a different reason. After looking in the preferences of the STEP export you will find the setting Write out curves in parametric space of surface which wasn't there in previous FreeCAD versions. After switching off this setting you will get more or less the same file size as the original STEP files.

Hi @wmayer
thank you for investigating further...
as you may remember I was the one that discovered the p curves problem and setting
https://forum.freecadweb.org/viewtopic. ... 74#p142127
so before reporting I checked this parameter settings...
In fact if you export the as1-ac-214-fc017-sp.stp 171KB file (which is a single object coming from fusing all the parts) with p curves enabled you will get as1-ac-214-fc017-sp-pcvs.stp 382KB...
still there is a difference though among FC 0.16 and FC 0.17 exporting mode
After investigating further, the real difference appears when the part is as an assembly of objects or a single fused object ...
So:
- multipart as1-ac-214-fc016-mp.stp in FC 016 is 87KB
- multipart as1-ac-214-fc017-mp.stp in FC 017 is 87KB -> good :)
but the difference is when fusing or making a compound of the object
- multipart fused as1-ac-214-fc017-mp-fused.stp in FC 017 is 171KB -> double of the single parts not fused
- as1-ac-214-fc017-mp-compound.stp in FC 0.17 is 253KB -> I know compound is doubling the elements
sorry for the noise but FC 0.16 put me in the wrong direction because when you save a multipart in FC016 you get an assembly but you will see a single part in FC016

what I found strange is the increasing of size when you make a fusion of multipart which becomes double of the single parts file...

At the end my question should become:
Is that correct that a fusion of parts will become double size of a single collection of parts when exporting to STEP format?
I would have expected that fusion would have the same footprint or even less than multiple parts...
wmayer
Site Admin
Posts: 11348
Joined: Thu Feb 19, 2009 10:32 am

Re: Exported STEP-File contains surplus PRODUCT

Postby wmayer » Mon Apr 03, 2017 10:09 am

Is that correct that a fusion of parts will become double size of a single collection of parts when exporting to STEP format?
I would have expected that fusion would have the same footprint or even less than multiple parts...

That's something I am not able to answer since I know almost nothing about the STEP specification. Maybe there are some exports out there who know the answer.
User avatar
easyw-fc
Posts: 659
Joined: Thu Jul 09, 2015 9:34 am

Re: Exported STEP-File contains surplus PRODUCT

Postby easyw-fc » Mon Apr 03, 2017 10:41 am

I also noticed that I have as expected:
1) FreeCAD file with multipart
as1-ac-214-fc017-mp-source.FCStd
(93.59 KiB) Downloaded 3 times

2) FreeCAD file with multipart fused
as1-ac-214-fc017-mp-fused-source.FCStd
(121.01 KiB) Downloaded 3 times

3) FreeCAD file with multipart fused and single copy (fusion deleted)
as1-ac-214-fc017-mp-fused-singlecopy-source.FCStd
(28.61 KiB) Downloaded 3 times

so my supposition is good for FC BREP file (fused single copy is less than 1/3rd the multipart file)
and I would expect the same for STEP :o
EDIT
I made a test in CAD Assistant of OCC saving from FC in BREP mode and opening it in CA... when exporting from CA to STEP the file size remain very similar to the one FC is exporting... so probably this is what OCC is doing when saving a union of parts in STEP...
wmayer
Site Admin
Posts: 11348
Joined: Thu Feb 19, 2009 10:32 am

Re: Exported STEP-File contains surplus PRODUCT

Postby wmayer » Mon Apr 03, 2017 4:14 pm

vejmarie wrote:I will try to have a look if wmayer doesn't have the time. I am currently struggling with a crazy step file which is taking for ever to be opened (went from 33 hours to 4 hours, still some improvement ahead to make it usable).

Due to some recent changes in the tree view the load of STEP files is 30x slower: https://forum.freecadweb.org/viewtopic. ... 04#p168504
vejmarie
Posts: 449
Joined: Mon Jan 04, 2016 4:52 pm
Location: Somewhere between France, USA and Taiwan
Contact:

Re: Exported STEP-File contains surplus PRODUCT

Postby vejmarie » Mon Apr 03, 2017 7:15 pm

wmayer wrote:
vejmarie wrote:I will try to have a look if wmayer doesn't have the time. I am currently struggling with a crazy step file which is taking for ever to be opened (went from 33 hours to 4 hours, still some improvement ahead to make it usable).

Due to some recent changes in the tree view the load of STEP files is 30x slower: https://forum.freecadweb.org/viewtopic. ... 04#p168504


Hi,

Yep I have seen that while tracking the performance issue with the new big STEP I added into my testings. https://forum.freecadweb.org/viewtopic.php?f=27&t=21334&p=168537#p168537

I didn't pushed anything yet into my step branch, but do have a few improvement with new PartDesign which is improving by x7 STEP "reading" with complex assemblies into them. Just give me a few more days and I will have a global solution.

vejmarie