"""Inch lock washers, ASME B18.21.1: regular helical spring lock washers (split) and external tooth lock washers. Envelope models for assemblies: the flat blank, an annulus from the minimum inside diameter to the maximum outside diameter, as thick as the section (split: the minimum mean section thickness; tooth: the maximum thickness), lying on the XY plane, centred on the origin. The split washer's helical split and the tooth washer's twisted teeth are not dimensioned by the standard's tables and are not modelled. The model is in millimetres (1 in = 25.4 mm). """ from steve import Model size = "#10" # Nominal size (screw) style = "split" # Washer style material = "steel" # Material # Inches. ASME B18.21.1-2009 (R2016) Table 1, regular helical spring lock washers: (d min, dc max, h min) SPLIT = {"#2": (0.088, 0.172, 0.020), "#4": (0.114, 0.209, 0.025), "#6": (0.141, 0.250, 0.031), "#8": (0.167, 0.293, 0.040), "#10": (0.193, 0.334, 0.047), "1/4": (0.252, 0.487, 0.062), "5/16": (0.314, 0.583, 0.078), "3/8": (0.377, 0.680, 0.094), "1/2": (0.502, 0.869, 0.125)} # Inches. ASME B18.21.1 external tooth lock washers: (d min, dc max, t max); #2 from the 1999 edition. TOOTH = {"#2": (0.086, 0.189, 0.013), "#4": (0.115, 0.260, 0.018), "#6": (0.141, 0.320, 0.022), "#8": (0.168, 0.381, 0.023), "#10": (0.195, 0.410, 0.024), "1/4": (0.256, 0.510, 0.028), "5/16": (0.320, 0.610, 0.034), "3/8": (0.384, 0.694, 0.040), "1/2": (0.513, 0.900, 0.045)} MATERIALS = {"steel": ("steel-generic", "#8d9096"), "stainless-18-8": ("stainless-304", "#c9ccd0")} INCH = 25.4 d, D, t = (v * INCH for v in {"split": SPLIT, "tooth": TOOTH}[style][size]) material_id, colour = MATERIALS[material] model = Model() with model.sketch("washer_sketch", on="XY", name="Washer") as sk: sk.circle("outside", (0, 0), D / 2) sk.circle("inside", (0, 0), d / 2) model.extrude("washer", "washer_sketch", distance=t, name="Washer") model.material(material_id, color=colour) result = model.result()