add helper to compute compound shape connectivity