Metal Weight API
Metal stock weight and cost as an API, computed locally and deterministically. The weight endpoint computes the mass of a length of metal stock from its shape, dimensions and material: round bar, square bar, flat bar or plate, sheet, hexagonal bar, round tube or pipe and rectangular (box) tube. It works out the cross-sectional area, multiplies by the length and the material density, and returns the weight per piece and the total for a quantity — in kilograms, pounds, grams and tonnes — along with the volume. Material density is looked up from a built-in table of metals (steel, stainless, aluminium, copper, brass, bronze, lead, zinc, titanium, nickel, gold, silver and more) or you can pass an explicit density. The cost endpoint multiplies that weight by a price per kilogram, pound or tonne to give the material cost per piece and in total. The materials endpoint lists the densities. Dimensions accept millimetres, centimetres, metres, inches or feet. Everything is computed locally and deterministically, so it is instant and private. Ideal for metal fabrication and machine-shop tools, engineering and CAD apps, scrap and stock quoting, and shipping-weight estimates. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is metal stock weight from geometry and density; for beam reactions and deflection use a beam API and for live metal spot prices use a commodities API.
api.oanor.com/metalweight-api