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

  • freedickpics@lemmy.ml
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 months ago

    Ngl I thought this might be a post warning people to remove metadata from their photos. PSA: Remove metadata from your build pics before you upload them! Esp if you’re in a country unfriendly to fosscad. Stay safe & spread the signal

  • 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))
    
  • The Shittinator@forum.guncadindex.comM
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    STLs can be plaintext or binary. Avoid plaintext STLs (you can re-render them using Blender if you find them, they’re rare) and null the first 80B of binary ones. GUMM13’s doing research on the format.

    For STEPs, they’re all plaintext. I think you can null whitespace and maybe all comments, but I’m not sure.