[functions] fix polygonization function to work with curves that have line segments
[functions] fix polygonization function to work with curves that have line segments

penrose/penrose,penrose/penrose,penrose/penrose,penrose/penrose