FingerTipMesh is Physics3D.Geometries.ConvexMesh:
    s is Real: 1.0
    w is Real: 0.017 * s
    l is Real: 0.03 * s
    h is Real: 0.01 * s
    half is Real: 0.5
    a is Real: half - 0.05
    b is Real: half - 0.1
    r is Real: h * 0.2
    offset is Real: l * 0.5 + r
    vertices: [{l * half, w * a, h * b}, {l * b, w * half, h * b}, {l * b, w * a, h * half},
               {-l * half, w * a, h * b}, {-l * b, w * half, h * b}, {-l * b, w * a, h * half},
               {l * half, -w * a, h * b}, {l * b, -w * half, h * b}, {l * b, -w * a, h * half},
               {l * half, w * a, -h * b}, {l * b, w * half, -h * b}, {l * b, w * a, -h * half},
               {-l * half, -w * a, -h * b}, {-l * b, -w * half, -h * b}, {-l * b, -w * a, -h * half},
               {l * half, -w * a, -h * b}, {l * b, -w * half, -h * b}, {l * b, -w * a, -h * half},
               {-l * half, -w * a, h * b}, {-l * b, -w * half, h * b}, {-l * b, -w * a, h * half},
               {-l * half, w * a, -h * b}, {-l * b, w * half, -h * b}, {-l * b, w * a, -h * half}]
    local_transform.position: {offset, 0, 0}

FingerTip is Physics3D.Bodies.RigidBody:
    tip is FingerTipMesh
    visual is Visuals.Geometries.ConvexMesh:
        vertices: tip.vertices
        local_transform: tip.local_transform
    axis is Physics3D.Geometries.Cylinder:
        radius: tip.r
        height: tip.w
    axis_visual is Visuals.Geometries.Cylinder:
        radius: axis.radius
        height: axis.height
    connector_in is Physics3D.Interactions.MateConnector:
        main_axis: {0,1,0}
    connector_out is Physics3D.Interactions.MateConnector:
        position: {tip.l + tip.r * 2, 0, 0}
        main_axis: {0,1,0}

Finger is Physics3D.System:
    part_1 is FingerTip
    part_2 is FingerTip
    mate is Physics3D.Interactions.Hinge:
        connectors: [part_1.connector_out, part_2.connector_in]
        initial_angle: -0.3
    spring is Physics3D.Interactions.TorsionSpring:
        connectors: mate.connectors
        flexibility.stiffness: 100000
        angle: mate.initial_angle
    finger_pair is Simulation.CollisionGroup:
        bodies: [part_1, part_2]
    disable_local is Simulation.DisableCollisionPair:
        group1: finger_pair
        group2: finger_pair
