Specifying hardware components

I now realise that this statement was incredibly optimistic. The ISO specs, reference ISO specs, which reference more specs, and it is specs the whole way down. Once you have specs for lengths and threads and pitches, you then realise some screws follow different conventions.

Long story short, I have made a python library called hardspec which calculates and looks up a number of things like dimensions for screws/Nuts/Washers. It also has SVG diagrams for the components. Documentations is not good yet, but there is an example which looks like this:

Current the library has:

  • Some basic info about some material naming including
    • Brass
    • A2 Stainless Steel (18-8 in the US)
  • Metric threads as defined in ISO 261
  • Preferred metric threads as defined in ISO 262
  • Preferred screw and thread lengths as defined by ISO 888 (Frustratingly this is not followed by Socket Head screws that are most commonly used!!!)
  • Hex Bolt - Fully threaded (ISO 4017/DIN 933)
  • Hex Bolt - Partially threaded (ISO 4014/DIN 931)
  • Socket Head Cap Screw (ISO 4762/DIN 912)
  • Socket Head Button Screw (ISO 7380-1)
  • Hex Nut (ISO 4032/DIN 934)
  • Washer (ISO 7089/DIN 125A)

Anyway this “just” looking up the ISO standards was about 1,200 lines of code, and shows that I really need a better hobby for the Christmas break next year.

Next stage is making the Web Crawler from above use hardspec to find matching hardware, on a few sites.