fix a potential bug of tessellate() function of Polygon3D class.