Fix backward-bending joints in the five legacy motions

Abdominal's pinned hands used elbow -40 as the IK plane hint, drawing
the arms hyperextended (user-reported). Flipping the hint bends the
elbows the natural way while the hands stay on the handles. Same class
of fix for the milder cases: Arm Curl and Shoulder Press elbows and
Calfs knees clamp to -8, Side Plank's raised arm to the -70 ROM cap.
The whole library now passes render.py --strict with zero warnings,
making it a valid verification gate. Fixtures regenerated; 48 tests
green.

Claude-Session: https://claude.ai/code/session_01HJDQQDA9QdP8zByg43H5v3
This commit is contained in:
2026-07-07 13:06:18 -04:00
parent 7c241ec44c
commit bb234c198f
22 changed files with 172 additions and 53 deletions
+4 -4
View File
@@ -18,8 +18,8 @@
"root": {"pos": [128, 126], "pitch": -4},
"spine": [0, 4],
"neck": 8,
"shoulder_r": 78, "elbow_r": -40,
"shoulder_l": 78, "elbow_l": -40,
"shoulder_r": 78, "elbow_r": 40,
"shoulder_l": 78, "elbow_l": 40,
"hip_r": 66, "knee_r": 70,
"hip_l": 66, "knee_l": 70,
"pins": {"hand_r": [155, 62], "hand_l": [161, 64], "foot_r": [168, 150], "foot_l": [172, 150]}
@@ -29,8 +29,8 @@
"root": {"pos": [128, 126], "pitch": 10},
"spine": [0, 40],
"neck": 18, "head": -26,
"shoulder_r": 128, "elbow_r": -40,
"shoulder_l": 128, "elbow_l": -40,
"shoulder_r": 128, "elbow_r": 40,
"shoulder_l": 128, "elbow_l": 40,
"hip_r": 80, "knee_r": 70,
"hip_l": 80, "knee_l": 70,
"pins": {"hand_r": [190, 76], "hand_l": [196, 78], "foot_r": [168, 150], "foot_l": [172, 150]}
+3 -3
View File
@@ -5,13 +5,13 @@
<path d="M 136.0 52.0 L 164.0 70.0 L 164.0 70.0 L 136.0 52.0 Z" fill="#c5cad4" stroke="#c5cad4" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 164.0 70.0 L 164.0 128.0" stroke="#c5cad4" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_l" d="M 135.9 124.8 L 179.4 110.0 L 180.0 149.4 L 191.0 149.2" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 140.3 40.5 L 164.9 57.4 L 180.8 82.5" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 140.3 40.5 L 164.9 57.4 L 186.9 77.6" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="girdle" d="M 140.3 40.5 L 134.4 40.4 L 134.4 42.3" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="pelvisBar" d="M 135.9 124.8 L 130.0 124.0 L 130.0 125.2" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="spine" d="M 130.0 124.0 Q 130.8 81.1 134.4 40.4" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_r" d="M 130.0 125.2 L 173.8 111.5 L 176.0 150.8 L 187.0 150.2" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 134.4 42.3 L 159.0 59.3 L 174.9 84.3" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 177.9 89.4 L 177.9 77.4" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 134.4 42.3 L 159.0 59.3 L 180.9 79.4" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 183.9 84.5 L 183.9 72.5" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<circle id="head" cx="137.2" cy="20.9" r="10" fill="white" stroke="#3a3f4b" stroke-width="6"/>
<line id="nose" x1="146.7" y1="24.0" x2="153.4" y2="26.1" stroke="#3a3f4b" stroke-width="4" stroke-linecap="round"/>
<g font-family="-apple-system, Helvetica, sans-serif" font-size="11" fill="#6b7180">

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

+2 -2
View File
@@ -16,8 +16,8 @@
"root": {"pos": [130, 124], "pitch": 2},
"spine": [0, 2],
"neck": 4, "head": 10,
"shoulder_r": 59, "elbow_r": -23,
"shoulder_l": 59, "elbow_l": -23,
"shoulder_r": 59, "elbow_r": -8,
"shoulder_l": 59, "elbow_l": -8,
"hip_r": 84, "knee_r": 64,
"hip_l": 84, "knee_l": 64,
"pins": {"foot_r": [176, 150], "foot_l": [180, 151]}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 136 KiB

+2 -2
View File
@@ -33,8 +33,8 @@
"neck": 16,
"shoulder_r": 44, "elbow_r": 25,
"shoulder_l": 44, "elbow_l": 25,
"hip_r": 66, "knee_r": -18, "ankle_r": -18,
"hip_l": 66, "knee_l": -18, "ankle_l": -18,
"hip_r": 66, "knee_r": -8, "ankle_r": -18,
"hip_l": 66, "knee_l": -8, "ankle_l": -18,
"pins": {"hand_r": [166, 74], "hand_l": [170, 76], "foot_r": [212, 139], "foot_l": [216, 141]}
}
]
@@ -6,13 +6,13 @@
<path d="M 126.0 143.0 L 126.0 151.0" stroke="#c5cad4" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 110.0 151.0 L 142.0 151.0 L 142.0 151.0 L 110.0 151.0 Z" fill="#c5cad4" stroke="#c5cad4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_l" d="M 125.9 130.8 L 167.4 111.1 L 168.0 150.5 L 179.0 150.3" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 101.0 50.1 L 118.7 26.2 L 142.9 8.9" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 101.0 50.1 L 118.7 26.2 L 139.5 5.0" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="girdle" d="M 101.0 50.1 L 95.1 50.1 L 95.1 52.0" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="pelvisBar" d="M 125.9 130.8 L 120.0 130.0 L 120.0 131.2" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="spine" d="M 120.0 130.0 Q 103.0 90.4 95.1 50.1" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_r" d="M 120.0 131.2 L 161.9 112.6 L 164.0 151.9 L 175.0 151.3" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 95.1 52.0 L 112.8 28.1 L 137.0 10.7" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 130.0 9.8 L 150.0 9.8" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 95.1 52.0 L 112.8 28.1 L 133.6 6.8" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 126.6 5.9 L 146.6 5.9" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<circle id="head" cx="98.6" cy="30.7" r="10" fill="white" stroke="#3a3f4b" stroke-width="6"/>
<line id="nose" x1="108.5" y1="29.3" x2="115.4" y2="28.3" stroke="#3a3f4b" stroke-width="4" stroke-linecap="round"/>
<g font-family="-apple-system, Helvetica, sans-serif" font-size="11" fill="#6b7180">

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

