I'm trying to use OpenSCAD to automate the process of producing molds of 3d objects from .stl files of the objects. My challenge is that the .stl files I'm using all have different scales and I need to correct for this. At the moment it's a manual process.
Is there anyway to have OpenSCAD return some information about the scale of a .stl file? For example, returning a vector containing [min_x, max_x, min_y, max_y, min_z, max_z] would be hugely useful. Also useful would be a function that returned the angle of rotation of the base of the object from either the x, y or z axes. The user would have to define which axes was supposed to represent the base (this would typically be the z-axis). This would allow me to programatically correct for any simple alignment issues in the object versus the axes.
Thanks in advance for your thoughts on how to do this.