"""The 33 parts of the user's reference sheet (2026-10-14), one builder each, in sheet order. Row A = top row (11), row B = middle row (11), row C = bottom row (11: five housings, six hydraulic cylinders), read left to right. Sizes: the sheet has no scale; 1 sheet pixel = 2 mm, so the top-row parts are about 0.28 m long and the bottom row 0.5 m. Item space in mm: X right, Y up the sheet, Z towards the camera, floor z = 0, origin at the item's centre. The sheet is one top view, so depth (Z) is my reading of the shading: cylinders lying on the floor are round, plates lie flat, side brackets stand up. """ import math from kitlib import Item, PAINT, DARK S = 2.0 # mm per sheet pixel ITEMS = [] def item(key, name, cx, cy): def deco(fn): ITEMS.append((key, name, (cx, cy), fn)) return fn return deco def canister(k, at, r, L, axis='-Y', top=8.0, bottom=12.0, grooves=(), segs=40): """a round can lying along axis: rounded ends, grooves at the given distances from its start""" prof = [(0, 0), (r * 0.55, 0), (r, top, top)] for g in grooves: prof += [(r, g - 2.0), (r - 1.6, g - 1.0), (r - 1.6, g + 1.0), (r, g + 2.0)] prof += [(r, L - bottom, 0), (r, L, bottom), (0, L)] return k.lathe(prof, at, axis, segs) # ============================================================== row A @item("A01", "ChannelHousing", 247, 227) def a01(k): k.box((0, 0, 3), (170, 280, 6), 1.5) for sx in (-1, 1): k.box((sx * 76, 5, 15), (18, 262, 24), 2.5) k.bolt((sx * 76, 122, 27), r=6) body = [(-50, -128, 10), (50, -128, 10), (50, 75, 50), (-50, 75, 50)] k.slab(body, 6, 64, 9) k.box((0, -40, 65), (40, 120, 6), 2.5) k.lathe([(0, 0), (38, 0, 1.5), (38, 6, 2), (0, 6)], (0, 80, 62)) for a in (90, 210, 330): k.bolt((26 * math.cos(math.radians(a)), 80 + 26 * math.sin(math.radians(a)), 68), r=5) for x in (-8, 8): k.dot((x, -115, 64), r=3.5) @item("A02", "TwinCanister", 355, 228) def a02(k): k.box((0, 116, 4), (132, 28, 8), 1.5) for sx in (-1, 1): k.bolt((sx * 57, 116, 8), r=5.5) k.box((sx * 25, 114, 17), (40, 26, 18), 2.5, ops=[('+z', -7, 7, -13, 0, -6)]) k.cyl((sx * 28, 102, 31), '-Y', 22, 12) canister(k, (sx * 30, 82, 31), 30, 215, grooves=(30, 190)) k.dot((sx * 30 + sx * 18, -128, 50), r=2.5) @item("A03", "ValveCan", 491, 228) def a03(k): k.box((0, 108, 4), (82, 62, 8), 2) for sx in (-1, 1): for y in (95, 121): k.bolt((sx * 35, y, 8), r=4.5) k.box((0, 106, 17), (40, 50, 20), 3) k.cup((0, 112, 26), 'Z', 9, 5, 6, 5) k.cyl((0, 82, 40), '-Y', 22, 17) canister(k, (0, 62, 40), 40, 105, top=12, bottom=6, grooves=(40,)) k.box((0, 30, 80), (4, 22, 4), 1, mat=DARK, col=False) k.box((0, -50, 40), (84, 88, 78), 14, ops=[('+z', -40, 40, -14, -10, -2), ('+z', -40, 40, -76, -72, -2)]) @item("A04", "BlockHousing", 624, 228) def a04(k): k.box((0, 120, 4), (110, 26, 8), 2) for sx in (-1, 1): k.bolt((sx * 45, 120, 8), r=7) k.box((0, 100, 20), (30, 50, 24), 3) k.box((0, 86, 30), (54, 22, 22), 4) k.dot((0, 108, 32), r=3) k.box((0, -22, 32), (110, 210, 64), 9, ops=[('+z', -54, -40, 38, 48, -10), ('+z', 40, 54, 38, 48, -10), ('+z', -54, -40, -86, -76, -10), ('+z', 40, 54, -86, -76, -10), ('+z', -34, 34, -70, 30, 3), ('+z', -4, 4, 50, 70, -5)]) @item("A05", "BracketCylinder", 762, 228) def a05(k): for sx in (-1, 1): k.box((sx * 63, 0, 45), (6, 270, 90), 1.5) k.box((sx * 72, 120, 30), (14, 24, 60), 1.5) # gusset at the top corner k.box((sx * 72, -76, 3), (32, 18, 6), 1.5) k.eye((sx * 84, -76, 3), 8, 17, 6) k.box((0, 131, 45), (132, 6, 90), 1.5) prof = [(0, 0), (14, 0), (16, 6), (34, 12, 10), (45, 30, 10), (45, 120), (43.5, 122), (43.5, 125), (45, 127), (45, 180, 0), (45, 190, 14), (0, 192)] k.lathe(prof, (0, 112, 48), '-Y', 40) k.box((0, 96, 90), (22, 24, 10), 2.5) k.cup((0, 74, 88), 'Z', 12, 7, 6, 6) k.box((0, 74, 95), (4, 16, 2), 0.6, mat=DARK, col=False) k.lathe([(0, 0), (14, 0, 2), (14, 4), (13, 5), (14, 6), (13, 7), (14, 8), (13, 9), (14, 10), (14, 22, 3), (0, 22)], (0, -80, 48), '-Y', 24) @item("A06", "MotorGrille", 923, 228) def a06(k): k.box((0, 52, 40), (140, 106, 80), 10) for sx in (-1, 1): for y in (92, 12): k.bolt((sx * 56, y, 80), r=6.5) k.box((86, 40, 40), (32, 44, 44), 4) k.bolt((96, 40, 62), r=5) prof = [(0, 0), (60, 0), (60, 30), (58.5, 32), (58.5, 35), (60, 37), (60, 98, 3), (54, 100)] for i in range(7): # the grille: concentric ribs on the end face r = 50 - i * 5 prof += [(r + 1.5, 100), (r + 1.5, 104, 0.8), (r - 1.5, 104, 0.8), (r - 1.5, 100)] prof += [(14, 100), (14, 108, 2), (0, 108)] k.lathe(prof, (0, 0, 60), '-Y', 48) k.cyl((-75, 118, 62), 'X', 130, 20, 3) for x in (-40, 10): k.bolt((x, 118, 81), r=3.5) k.lathe([(0, 0), (12, 0), (12, 16), (0, 16)], (55, 118, 62), 'X', 6) # hex nut k.cyl((71, 118, 62), 'X', 16, 5.5, 1) @item("A07", "LinearActuatorPlate", 1157, 212) def a07(k): k.box((-15, 8, 5), (430, 72, 10), 2.5, ops=[('+z', -60, 160, -22, -10, -3)]) for x, y in ((-215, 30), (-215, -14), (190, 30), (190, -14)): k.bolt((x, y, 10), r=5.5) k.box((-150, 12, 26), (40, 60, 32), 4) k.lathe([(0, 0), (22, 0, 3), (22, 10), (25, 12, 2), (25, 190, 2), (22, 192), (22, 205, 3), (0, 205)], (-130, 40, 40), 'X', 36) k.box((10, 18, 34), (90, 26, 14), 3) for x in (-5, 25): k.bolt((x, 18, 41), r=4.5) k.box((150, 22, 22), (50, 40, 34), 6) k.cup((165, 28, 38), 'Z', 22, 12, 8, 14) k.cyl((165, 5, 20), '-Y', 50, 10, 2) k.lathe([(0, 0), (12, 0, 2), (12, 50), (11, 50), (11, 62), (0, 62)], (135, -55, 18), 'X', 32) k.lathe([(0, 0), (11, 0), (11, 12), (0, 12)], (197, -55, 18), 'X', 6) k.cyl((209, -55, 18), 'X', 14, 6, 1) k.cup((150, -55, 26), 'Z', 9, 5, 6, 4) @item("A08", "JunctionBox", 1346, 228) def a08(k): k.box((0, 0, 45), (140, 270, 90), 12, ops=[('+z', -56, 56, 92, 124, 3), ('+z', -56, 56, -124, 80, 3), ('+z', -46, 46, 46, 54, 2.5), ('+z', -46, 46, -6, 2, 2.5), ('+z', -46, 46, -112, -104, 2.5)]) for sx in (-1, 1): k.box((sx * 88, 40, 4), (34, 190, 8), 2) k.box((sx * 74, 40, 28), (6, 170, 50), 1.5) for y in (125, -45): k.box((sx * 88, y, 22), (30, 6, 36), 1.5) k.bolt((sx * 96, y + (12 if y > 0 else -12), 8), r=5.5) k.box((sx * 84, 85, 22), (6, 70, 6), 1.5, rot=(0.0, 0.0, 0.0)) @item("A09", "FilterBowlPlate", 1528, 210) def a09(k): k.box((-15, 62, 4), (240, 72, 8), 2) k.box((45, 88, 11), (80, 14, 8), 3) for x, y in ((-125, 88), (-125, 36), (95, 88)): k.bolt((x, y, 8), r=5) k.box((-80, 40, 30), (70, 64, 52), 4) k.box((-40, 32, 26), (24, 48, 44), 3) k.cup((-92, 54, 55), 'Z', 9, 5, 6, 4) k.cup((-68, 54, 55), 'Z', 8, 4, 6, 4) k.cyl((-44, 8, 22), '-Y', 20, 6, 1.5) k.dot((-110, 2, 8), r=3.5) prof = [(0, 0), (54, 0), (57, 2), (57, 7), (59, 8), (59, 13), (55, 15), (57, 17), (57, 21), (55, 23), (56, 60, 0), (56, 92, 26), (0, 112)] k.lathe(prof, (62, 40, 60), '-Y', 48) k.box((62, -50, 112), (26, 6, 4), 1.2, mat=DARK, col=False) k.box((62, -36, 116), (3, 26, 3), 1, col=False) for x in (40, 84): k.dot((x, -46, 104), r=2.5) @item("A10", "SlimValve", 1652, 227) def a10(k): canister(k, (0, 76, 28), 27, 210, top=6, bottom=12, grooves=(28, 46, 60)) k.cyl((-28, 88, 28), 'X', 56, 9, 2) k.cyl((0, 82, 28), 'Y', 24, 11, 2) k.tube([(-12, 104, 28), (-12, 128, 28), (12, 128, 28), (12, 104, 28)], 2.6, rad=5) for sx in (-1, 1): k.box((sx * 30, 2, 28), (8, 30, 14), 2) k.dot((sx * 31, 2, 35.5), r=2) k.dot((0, -112, 50), r=2.5) @item("A11", "CastCanister", 1780, 228) def a11(k): prof = [(0, 0), (52, 0), (58, 10, 8), (58, 158), (62, 160, 1), (62, 188, 4), (0, 190)] k.lathe(prof, (0, 52, 62), '-Y', 48) k.box((0, 82, 52), (112, 70, 64), 14) k.box((0, 110, 54), (60, 30, 56), 8) for sx in (-1, 1): k.box((sx * 52, 62, 40), (22, 30, 36), 5) k.bolt((sx * 52, 62, 58), r=5) k.bolt((0, 85, 84), r=5.5) k.box((0, 130, 56), (46, 18, 22), 3) for x in (-15, -5, 5, 15): k.box((x, 141, 56), (4, 12, 18), 1, col=False) # ============================================================== row B @item("B01", "ClampAdapter", 240, 430) def b01(k): k.box((0, 98, 4), (180, 86, 8), 2) for sx in (-1, 1): k.box((sx * 84, 30, 30), (8, 210, 60), 2) k.bolt((sx * 62, 126, 8), r=6) k.lathe([(0, 0), (38, 0, 30), (45, 34), (45, 140, 4), (0, 141)], (0, 128, 50), '-Y', 40) k.box((0, 110, 92), (12, 32, 3), 1, mat=DARK, col=False) k.box((0, -50, 40), (72, 66, 58), 6) for sx in (-1, 1): for y in (-32, -70): k.bolt((sx * 24, y, 69), r=4.5) k.box((0, -24, 40), (104, 10, 44), 2.5) k.box((0, -78, 40), (104, 10, 44), 2.5) for sx in (-1, 1): k.cyl((sx * 26, -84, 30), '-Y', 54, 9, 2) @item("B02", "SlottedBottle", 386, 432) def b02(k): k.box((0, 124, 6), (72, 22, 12), 2) for sx in (-1, 1): k.bolt((sx * 26, 124, 12), r=5) k.box((0, 104, 28), (22, 36, 30), 4) k.box((0, 104, 46), (6, 26, 10), 2) k.dot((0, 98, 43.5), r=2) prof = [(0, 0), (9, 0), (10, 10), (40, 34, 14), (45, 46), (45, 182), (43, 184), (43, 187), (45, 189), (45, 200, 12), (0, 205)] def slots(c, n): if n.z < 0.2 or not (-25 < c.y < 30): return False return any(abs(c.x - x) < 3.2 for x in (-20, 0, 20)) k.lathe(prof, (0, 88, 46), '-Y', 64, cut=[(slots, -3.0)]) @item("B03", "CylinderRail", 546, 404) def b03(k): k.box((5, 35, 5), (350, 60, 10), 2.5, ops=[('+z', 60, 150, 20, 30, -2.5)]) for x, y in ((-165, 52), (-165, 18), (160, 52)): k.bolt((x, y, 10), r=5.5) k.box((-100, 42, 28), (52, 58, 44), 4) for dx in (-10, 10): for dy in (-10, 10): k.dot((-100 + dx, 42 + dy, 50), r=3) k.lathe([(0, 0), (14, 0, 2), (14, 40), (18, 40), (18, 58), (14, 58), (14, 128, 3), (0, 128)], (-74, 46, 30), 'X', 24) k.box((140, 18, 20), (16, 70, 30), 3, rot=(0, 0, -0.62)) k.box((150, 0, 14), (30, 22, 28), 3) prof = [(0, 0), (22, 0, 2), (22, 8), (27, 10, 2), (27, 30), (25.5, 31), (25.5, 33), (27, 34), (27, 236), (24, 238), (24, 252, 3), (0, 252)] k.lathe(prof, (-128, -36, 30), 'X', 40) k.box((-148, -36, 22), (26, 24, 30), 3) k.cyl((-160, -36, 22), '-X', 16, 6, 1) k.dot((60, -36, 57.5), r=3) @item("B04", "WinchDrum", 729, 410) def b04(k): for sx in (-1, 1): k.box((sx * 50, 0, 40), (8, 116, 80), 2.5) for y in (46, -46): k.bolt((sx * 50, y, 80), r=4.5) k.box((0, -50, 8), (108, 16, 16), 2.5) k.box((0, 50, 8), (108, 16, 16), 2.5) prof = [(0, 0), (30, 0, 3), (32, 4), (32, 20), (30, 22), (30, 34)] for i in range(8): # the drum's winding grooves z = 40 + i * 13 prof += [(29, z), (27.5, z + 2), (29, z + 4)] prof += [(30, 146), (30, 158), (32, 160), (32, 176, 3), (30, 180), (0, 180)] k.lathe(prof, (-90, 0, 45), 'X', 40) for sx in (-1, 1): k.dot((sx * 91, 0, 45), 'X' if sx > 0 else '-X', r=10) @item("B05", "FlangedMotor", 906, 432) def b05(k): k.box((0, 112, 6), (150, 86, 12), 3) k.box((0, 112, 18), (122, 70, 14), 10) for sx in (-1, 1): for y in (142, 82): k.bolt((sx * 64, y, 12), r=6) prof = [(0, 0), (60, 0), (62, 4), (62, 168), (60.5, 170), (60.5, 173), (62, 175), (62, 196, 6), (56, 200), (40, 200), (40, 206, 2), (0, 206)] k.lathe(prof, (0, 92, 64), '-Y', 48) for i in range(6): a = math.radians(30 + 60 * i) k.bolt((44 * math.cos(a), -108, 64 + 44 * math.sin(a)), '-Y', r=5) k.box((-6, 64, 128), (58, 30, 10), 3) k.bolt((14, 64, 133), r=4.5) k.dot((0, 0, 126), r=2.5) @item("B06", "WindowTube", 1029, 432) def b06(k): k.box((0, 126, 6), (90, 22, 12), 2) for sx in (-1, 1): k.bolt((sx * 33, 126, 12), r=5.5) k.box((0, 106, 26), (30, 40, 40), 5) canister(k, (0, 90, 36), 34, 228, top=14, bottom=16, grooves=(18, 30)) k.box((0, -24, 69), (20, 152, 4), 2, ops=[('+z', -6, 6, -72, 72, -2.4)], col=False) for sx in (-1, 1): k.box((sx * 36, -22, 36), (8, 18, 12), 2) @item("B07", "FinnedTube", 1134, 432) def b07(k): prof = [(0, 0), (22, 0, 2), (22, 6), (30, 10, 4), (30, 20), (28.5, 21), (28.5, 24), (30, 25), (30, 250), (28, 252), (28, 262, 8), (0, 266)] k.lathe(prof, (0, 136, 32), '-Y', 48) k.box((0, 138, 32), (6, 26, 4), 1, mat=DARK, col=False) k.box((0, 0, 62), (18, 150, 4), 1.5, ops=[('+z', -5, 5, -68, 68, -2)], col=False) for sx in (-1, 1): for y0 in (55, -55): k.box((sx * 34, y0, 32), (10, 34, 16), 2.5) for dy in (-12, 0, 12): k.box((sx * 44, y0 + dy, 32), (18, 5, 10), 1.5, col=False) @item("B08", "Manifold", 1292, 415) def b08(k): k.box((10, 55, 26), (380, 90, 52), 20) k.cup((-120, 50, 30), 'Z', 32, 21, 46, 30) k.cup((-30, 50, 30), 'Z', 22, 14, 40, 24) k.cup((60, 50, 30), 'Z', 22, 14, 40, 24) for x in (-75, 15, 105): k.box((x, 50, 54), (8, 50, 4), 1.5, col=False) k.box((-125, -25, 30), (72, 90, 58), 18) k.cup((-125, -45, 34), 'Z', 28, 18, 42, 26) k.box((-118, -96, 14), (48, 20, 24), 4, ops=[('-y', -20, -16, -8, 8, -2), ('-y', -12, -8, -8, 8, -2), ('-y', -4, 0, -8, 8, -2), ('-y', 4, 8, -8, 8, -2), ('-y', 12, 16, -8, 8, -2)]) k.cup((-182, 70, 20), 'Z', 12, 6, 38, 10) k.cyl((198, 30, 26), 'X', 10, 9, 1.5) k.box((160, -18, 18), (22, 30, 30), 4) k.cyl((160, -32, 18), '-Y', 16, 8, 1.5) k.bolt((-75, 15, 52), r=4) @item("B09", "TwinCanisterYoke", 1487, 430) def b09(k): k.box((0, 124, 4), (230, 36, 8), 2) for sx in (-1, 1): k.bolt((sx * 98, 128, 8), r=6) k.box((sx * 52, 112, 12), (14, 52, 10), 3, rot=(0, 0, sx * 0.95)) k.lathe([(0, 0), (14, 0, 2), (16, 6, 3), (16, 30), (0, 30)], (sx * 32, 104, 40), '-Y', 28) k.box((sx * 32, 100, 58), (12, 4, 6), 1, mat=DARK, col=False) canister(k, (sx * 32, 76, 40), 38, 196, top=10, bottom=14, grooves=(20, 34, 150, 162)) k.box((0, 100, 12), (84, 16, 10), 3) k.dot((0, 100, 17.5), r=3) @item("B10", "CapsuleTank", 1636, 432) def b10(k): prof = [(0, 0), (46, 0, 44), (46, 226), (44, 228), (44, 262, 6), (0, 264)] k.lathe(prof, (0, 132, 48), '-Y', 48) k.box((0, 18, 95), (60, 128, 8), 3) for sx in (-1, 1): for y in (68, -36): k.bolt((sx * 20, y, 99), r=4) k.box((sx * 64, 40, 30), (40, 34, 12), 4) k.bolt((sx * 72, 40, 36), r=6) k.box((0, -122, 86), (14, 22, 10), 2, mat=DARK, col=False) @item("B11", "KnurledCanister", 1765, 430) def b11(k): k.box((0, -60, 5), (172, 150, 10), 6, ops=[('+z', -12, 12, -135, -122, -4)]) for sx in (-1, 1): for y in (-5, -115): k.bolt((sx * 72, y, 10), r=7) k.box((0, -60, 16), (128, 110, 14), 24) prof = [(0, 0), (56, 0), (56, 172), (60, 174, 2), (60, 214, 6), (50, 220), (0, 220)] k.lathe(prof, (0, -100, 62), 'Y', 48) for i in range(20): a = 2 * math.pi * i / 20 k.box((62 * math.cos(a), 98, 62 + 62 * math.sin(a)), (6, 34, 5), 1.5, rot=(0, -a, 0), col=False) # ============================================================== row C @item("C01", "VentHousing", 243, 705) def c01(k): ops = [('+z', -38, 38, 150, 215, 4), ('+z', -26, 26, 160, 180, 2), ('+z', -56, 56, 136, 140, -2)] for i in range(8): y = 118 - i * 18 ops.append(('+z', -34, 34, y - 4, y + 4, -12)) k.box((0, 0, 35), (140, 450, 70), 18, ops=ops) for sx in (-1, 1): k.tube([(sx * 70, 186, 26), (sx * 92, 172, 26), (sx * 92, -120, 26), (sx * 70, -134, 26)], 3.6, rad=12) k.box((sx * 70, 186, 26), (10, 14, 14), 2, col=False) k.box((sx * 70, -134, 26), (10, 14, 14), 2, col=False) k.box((sx * 72, -216, 12), (14, 24, 20), 3) k.box((0, -230, 8), (152, 26, 16), 3) @item("C02", "TroughHousing", 377, 705) def c02(k): ops = [('+z', -22, 22, -60, 236, -18), ('+z', -26, 26, -114, -108, -6), ('+z', -60, 60, -222, -218, -2), ('+z', -60, 60, -206, -202, -2)] k.box((0, 0, 35), (124, 482, 70), 14, ops=ops) for sx in (-1, 1): for y0 in (140, 40): k.box((sx * 52, y0, 70), (7, 90, 6), 2, col=False) k.box((sx * 52, y0 - 46, 70), (7, 4, 8), 1.5, col=False) @item("C03", "DuctBend", 575, 705) def c03(k): outline = [(-58, 240, 10), (58, 240, 10), (58, -20, 14), (78, -40, 12), (78, -246, 4), (42, -246, 4), (42, -190, 10), (-58, -190, 100)] k.slab(outline, 0, 70, 10) k.box((-2, 120, 72), (60, 96, 6), 3) k.box((0, 228, 72), (110, 22, 4), 2) for sx in (-1, 1): k.box((sx * 72, 202, 12), (26, 16, 24), 2) k.dot((sx * 78, 202, 24), r=3) for x, y in ((-45, 40), (45, 40), (-45, 200), (45, 200), (-45, 130), (45, 130)): k.dot((x, y, 70), r=2.2) k.box((60, -30, 70.5), (30, 3, 1.5), 0.5, col=False) @item("C04", "PanelEnclosure", 773, 705) def c04(k): ops = [('+z', -56, 56, 190, 196, -3), ('+z', -36, 44, -150, 150, 3), ('+z', -30, 38, -144, 144, 0.8)] k.box((0, 10, 35), (132, 440, 70), 10, ops=ops) for x, y in ((-48, 180), (48, 180), (-50, 60), (50, 60), (-50, -60), (50, -60), (-50, 150), (50, 150)): k.dot((x, y, 70), r=2.2) k.box((0, -208, 30), (96, 24, 52), 4) k.box((0, -226, 6), (194, 20, 12), 2) for sx in (-1, 1): k.box((sx * 80, -212, 22), (20, 28, 32), 3) k.box((sx * 80, -212, 22), (24, 14, 24), 2, col=False) @item("C05", "TwinNeckHousing", 957, 705) def c05(k): ops = [('+z', -66, 66, y - 3, y + 3, -4) for y in range(-20, -130, -14)] k.box((0, -128, 46), (152, 220, 92), 34, ops=ops) k.box((0, -240, 6), (160, 14, 12), 3) prof = [(0, 0), (26, 0), (26, 70, 30), (18, 104), (18, 176), (21, 178, 1), (21, 196, 2), (16, 198), (16, 214, 3), (0, 216)] for sx in (-1, 1): k.lathe(prof, (sx * 32, -40, 46), 'Y', 40) for y in (152, 184): k.lathe([(0, 0), (20, 0, 1), (20, 4, 1), (0, 4)], (sx * 32, y, 46), 'Y', 32, col=False) k.box((0, 100, 46), (110, 12, 30), 3) def piston(k, top_eye, barrel, rod_r, rod_top, bot_eye, axis_z=26.0, extra=None, rod_extra=None): """a hydraulic cylinder along Y: barrel + top eye in the item, the rod + bottom eye as its own moving part (origin at the gland, slides along +Y into the barrel). rod_top: y where the rod leaves the barrel (the gland). The stroke is what the rod can retract before its highest outside part comes within 12 mm of the gland; the rod runs on inside the barrel by stroke + 10 mm, so it never shows its end.""" ty, ri, ro, t = top_eye k.eye((0, ty, axis_z), ri, ro, t) barrel(k) if extra: extra(k) by, bri, bro, bt = bot_eye rod = k.child("Rod", (0, rod_top, axis_z), (0, 1, 0)) rod.eye((0, by, axis_z), bri, bro, bt) if rod_extra: rod_extra(rod) ymax = max(v.co.y for v in rod.bm.verts) stroke = round(rod_top - ymax - 12.0, 1) rod.cyl((0, rod_top + stroke + 10, axis_z), '-Y', rod_top + stroke + 10 - by, rod_r, 1.5) k.children[-1][3] = stroke rod.props["stroke_mm"] = stroke return rod @item("C06", "HydraulicCylinder_Flat", 1152, 705) def c06(k): def barrel(k): k.cyl((0, 220, 26), '-Y', 12, 13, 2) k.lathe([(0, 0), (22, 0, 2), (22, 16, 2), (0, 16)], (0, 210, 26), '-Y', 32) k.box((0, 84, 26), (58, 250, 46), 14, ops=[('+z', -20, 20, -100, 100, 2)]) k.box((0, 186, 26), (64, 6, 50), 2) k.lathe([(0, 0), (26, 0, 2), (26, 18), (22, 20), (22, 40, 2), (0, 40)], (0, -40, 26), '-Y', 32) for sx in (-1, 1): k.dot((sx * 14, -36, 49), r=2) piston(k, (232, 9, 17, 22), barrel, 16, -80, (-222, 13, 24, 40), rod_extra=lambda r: r.cyl((0, -170, 26), '-Y', 16, 20, 2)) @item("C07", "HydraulicCylinder_Hose", 1285, 705) def c07(k): def barrel(k): k.cyl((0, 220, 25), '-Y', 12, 12, 2) k.box((0, 204, 25), (46, 16, 32), 3) k.bolt((0, 204, 41), r=4) prof = [(0, 0), (20, 0, 2), (20, 60), (22, 62), (22, 70), (20, 72), (20, 246), (24, 248, 1), (24, 262, 2), (0, 264)] k.lathe(prof, (0, 196, 25), '-Y', 32) k.lathe([(0, 0), (17, 0), (17, 20, 2), (0, 20)], (0, -68, 25), '-Y', 32) def hose(k): k.tube([(14, 196, 40), (22, 170, 45), (30, 110, 45), (28, 40, 44), (18, -30, 40), (12, -50, 36)], 3, rad=30) for y in (196, -50): k.box((13, y, 38), (10, 8, 10), 2, col=False) def rx(r): r.lathe([(0, 0), (16, 0, 2), (16, 22, 2), (0, 22)], (0, -150, 25), '-Y', 32) r.box((0, -212, 25), (36, 20, 14), 3) piston(k, (234, 10, 18, 22), barrel, 12, -88, (-222, 9, 19, 14), axis_z=25, extra=hose, rod_extra=rx) @item("C08", "HydraulicCylinder_Plate", 1407, 705) def c08(k): def barrel(k): k.cyl((0, 228, 24), '-Y', 12, 9, 2) prof = [(0, 0), (22, 0, 2), (26, 4), (26, 16), (24, 18), (24, 230), (26, 232), (26, 246, 2), (22, 250), (0, 250)] k.lathe(prof, (0, 216, 24), '-Y', 32) k.box((0, 150, 48), (28, 42, 6), 2) for sx in (-1, 1): for y in (138, 162): k.bolt((sx * 9, y, 51), r=2.6) k.lathe([(0, 0), (20, 0, 1), (20, 14), (16, 16), (16, 40, 2), (0, 40)], (0, -34, 24), '-Y', 32) def rx(r): r.lathe([(0, 0), (14, 0, 1.5), (14, 22, 1.5), (0, 22)], (0, -196, 24), '-Y', 24) r.dot((0, -207, 38), r=3) piston(k, (240, 7, 13, 18), barrel, 10, -74, (-230, 8, 15, 18), axis_z=24, rod_extra=rx) @item("C09", "HydraulicCylinder_Slim", 1528, 705) def c09(k): def barrel(k): k.cyl((0, 214, 22), '-Y', 22, 13, 2) k.box((0, 178, 22), (40, 16, 30), 3) k.box((0, -96, 22), (40, 16, 30), 3) prof = [(0, 0), (16, 0, 2), (16, 300, 2), (0, 300)] k.lathe(prof, (0, 192, 22), '-Y', 32) k.lathe([(0, 0), (14, 0, 1), (14, 22, 2), (0, 22)], (0, -108, 22), '-Y', 32) piston(k, (226, 12, 20, 26), barrel, 8, -130, (-230, 8, 14, 16), axis_z=22, rod_extra=lambda r: r.box((0, -196, 22), (22, 8, 20), 2)) @item("C10", "HydraulicCylinder_Heavy", 1658, 705) def c10(k): def barrel(k): k.cyl((0, 200, 30), '-Y', 16, 20, 2) prof = [(0, 0), (28, 0, 4), (30, 6), (30, 36), (31.5, 37), (31.5, 41), (30, 42), (30, 252, 4), (26, 256), (0, 256)] k.lathe(prof, (0, 186, 30), '-Y', 40) k.lathe([(0, 0), (24, 0, 1), (24, 12), (20, 14), (20, 34, 2), (0, 34)], (0, -68, 30), '-Y', 32) k.dot((-20, -60, 55), r=2.5) k.dot((20, -60, 55), r=2.5) piston(k, (220, 18, 32, 44), barrel, 12, -102, (-222, 14, 24, 34), axis_z=30) @item("C11", "HydraulicCylinder_Guided", 1790, 705) def c11(k): def barrel(k): k.cyl((0, 226, 22), '-Y', 16, 10, 2) k.box((0, 204, 22), (48, 12, 46), 3) k.box((0, -138, 22), (48, 12, 46), 3) for sx in (-1, 1): k.dot((sx * 16, -138, 45), r=2.2) k.cyl((sx * 17, 198, 30), '-Y', 330, 3.5, 1, segs=12) k.lathe([(0, 0), (14, 0, 2), (14, 334, 2), (0, 334)], (0, 200, 22), '-Y', 32) k.lathe([(0, 0), (11, 0, 1), (11, 16, 1), (0, 16)], (0, -144, 22), '-Y', 24) piston(k, (236, 9, 16, 22), barrel, 9, -160, (-226, 12, 21, 30), axis_z=22)