+2 -2
View File
@@ -28,8 +28,8 @@
"root": {"pos": [120, 130], "pitch": -20},
"spine": [0, 6],
"neck": 24, "head": -18,
"shoulder_r": 130, "elbow_r": -18,
"shoulder_l": 130, "elbow_l": -18,
"shoulder_r": 130, "elbow_r": -8,
"shoulder_l": 130, "elbow_l": -8,
"hip_r": 45, "knee_r": 47,
"hip_l": 45, "knee_l": 47,
"pins": {"foot_r": [164, 151], "foot_l": [168, 152]}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

+3 -3
View File
@@ -6,13 +6,13 @@
<path d="M 126.0 143.0 L 126.0 151.0" stroke="#c5cad4" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 110.0 151.0 L 142.0 151.0 L 142.0 151.0 L 110.0 151.0 Z" fill="#c5cad4" stroke="#c5cad4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_l" d="M 125.9 130.8 L 167.4 111.1 L 168.0 150.5 L 179.0 150.3" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 101.0 50.1 L 118.7 26.2 L 142.9 8.9" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_l" d="M 101.0 50.1 L 118.7 26.2 L 139.5 5.0" stroke="#86cfc5" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="girdle" d="M 101.0 50.1 L 95.1 50.1 L 95.1 52.0" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="pelvisBar" d="M 125.9 130.8 L 120.0 130.0 L 120.0 131.2" stroke="#3a3f4b" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="spine" d="M 120.0 130.0 Q 103.0 90.4 95.1 50.1" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="leg_r" d="M 120.0 131.2 L 161.9 112.6 L 164.0 151.9 L 175.0 151.3" stroke="#3a3f4b" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 95.1 52.0 L 112.8 28.1 L 137.0 10.7" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 130.0 9.8 L 150.0 9.8" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 95.1 52.0 L 112.8 28.1 L 133.6 6.8" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 126.6 5.9 L 146.6 5.9" stroke="#6b7180" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<circle id="head" cx="98.6" cy="30.7" r="10" fill="white" stroke="#3a3f4b" stroke-width="6"/>
<line id="nose" x1="108.5" y1="29.3" x2="115.4" y2="28.3" stroke="#3a3f4b" stroke-width="4" stroke-linecap="round"/>
<g font-family="-apple-system, Helvetica, sans-serif" font-size="11" fill="#6b7180">

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -2,7 +2,7 @@
<title>Side Plank</title>
<path d="M 48.0 160.9 L 277.9 160.9 L 277.9 150.5 L 48.0 150.5 Z" fill="none" stroke="#b9bec9" stroke-width="3" stroke-linejoin="round"/>
<path id="leg_r" d="M 179.9 137.8 L 225.2 145.6 L 264.6 152.5 L 262.7 163.1" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 96.2 122.5 L 101.4 93.4 L 106.6 64.3" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 96.2 122.5 L 111.2 96.9 L 126.2 71.4" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="girdle" d="M 90.3 124.4 L 90.3 122.5 L 96.2 122.5" stroke="#0d9488" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="pelvisBar" d="M 174.0 138.2 L 174.0 137.0 L 179.9 137.8" stroke="#0d9488" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="spine" d="M 174.0 137.0 Q 131.2 129.6 90.3 122.5" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

+1 -1
View File
@@ -19,7 +19,7 @@
"root": {"pos": [174, 137], "yaw": 180, "pitch": 80},
"spine": [0, 0],
"neck": 0, "head": -80,
"shoulder_r": -90, "elbow_r": 0,
"shoulder_r": -70, "elbow_r": 0,
"shoulder_l": 80, "elbow_l": 90,
"hip_r": 0, "knee_r": 0,
"hip_l": 0, "knee_l": 0,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 131 KiB

+1 -1
View File
@@ -2,7 +2,7 @@
<title>Side Plank</title>
<path d="M 48.0 160.9 L 277.9 160.9 L 277.9 150.5 L 48.0 150.5 Z" fill="none" stroke="#b9bec9" stroke-width="3" stroke-linejoin="round"/>
<path id="leg_r" d="M 179.9 137.8 L 225.2 145.6 L 264.6 152.5 L 262.7 163.1" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 96.2 122.5 L 101.4 93.4 L 106.6 64.3" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="arm_r" d="M 96.2 122.5 L 111.2 96.9 L 126.2 71.4" stroke="#a9afba" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="girdle" d="M 90.3 124.4 L 90.3 122.5 L 96.2 122.5" stroke="#0d9488" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="pelvisBar" d="M 174.0 138.2 L 174.0 137.0 L 179.9 137.8" stroke="#0d9488" stroke-width="5" stroke-linecap="round" stroke-linejoin="round"/>
<path id="spine" d="M 174.0 137.0 Q 131.2 129.6 90.3 122.5" stroke="#0d9488" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB