What metadata is there on stl and step, what process removes it?

  • Kopsis@forum.guncadindex.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    2 months ago

    STEP file metadata is in the “FILE_NAME” field within the “HEADER” section. It can include: name, time_stamp, author (name and address), organization, preprocessor_version, originating_system, and authorization (name and mailing address of the person who authorized the file). Most of those are rarely populated. Since STEP files are ASCII, you can open them in a text editor and set any of those fields to an empty string.

    Binary STL files contain an 80 byte header that could contain metadata. There’s no specification for header contents, so apps can write anything they wish to that section. Nothing in the header is required, so to scrub the file, you could simply zero that section. You could do it manually using a hex editor, or automate it with a simple script. The following Python code will do that:

    with open('mygat.stl', 'r+b') as f:
        f.write(bytes(80))