rewrite ZArray->mesh transform and colouring