rename field chains to chainsHeads of Polygon2D
Extract interface ShapeFunction from MLS