# No. 65 (Brown 1868): intermittent rotary motion by a tappet and studs, with a stop.
#
# As drawn (cm; the drawing plane is x-z, depth y, the tappet and studs in front): C at the left (the one
# motor-driven shaft) turns clockwise, carrying the tappet A on its face and a notch in its rim; D at the
# right has 12 studs on its face. Once a turn A strikes a stud and moves D the distance of one stud.
# A stop lever on a fixed centre below the wheels has its right end between two studs and its left end
# held up against C's rim, so D cannot be turned. As A strikes a stud the notch faces the lever: the stud
# passing thrusts the right end out and the left end enters the notch; as C turns on, the notch's edge
# forces the left end down again and the right end up in front of the next stud, where C's rim holds it.
# Generator: opencode-runs/batch8/gen065.py.
number: 65
slug: tappet-stud-wheel-stop
name: Intermittent motion by a tappet, studs and a stop
brown: "The left-hand disk or wheel, C, is the driving-wheel, upon which is fixed the tappet, A. The other disk or wheel, D, has a series of equidistant studs projecting from its face. Every rotation of the tappet acting upon one of the studs in the wheel, D, causes the latter wheel to move the distance of one stud. In order that this may not be exceeded, a lever-like stop is arranged on a fixed center. This stop operates in a notch cut in wheel, C, and at the instant tappet, A, strikes a stud, said notch faces the lever. As wheel, D, rotates, the end between studs is thrust out, and the other extremity enters the notch; but immediately on the tappet leaving stud, the lever is again forced up in front of next stud, and is there held by periphery of C pressing on its other end."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  multiccd: false
  duration_s: 22
  floor: false
