ProfiledContourGeometry MultiMaterial

I can’t get any of this to work, it won’t even show the figure, but I get no errors
While the one without texture ProfiledContourGeometry works fine.

How do i calculate how many Materials i must have in the array ?