When using pscustom
it's best to have the starting point and ending point match together; indeed, the reason that you are getting the unexpected result is that PSTricks
is connecting the first and last points together- in your code, the first and last points are far away from each other, hence the unwanted horizontal line.
I switched the order of a few of your psarc
segments, and also changed the direction of some of them from counter clockwise to clockwise using psarcn
to keep everything flowing in the same direction.
While debugging, I found it helpful to colour the different segments, and use arrows to show the direction:

Once everything matched, up, adding pscustom
back in gave the result as expected:

% arara: pdflatex: {shell: true}
% !arara: indent: {overwrite: yes}
\documentclass{standalone}
\usepackage[pdf]{pstricks}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}(-4,-4)(4,1)
\pscustom[fillstyle=solid,fillcolor=lightgray]{%
\psarc[linecolor=blue]{->}(0,0){3.53}{180}{360}
\psarcn[linecolor=orange]{->}(3.74,0){0.21}{180}{0}
\psarcn[linecolor=green]{->}(0,0){3.95}{360}{180}
\psarcn[linecolor=red]{->}(-3.74,0){0.21}{180}{0}
}
\end{pspicture}
\end{document}
You'll note that I have left the colours and arrows in the code- just remove them when you're happy with what's going on.
As noted by Werner, in this particular case you might get the same output using ncarcbox
, which is detailed on p68 of the documentation
.
PS: I've also used the arara
tool to help with shell escape
.
:)