QBDG2YVNCQLTOWIEPI3K7WR25SNHYKOVJTP3GVDQCEYXEIXXDVRQC
DDXXXXBRUH4UHHPOLAK2IG45C4QAPGSR4MTLV3MVFV3EMND43DIAC
FUOURDEY4IX3FJJXZON2Q3NVMIUT4ZAVCECXCVENQOCDQMGR5VBAC
KKHSOUW46XWS7M4JOKFQ5CIUPRRAWGQADVSOWJJ7TH37H24EEKPQC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
OI4FPFINEROK6GNDEMOBTGSPYIULCLRGGT5W3H7VLM7VFH22GMWQC
UN7L3DNN4Y3BCIA7SM6GYYWQG3OKVCH7ADPKAVF33E6QXY2HEJMQC
W7JMT5V2ELDFZG354LUL5AR6IQLIYQUDXBEPDNZ2BEBXDCZLQJTAC
VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC
WDMPH4ANFQ4YDIBCKDE5ZSRRNIJFBR5W5CH4VYYFKWS5Q63KHLFAC
elseif shape.mode == 'polygon' then
local name = shape.center.name
shape.center = Drawing.find_or_insert_point(drawing.points, shape.center.x,shape.center.y, --[[large width to minimize overlap]] 1600)
drawing.points[shape.center].name = name
local name = shape.p1.name
shape.p1 = Drawing.find_or_insert_point(drawing.points, shape.p1.x,shape.p1.y, --[[large width to minimize overlap]] 1600)
drawing.points[shape.p1].name = name
elseif shape.mode == 'polygon' then
local name = shape.center.name
shape.center = Drawing.find_or_insert_point(drawing.points, shape.center.x,shape.center.y, --[[large width to minimize overlap]] 1600)
drawing.points[shape.center].name = name
local name = shape.p1.name
shape.p1 = Drawing.find_or_insert_point(drawing.points, shape.p1.x,shape.p1.y, --[[large width to minimize overlap]] 1600)
drawing.points[shape.p1].name = name
outfile:write(json.encode({mode=shape.mode, num_vertices=shape.num_vertices, center=drawing.points[shape.center], p1=drawing.points[shape.p1]}))