[pstricks] U tube

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Feb 19 17:02:16 CET 2016


Am 19.02.2016 um 14:08 schrieb orodrig at ualg.pt:
> Dear wizards of PStricks, please enlighten me with your wisdom: I'm
> trying to create a U shaped tube with the following code:
>
> \begin{pspicture}(-6,-6)(6,6)
> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](-2.5,0)(-2,2)
> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](2,0)(2.4,4)
> \psline[linewidth=1mm,linecolor=black]{-}(-2.5,0)(-2.5,5)
> \psline[linewidth=1mm,linecolor=black]{-}(2.5,0)(2.5,5)
> \psline[linewidth=1mm,linecolor=black]{-}(-2,0)(-2,5)
> \psline[linewidth=1mm,linecolor=black]{-}(2,0)(2,5)
> \psline[linewidth=0.5mm,linecolor=black]{-}(-2.5,2)(-2,2)
> \psline[linewidth=0.5mm,linecolor=black]{-}(2,4)(2.5,4)
> \psline[linewidth=0.5mm,linecolor=black,linestyle=dashed,dash=5mm
> 2mm]{-}(-3.5,3)(3.5,3)
> \psline[linewidth=1mm,linecolor=black]{<->}(-3,2)(-3,3)
> \psline[linewidth=1mm,linecolor=black]{<->}(3,3)(3,4)
> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=hlines](0,0){2.5}{180}{0}
>
> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=solid,fillcolor=white](0,0){2}{180}{0}
>
> \rput{0}(-4,2.5){\scalebox{1.5}{$-\Delta z$}}
> \rput{0}(4,3.5){\scalebox{1.5}{$\Delta z$}}
> \end{pspicture}
>
> It does the job, but for some weird reason either gv and acrobat display
> some "artifacts", like lines with different widths or non-continuous
> filling of the tube and arc. How can I merge all line and arc segments
> and do the filling properly? Thanks in advance (whatever the answer is).

Everything is fine for me with xelatex and also with 
latex->dvips->ps2pdf with an up-to-date TeXLive.
Did you viewed the pdf output?

Herbert


More information about the PSTricks mailing list