[Metalab] approximating arbitary shapes with segments