bodies:
  - id: wheel_c
    shape: part
    pos: [-6.0, 0, 0]
    friction: 0.1
    color: "#e8dec6"
    pieces:
      - {kind: disc, center: [-6.0, 0], radius: 4.2, y: [-1.6, 0.6]}   # C, inside its rim
      # its rim and notch
      - {kind: poly, points: [[-3.1679, -3.1015], [-2.6487, -3.6701], [-2.59, -3.6568], [-2.5575, -3.6237], [-2.5278, -3.5877], [-2.501, -3.549], [-2.477, -3.5077], [-2.4748, -3.4371], [-2.9928, -2.932]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-3.0549, -2.9944], [-2.5253, -3.5328], [-2.477, -3.5077], [-2.4559, -3.4639], [-2.4376, -3.4178], [-2.422, -3.3695], [-2.409, -3.3194], [-2.4197, -3.2407], [-2.8862, -2.8185]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.9459, -2.8831], [-2.4457, -3.3553], [-2.409, -3.3194], [-2.3986, -3.2677], [-2.3905, -3.2145], [-2.3847, -3.1601], [-2.3808, -3.1048], [-2.4015, -3.0222], [-2.7838, -2.7011]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.8411, -2.7679], [-2.4079, -3.1474], [-2.3808, -3.1048], [-2.3786, -3.0488], [-2.378, -2.9923], [-2.3787, -2.9357], [-2.3804, -2.8791], [-2.4069, -2.7972], [-2.6858, -2.58]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.7406, -2.6488], [-2.4019, -2.9241], [-2.3804, -2.8791], [-2.3829, -2.8228], [-2.3858, -2.767], [-2.3888, -2.712], [-2.3917, -2.6578], [-2.4188, -2.5805], [-2.5925, -2.4553]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.6446, -2.5262], [-2.4124, -2.701], [-2.3917, -2.6578], [-2.3942, -2.6048], [-2.396, -2.553], [-2.3967, -2.5026], [-2.3962, -2.4537], [-2.4188, -2.3839], [-2.5038, -2.3273]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.5533, -2.4], [-2.4213, -2.4919], [-2.3962, -2.4537], [-2.3942, -2.4065], [-2.3904, -2.361], [-2.3845, -2.3172], [-2.3765, -2.2752], [-2.3902, -2.2142], [-2.4199, -2.1961]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.4666, -2.2706], [-2.4107, -2.3065], [-2.3765, -2.2752], [-2.3662, -2.235], [-2.3533, -2.1966], [-2.3377, -2.16], [-2.3194, -2.125], [-2.3215, -2.0727], [-2.3409, -2.0618]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.3849, -2.138], [-2.3657, -2.1493], [-2.3194, -2.125], [-2.2983, -2.0917], [-2.2743, -2.0599], [-2.2475, -2.0295], [-2.2179, -2.0004], [-2.2078, -1.9552], [-2.267, -1.9247]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.3081, -2.0025], [-2.2775, -2.019], [-2.2179, -2.0004], [-2.1855, -1.9725], [-2.1505, -1.9456], [-2.113, -1.9195], [-2.0731, -1.8941], [-2.0526, -1.8533], [-2.1982, -1.785]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.2364, -1.8642], [-2.1449, -1.9095], [-2.0731, -1.8941], [-2.031, -1.8692], [-1.987, -1.8447], [-1.9413, -1.8203], [-1.8941, -1.796], [-1.867, -1.7565], [-2.1346, -1.6428]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.1698, -1.7233], [-1.9747, -1.8112], [-1.8941, -1.796], [-1.8458, -1.7714], [-1.7965, -1.7465], [-1.7468, -1.7211], [-1.6968, -1.6951], [-1.6686, -1.654], [-2.0763, -1.4983]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.1086, -1.5801], [-1.781, -1.7131], [-1.6968, -1.6951], [-1.647, -1.6683], [-1.5976, -1.6405], [-1.549, -1.6118], [-1.5015, -1.5819], [-1.4782, -1.5372], [-2.0235, -1.3518]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.0527, -1.4348], [-1.5834, -1.6053], [-1.5015, -1.5819], [-1.4556, -1.5509], [-1.4114, -1.5186], [-1.3694, -1.485], [-1.3298, -1.4501], [-1.3171, -1.4005], [-1.9761, -1.2034]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.0022, -1.2874], [-1.4033, -1.4803], [-1.3298, -1.4501], [-1.2929, -1.4139], [-1.2589, -1.3763], [-1.2281, -1.3374], [-1.2008, -1.2972], [-1.2032, -1.2428], [-1.9342, -1.0534]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-1.9572, -1.1383], [-1.2608, -1.3344], [-1.2008, -1.2972], [-1.1769, -1.2558], [-1.1568, -1.2132], [-1.1405, -1.1695], [-1.1281, -1.1248], [-1.1459, -1.0672], [-1.898, -0.9019]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-1.9178, -0.9876], [-1.1716, -1.1681], [-1.1281, -1.1248], [-1.0912, -0.9508], [-1.0605, -0.7757], [-1.0361, -0.5996], [-1.0179, -0.4227], [-1.0437, -0.3683], [-1.8115, -0.3113]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-1.819, -0.3989], [-1.0525, -0.472], [-1.0179, -0.4227], [-1.006, -0.2453], [-1.0005, -0.0676], [-1.0012, 0.1102], [-1.0083, 0.2878], [-1.0415, 0.338], [-1.8097, 0.2857]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-1.8047, 0.1978], [-1.0355, 0.2341], [-1.0083, 0.2878], [-1.0217, 0.4651], [-1.0414, 0.6418], [-1.0673, 0.8177], [-1.0995, 0.9926], [-1.1395, 1.0376], [-1.8925, 0.8768]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-1.8751, 0.7906], [-1.1188, 0.9355], [-1.0995, 0.9926], [-1.1379, 1.1662], [-1.1824, 1.3383], [-1.2331, 1.5087], [-1.2897, 1.6773], [-1.3357, 1.7161], [-2.0583, 1.4503]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.0288, 1.3674], [-1.3008, 1.6181], [-1.2897, 1.6773], [-1.3523, 1.8437], [-1.4208, 2.0077], [-1.4951, 2.1693], [-1.5751, 2.3281], [-1.6261, 2.36], [-2.3037, 1.9944]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.2628, 1.9166], [-1.5776, 2.2679], [-1.5751, 2.3281], [-1.6606, 2.4839], [-1.7517, 2.6366], [-1.8481, 2.786], [-1.9498, 2.9319], [-2.0048, 2.9563], [-2.6238, 2.4983]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.5722, 2.427], [-1.9438, 2.872], [-1.9498, 2.9319], [-2.0566, 3.074], [-2.1684, 3.2123], [-2.285, 3.3465], [-2.4063, 3.4764], [-2.4643, 3.4928], [-3.0121, 2.9517]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-2.9509, 2.8884], [-2.3919, 3.418], [-2.4063, 3.4764], [-2.5322, 3.602], [-2.6625, 3.723], [-2.7969, 3.8393], [-2.9355, 3.9508], [-2.9951, 3.9588], [-3.4607, 3.3454]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-3.3912, 3.2915], [-2.9129, 3.895], [-2.9355, 3.9508], [-3.0779, 4.0572], [-3.224, 4.1586], [-3.3736, 4.2546], [-3.5265, 4.3453], [-3.5867, 4.3448], [-3.9606, 3.6716]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-3.8841, 3.6281], [-3.4962, 4.2933], [-3.5265, 4.3453], [-3.6826, 4.4305], [-3.8415, 4.5101], [-4.0033, 4.584], [-4.1675, 4.6521], [-4.227, 4.643], [-4.5017, 3.9237]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-4.4199, 3.8914], [-4.1302, 4.6048], [-4.1675, 4.6521], [-4.3341, 4.7143], [-4.5027, 4.7705], [-4.6733, 4.8208], [-4.8455, 4.8649], [-4.9031, 4.8475], [-5.0731, 4.0964]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-4.9875, 4.0761], [-4.8019, 4.8234], [-4.8455, 4.8649], [-5.0192, 4.9029], [-5.1941, 4.9346], [-5.3701, 4.9602], [-5.5468, 4.9794], [-5.6014, 4.954], [-5.6632, 4.1865]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-5.5756, 4.1785], [-5.4978, 4.9446], [-5.5468, 4.9794], [-5.7242, 4.9924], [-5.9018, 4.999], [-6.0796, 4.9994], [-6.2573, 4.9934], [-6.3077, 4.9605], [-6.2601, 4.1919]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-6.1722, 4.1965], [-6.2038, 4.9658], [-6.2573, 4.9934], [-6.4347, 4.9811], [-6.6115, 4.9625], [-6.7876, 4.9376], [-6.9626, 4.9065], [-7.0079, 4.8667], [-6.8517, 4.1127]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-6.7654, 4.1297], [-6.9057, 4.8868], [-6.9626, 4.9065], [-7.1364, 4.8691], [-7.3088, 4.8257], [-7.4796, 4.7761], [-7.6485, 4.7204], [-7.6876, 4.6747], [-7.4261, 3.9505]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-7.3431, 3.9795], [-7.5893, 4.709], [-7.6485, 4.7204], [-7.8152, 4.6589], [-7.9797, 4.5914], [-8.1417, 4.5181], [-8.301, 4.4391], [-8.3333, 4.3882], [-7.9718, 3.7084]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-7.8937, 3.7489], [-8.2409, 4.4362], [-8.301, 4.4391], [-8.4574, 4.3545], [-8.6106, 4.2643], [-8.7606, 4.1688], [-8.9071, 4.068], [-8.9318, 4.0132], [-8.4776, 3.3914]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-8.406, 3.4425], [-8.8471, 4.0737], [-8.9071, 4.068], [-9.0499, 3.9621], [-9.1888, 3.8512], [-9.3237, 3.7354], [-9.4544, 3.6148], [-9.4711, 3.557], [-8.9333, 3.0059]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-8.8697, 3.0667], [-9.3959, 3.6289], [-9.4544, 3.6148], [-9.5807, 3.4897], [-9.7026, 3.3602], [-9.8197, 3.2265], [-9.932, 3.0886], [-9.9403, 3.029], [-9.3299, 2.5597]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.2755, 2.6289], [-9.876, 3.1108], [-9.932, 3.0886], [-10.0393, 2.9469], [-10.1415, 2.8014], [-10.2385, 2.6524], [-10.3301, 2.5], [-10.3299, 2.4398], [-9.6591, 2.0618]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.6151, 2.138], [-10.2779, 2.5299], [-10.3301, 2.5], [-10.4163, 2.3445], [-10.4968, 2.186], [-10.5717, 2.0247], [-10.6408, 1.8609], [-10.6321, 1.8013], [-9.9144, 1.5222]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.8817, 1.6039], [-10.5933, 1.8979], [-10.6408, 1.8609], [-10.704, 1.6947], [-10.7613, 1.5264], [-10.8126, 1.3562], [-10.8577, 1.1842], [-10.8407, 1.1265], [-10.0907, 0.9519]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-10.0699, 1.0374], [-10.816, 1.2276], [-10.8577, 1.1842], [-10.8968, 1.0107], [-10.9296, 0.836], [-10.9562, 0.6602], [-10.9766, 0.4836], [-10.9515, 0.4288], [-10.1843, 0.3624]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-10.1758, 0.45], [-10.9414, 0.5324], [-10.9766, 0.4836], [-10.9906, 0.3063], [-10.9983, 0.1287], [-10.9998, -0.0491], [-10.9949, -0.2268], [-10.9623, -0.2774], [-10.1935, -0.2345]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-10.1974, -0.1466], [-10.967, -0.1735], [-10.9949, -0.2268], [-10.9836, -0.4043], [-10.9661, -0.5812], [-10.9423, -0.7574], [-10.9123, -0.9326], [-10.8728, -0.9781], [-10.1179, -0.8266]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-10.1343, -0.7401], [-10.8922, -0.8758], [-10.9123, -0.9326], [-10.876, -1.1067], [-10.8336, -1.2793], [-10.785, -1.4504], [-10.7304, -1.6196], [-10.6849, -1.659], [-9.9591, -1.402]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.9876, -1.3188], [-10.7186, -1.5605], [-10.7304, -1.6196], [-10.6699, -1.7867], [-10.6034, -1.9516], [-10.5311, -2.1141], [-10.4531, -2.2738], [-10.4024, -2.3064], [-9.7204, -1.9491]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.7604, -1.8707], [-10.4498, -2.2137], [-10.4531, -2.2738], [-10.3694, -2.4307], [-10.2802, -2.5845], [-10.1856, -2.7351], [-10.0857, -2.8822], [-10.031, -2.9072], [-9.4065, -2.4568]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.4572, -2.3849], [-10.091, -2.8222], [-10.0857, -2.8822], [-9.9807, -3.0256], [-9.8706, -3.1652], [-9.7556, -3.3008], [-9.6359, -3.4323], [-9.5781, -3.4493], [-9.0238, -2.9149]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-9.0842, -2.851], [-9.6496, -3.3736], [-9.6359, -3.4323], [-9.5115, -3.5594], [-9.3828, -3.682], [-9.2497, -3.7999], [-9.1126, -3.913], [-9.053, -3.9217], [-8.58, -3.3142]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-8.6488, -3.2594], [-9.1345, -3.857], [-9.1126, -3.913], [-8.9715, -4.0212], [-8.8266, -4.1243], [-8.6782, -4.2222], [-8.5264, -4.3148], [-8.4662, -4.3149], [-8.0841, -3.6464]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-8.16, -3.602], [-8.556, -4.2624], [-8.5264, -4.3148], [-8.3714, -4.4019], [-8.2134, -4.4834], [-8.0526, -4.5593], [-7.8892, -4.6294], [-7.8296, -4.621], [-7.5461, -3.9051]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-7.6276, -3.8718], [-7.926, -4.5817], [-7.8892, -4.6294], [-7.7234, -4.6936], [-7.5555, -4.7519], [-7.3855, -4.8042], [-7.2138, -4.8504], [-7.156, -4.8337], [-6.9769, -4.0848]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-7.0622, -4.0635], [-7.257, -4.8084], [-7.2138, -4.8504], [-7.0406, -4.8905], [-6.8661, -4.9244], [-6.6905, -4.9521], [-6.514, -4.9735], [-6.4591, -4.9488], [-6.388, -4.182]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-6.4755, -4.173], [-6.5626, -4.9381], [-6.514, -4.9735], [-6.3368, -4.9886], [-6.1592, -4.9975], [-5.9815, -5.0], [-5.8037, -4.9961], [-5.7529, -4.9639], [-5.7912, -4.1948]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-5.8791, -4.1983], [-5.8569, -4.9679], [-5.8037, -4.9961], [-5.6262, -4.986], [-5.4492, -4.9696], [-5.2728, -4.9468], [-5.0974, -4.9179], [-5.0517, -4.8787], [-5.1986, -4.1228]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-5.2851, -4.1387], [-5.1541, -4.8975], [-5.0974, -4.9179], [-4.9231, -4.8827], [-4.7502, -4.8413], [-4.5789, -4.7938], [-4.4093, -4.7402], [-4.3696, -4.695], [-4.6222, -3.9676]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-4.7056, -3.9956], [-4.4683, -4.7281], [-4.4093, -4.7402], [-4.2418, -4.6807], [-4.0765, -4.6152], [-3.9136, -4.5439], [-3.7534, -4.4669], [-3.7205, -4.4164], [-4.0737, -3.7322]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-4.1523, -3.7717], [-3.8135, -4.4632], [-3.7534, -4.4669], [-3.596, -4.3842], [-3.4417, -4.2959], [-3.2905, -4.2022], [-3.1429, -4.1033], [-3.1174, -4.0487], [-3.564, -3.4214]], y: [-1.6, 0.6], collide: 2}
      - {kind: poly, points: [[-3.6362, -3.4717], [-3.2029, -4.1082], [-3.1429, -4.1033], [-2.9988, -3.9991], [-2.8585, -3.8898], [-2.7222, -3.7757], [-2.59, -3.6568], [-2.5742, -3.5975], [-3.1036, -3.0415]], y: [-1.6, 0.6], collide: 2}
      - {kind: rod, from: [-6.0, -2.1, 0], to: [-2.05, -2.1, 6.8416], radius: 0.3, capsule: true, collide: 2, color: "#6b5a44"}   # the tappet A
      - {kind: disc, center: [-6.0, 0], radius: 1.0, y: [-2.5, -1.6], color: "#8f8a80"}   # its boss
  - id: wheel_d
    shape: part
    pos: [6.0, 0, 0]
    friction: 0.1
    color: "#e4d9bf"
    pieces:
      - {kind: disc, center: [6.0, 0], radius: 5.0, y: [0.0, 0.6]}   # D
      - {kind: disc, center: [6.0, 0], radius: 0.9, y: [-1.0, 0.0], color: "#8f8a80"}
      - {kind: rod, from: [9.5513, -2.6, 1.8408], to: [9.5513, 0.0, 1.8408], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [8.1551, -2.6, 3.3698], to: [8.1551, 0.0, 3.3698], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [6.1815, -2.6, 3.9959], to: [6.1815, 0.0, 3.9959], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [4.1592, -2.6, 3.5513], to: [4.1592, 0.0, 3.5513], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [2.6302, -2.6, 2.1551], to: [2.6302, 0.0, 2.1551], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [2.0041, -2.6, 0.1815], to: [2.0041, 0.0, 0.1815], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [2.4487, -2.6, -1.8408], to: [2.4487, 0.0, -1.8408], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [3.8449, -2.6, -3.3698], to: [3.8449, 0.0, -3.3698], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [5.8185, -2.6, -3.9959], to: [5.8185, 0.0, -3.9959], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [7.8408, -2.6, -3.5513], to: [7.8408, 0.0, -3.5513], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [9.3698, -2.6, -2.1551], to: [9.3698, 0.0, -2.1551], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [9.9959, -2.6, -0.1815], to: [9.9959, 0.0, -0.1815], radius: 0.4, capsule: true, collide: 1, color: "#6b5a44"}
  - id: stop
    shape: part
    pos: [0.4778, 0, -4.8731]
    friction: 0.1
    mass: 0.05
    color: "#cfc4ad"
    pieces:
      - {kind: rod, from: [-6.0, -1.0, -5.6], to: [6.9556, -1.0, -4.6462], radius: 0.3}   # the stop lever
      - {kind: rod, from: [-6.0, -1.4, -5.4], to: [-6.0, -0.6, -5.4], radius: 0.4, capsule: true, collide: 1}   # its left end, on C's rim
      - {kind: rod, from: [6.9556, -1.4, -4.3462], to: [6.9556, -0.6, -4.3462], radius: 0.55, capsule: true, collide: 2}   # its right end, between the studs
  - id: frame
    shape: frame
    color: "#8f8a80"
    rods:
      - {from: [-6.0, 0.6, 0], to: [-6.0, 2.0, 0], radius: 0.6}
      - {from: [6.0, 0.6, 0], to: [6.0, 2.0, 0], radius: 0.6}
      - {from: [0.4778, -1.6, -4.8731], to: [0.4778, 1.0, -4.8731], radius: 0.4}   # the stop's fixed centre
joints:
  - {id: j_c, type: hinge, body: wheel_c, axis: [0, 1, 0], damping: 0.05}
  - {id: j_d, type: hinge, body: wheel_d, axis: [0, 1, 0], damping: 0.002}
  - {id: j_stop, type: hinge, body: stop, axis: [0, 1, 0], damping: 0.002, stiffness: 0.3, springref: 0.15, range: [-0.05, 0.11]}   # a light spring: its left end up against C
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_c, kind: velocity, rpm: 12, kv: 20, max_torque: 20}
checks:
  - {type: ratio, out: j_d, in: j_c, expect: -0.08333, tol: 0.006, settle_s: 2.0, window_s: 20.0}   # one stud a turn
  - {type: still, joint: j_d, max: 0.05, settle_s: 2.5, window_s: 2.5}   # held by the stop between strokes
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [0, 0, -1], position: [0, -60, 6], fov: 34}
display:
  output: j_d
  labels: {j_c: "C with tappet A (driver)", j_d: "D, the stud wheel", j_stop: "Stop lever"}
  proof: {label: "Stop out of contact", sub: "nothing holds D between strokes"}

