Hi Ben, I'm working on a 3D printed foot orthosis of my own (different kind) and have done several reverse-engineering jobs before (ideally using 3D scanning, or alternatively with photogrammetry or even just taking pictures and eyeballing it, iterating off of 3D prints, etc.). Finally, I'm also knowledgeable about "metamaterials", using lattice shapes to locally change the stiffness in some areas but not in others. I think this is what you are referencing--it is a common focus of research at big shoe design firms like Adidas.
Additionally, I see that you don't just want this part reverse-engineered, but you also want a 3D modelling "script" that can generate the appropriate model for a different shoe size. Fortunately, I can fairly call myself a Rhinoceros 3D expert and can program it with its programming language, Grasshopper. (Rhino 3D is much more powerful than solid modelling programs like SolidWorks, although I'm also expert with those). I've also been using 3D printers for several years and continue to use them daily.
Do you already have a 3D scan file? If so, could I sign an NDA with you and then take a look at the scan to see how "dirty" or "clean" it is? (Quality varies immensely).
Also, how precise would you like to get with your shoe sizes? E.g. in the USA we have foot lengths (e.g. I wear a US men's 9.5 shoe) and occasionally foot widths are specified too (e.g. D for narrow feet, E for wide feet I think)...
Best,
Caleb
PhD Candidate
Auburn University