add make Polygon2D generic for different node types