"""Plain washer, inch series, Type A preferred sizes of ASME B18.21.1-2009 (formerly B18.22.1-1965; narrow N and wide W series), for #0 to 1/2 in screws; and fender washers (F) for #0 to 1/2 in screws as step.parts' published models draw them (no standard covers fender washers). Envelope model: a flat ring (inside diameter ID, outside diameter OD, thickness T, nominal values). It sits on the XY plane, centred on the origin, axis along +Z. The model is in millimetres (1 in = 25.4 mm). """ from steve import Model size = "1/4 N" # Washer size (screw size, series) material = "steel" # Material # Inches. Type A plain washers, preferred sizes: size: (inside diameter ID, outside diameter OD, thickness T), basic # values. ASME B18.21.1-2009 (R2016), which took over B18.22.1-1965 unchanged, as reproduced at # https://amesweb.info/Fasteners/Washers/Type-A-Plain-Washers-Dimensions-Chart.aspx (sizes No. 0, 2, 4 named there); # same values in B18.22.1-1965 (R1998) at https://engineersedge.com/plain_washers.htm and # https://www.globalfastener.com/standards/detail_1111.html (Table 1A). WASHERS = { "#0": (0.078, 0.188, 0.020), "#2": (0.094, 0.250, 0.020), "#4": (0.125, 0.312, 0.032), "#6": (0.156, 0.375, 0.049), "#8": (0.188, 0.438, 0.049), "#10": (0.219, 0.500, 0.049), "1/4 N": (0.281, 0.625, 0.065), "1/4 W": (0.312, 0.734, 0.065), "5/16 N": (0.344, 0.688, 0.065), "5/16 W": (0.375, 0.875, 0.083), "3/8 N": (0.406, 0.812, 0.065), "3/8 W": (0.438, 1.000, 0.083), "7/16 N": (0.469, 0.922, 0.065), "7/16 W": (0.500, 1.250, 0.083), "1/2 N": (0.531, 1.062, 0.095), "1/2 W": (0.562, 1.375, 0.109), } # Fender washers (F), mm: measured on step.parts' models asme_fender_washer__simple (MIT; their bore and outside # cylinder radii and their thickness, read from the faces). No standard covers fender washers; these models are # proportional (OD 3.2 d, ID 1.08 d, T 0.18 d with d the screw's nominal diameter, T at least 0.45 mm). # size: (inside diameter ID, outside diameter OD, thickness T) FENDER = { "#0 F": (1.646, 4.8768, 0.45), "#2 F": (2.3592, 6.9901, 0.45), "#4 F": (3.0724, 9.1034, 0.5121), "#6 F": (3.7856, 11.2166, 0.6309), "#8 F": (4.4988, 13.3299, 0.7498), "#10 F": (5.212, 15.4432, 0.8687), "1/4 F": (6.858, 20.32, 1.143), "5/16 F": (8.5724, 25.4, 1.4287), "3/8 F": (10.287, 30.48, 1.7145), "1/2 F": (13.716, 40.64, 2.286), } # material choice: (STEVE material library id, appearance colour) MATERIALS = { "steel": ("steel-generic", "#b8bcc2"), # carbon steel, zinc plated "stainless-18-8": ("stainless-304", "#c9ccd0"), "stainless-316": ("stainless-316", "#c9ccd0"), } INCH = 25.4 ID, OD, T = FENDER[size] if size in FENDER else (v * INCH for v in WASHERS[size]) material_id, colour = MATERIALS[material] model = Model() with model.sketch("washer_sketch", on="XY", name="Washer") as sk: sk.circle("outside", (0, 0), OD / 2) sk.circle("inside", (0, 0), ID / 2) model.extrude("washer", "washer_sketch", distance=T, name="Washer") model.material(material_id, color=colour) result = model.result()