Issue with playground example in documentation

Hello,
I was looking at the example for ‘Pick and Color’ in the documentation

which is

It seems to have an error in the function getFaceNbFromFacetId.
In the attached screen shot, when i click on the face with the black dot, it colors the adjustment face and not the one I clicked on. This happen on 2 faces near the top face.
Can someone please correct the getFaceNbFromFacetId function ?

@JohnK might know the answer.

You are correct. Hopefully this version is now correct

Will submit a PR to the docs.

2 Likes

Thanks! could you please tell me the formula based on m and n values ? if those change, I am assuming the formula changes ?

No it is m and n independent, 60 was just the wrong number. Each of the 12 pentagons is split into 3 facet triangles not 5.

2 Likes