STEP compression format .stpZ support

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

STEP compression format .stpZ support

Post by easyw-fc »

Hi,
I've just started to add a support for STEP File Compression for FreeCAD as it can be found on many commercial sw.

The reference is this documentation at
STEP file compression format

This FC Mod addon
https://github.com/easyw/stpZ
is able to read and write STEP files using the compressed STEP file extension .stpZ
The level of compression can be up to 10 times.

I tested the Import/Export feature with a Catia stpZ file found online:
Bracket.stpZ.zip
The file 'Bracket.stpZ.zip' has to be unzipped to 'Bracket.stpZ' to test the Importing.

I have also provided a sample of a hierarchy file here
as1-oc-214.stp uncompressed file size: 432K
as1-oc-214.stpZ compressed file size: 32K

Would someone please test to import and export some file generated by some commercial sw to see if everything is working as needed?

If this can be of some interest, I could ask to merge the Import/Export Mod to the main branch.

Maurice
Marco_T
Posts: 266
Joined: Mon Jan 11, 2016 11:58 pm
Location: Di ca da l'aghe

Re: STEP compression format .stpZ support

Post by Marco_T »

easyw-fc wrote: Tue Jan 23, 2018 10:23 pm I've just started to add a support for STEP File Compression for FreeCAD as it can be found on many commercial sw.
Hi Maurice,
I don't use this file format but I think this import/export feature is very useful to improve the FreeCAD capabilities.
FC will became a real "swiss knife" in terms of data interchange.
Thanks for your effort!

--
Marco_T
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: STEP compression format .stpZ support

Post by jmaustpc »

easyw-fc wrote: Tue Jan 23, 2018 10:23 pm If this can be of some interest, I could ask to merge the Import/Export Mod to the main branch.

Maurice


Hi Maurice
Once you are happy with it, I agree that this should be in master. Might be something worth getting into 0.17, if doing so is not too complex/difficult.

Jim
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP compression format .stpZ support

Post by easyw-fc »

Marco_T wrote: Thu Jan 25, 2018 10:33 pm Hi Maurice,
I don't use this file format but I think this import/export feature is very useful to improve the FreeCAD capabilities.
FC will became a real "swiss knife" in terms of data interchange.
Thanks for your effort!
Hi Marco_T
I know this is a format now widely used because it seems that only Catia and NX are taking in care of it, but it would be an other feature for the FC "swiss knife" :D
At the same time I'm starting to use it just to save space on my STEP library... I can just open a stpZ file instead of a manually zipped one in just one click, and then save it back without the need to re-zip it manually.
jmaustpc wrote: Fri Jan 26, 2018 4:11 am Hi Maurice
Once you are happy with it, I agree that this should be in master. Might be something worth getting into 0.17, if doing so is not too complex/difficult.
Jim
Hi Jim,
the stpZ importer/exporter is quite simple and it is working fine now, the only issue I have ATM is with utf-8 file names, because FC release of gzip doesn't handle correctly utf-8 file names.

I'm working on it.

I'm adding also a picture of the stpZ philosophy as in the CAX-if doc
stpZ-sample.png
stpZ-sample.png (52.45 KiB) Viewed 6427 times
stpZ-benefits.png
stpZ-benefits.png (56.92 KiB) Viewed 6426 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP compression format .stpZ support

Post by easyw-fc »

User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: STEP compression format .stpZ support

Post by Kunda1 »

OT here but relevant, just riffing an idea here.. but I was wondering if somehow we could rig phpbb do automatically compress step files this way when they get uploaded to the forum server. thoughts?
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
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: STEP compression format .stpZ support

Post by jmaustpc »

easyw-fc wrote: Fri Jan 26, 2018 2:53 pm Hi Jim,
the stpZ importer/exporter
According to your posts and this document I found (I am sure its the same document as the one you where referencing)
https://www.cax-if.org/documents/rec_pr ... on_v12.pdf

The file extension is ".stpZ" not ".stpz", that is the "Z" is supposed to be capitalised. I am not sure if that is a good idea since I don't know if all O/Ses will accept a capitalised file extension. PHPBB certainly dosen't. I just added it as an allowed file type in these forums but even though I used a capitalised "Z" PHPBB converted it top lower case.

Obviously it was not you who decided on the file extension.

Jim
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP compression format .stpZ support

Post by easyw-fc »

jmaustpc wrote: Wed Jan 31, 2018 4:25 pm
easyw-fc wrote: Fri Jan 26, 2018 2:53 pm Hi Jim,
the stpZ importer/exporter
According to your posts and this document I found (I am sure its the same document as the one you where referencing)
https://www.cax-if.org/documents/rec_pr ... on_v12.pdf

The file extension is ".stpZ" not ".stpz", that is the "Z" is supposed to be capitalised. I am not sure if that is a good idea since I don't know if all O/Ses will accept a capitalised file extension. PHPBB certainly dosen't. I just added it as an allowed file type in these forums but even though I used a capitalised "Z" PHPBB converted it top lower case.

Obviously it was not you who decided on the file extension.

Jim
stpZ is most supported by Catia and NX ... so I think is mainly Windoz os which is not case sensitive ;) ...
Anyway in the stpZ file importer/exporter I used both 'stpZ' and 'stpz' file extension :D

Now we have Catia, NX and FreeCAD ;)
Post Reply