let nb_bones = let n = ref 0 in Array.iter (fun line -> Array.iter (fun e -> if e then incr n) line) skel ; assert ((!n/2)*2 = !n) ; !n/2