I have the following code which is generated by some script. The first and last coordinate in the path are the same. I don't know how to tell TikZ to close the path. I have tried adding --cycle but it only seems to work when the first and last coordinated are different. As a work around I can displace the last point slightly (then --cycle closes the path) but it is not an elegant solution. How can I close the path?
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[x=1cm,y=1cm]%
\filldraw[fill=green!20!white,line width=0.5mm]
(-4.5:1)
arc (-4.5 : 4.5 : 1)
arc (94.5 : 115.5 : 5.3955171743191)
arc (205.5: 214.5 : 1)
arc (124.5: -4.5 : 0.47697553269816)
arc (265.5: 274.5 : 1)
arc (184.5: 85.5 : 0.85408068546347)
-- cycle;
\end{tikzpicture}
\end{document}
Suggestion given by user3337813 does not work, the defect is better visible in this example:
\filldraw[fill=green!20!white] ( -4.5 :1)
arc ( -4.5 : 34.5 :1)
arc ( -55.5 : -64.5 : 12.706204736175 )
arc ( 205.5 : 214.5 :1)
arc ( 124.5 : -4.5 : 0.47697553269816 )
arc ( 265.5 : 274.5 :1)
arc ( 184.5 : 85.5 : 0.85408068546347 )
arc ( -4.5 : 34.5 :1)
-- cycle;
\end{tikzpicture}
If I remove --cycle the result looks good but technically the path is open.





tikzexpert to know, but does an abbreviated arc in closing, such asarc (-4.5 : -4.4 : 1)work better for you in this case? – Steven B. Segletes Jan 23 '17 at 13:19