const SRC = [196.8505, 0.0, "L", 6102.3655, 0.0, "ARC", 90.0, 6299.216, 196.8505, "L", 6299.216, 4724.412, "ARC", 90.0, 6102.3655, 4921.2625, "L", 196.8505, 4921.2625, "ARC", 90.0, 0.0, 4724.412, "L", 0.0, 196.8505, "ARC", 90.0, 196.8505, 0.0]; const out = {}; try { const poly = await eda.pcb_MathPolygon.createPolygon(SRC); out.polyOk = !!poly; try { const r = await eda.pcb_PrimitivePolyline.create('', 11, poly, 5); out.id = r ? r.primitiveId : String(r); } catch(e){ out.createErr = String(e).slice(0,200); } } catch(e){ out.mathErr = String(e).slice(0,200); } const P = await eda.pcb_PrimitivePolyline.getAll(); out.nPoly = P.length; return out;