I use GeoGebra to draw a cube. The code in GeoGebra is
\documentclass[12pt]{article}
\usepackage{pstricks-add}
\pagestyle{empty}
\begin{document}
\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture}(-0.14,5.74)(-0.14,5.77)
\pspolygon[fillcolor=black,fillstyle=solid,opacity=0.1](0,4)(0,0)(1,2)(1,6)
\pspolygon[fillcolor=black,fillstyle=solid,opacity=0.1](1,2)(4,0)(5,6)
\psline[linewidth=1.2pt](0,4)(0,0)
\psline[linewidth=1.2pt](0,0)(4,0)
\psline[linewidth=1.2pt](4,0)(5,2)
\psline[linewidth=1.2pt](5,2)(5,6)
\psline[linewidth=1.2pt](5,6)(1,6)
\psline[linewidth=1.2pt](0,4)(1,6)
\psline[linewidth=1.2pt,linestyle=dashed,dash=1pt 1pt](1,2)(1,6)
\psline[linewidth=1.2pt,linestyle=dashed,dash=1pt 1pt](1,2)(0,0)
\psline[linewidth=1.2pt,linestyle=dashed,dash=1pt 1pt](1,2)(5,2)
\psline[linewidth=1.2pt](4,4)(4,0)
\psline[linewidth=1.2pt](4,4)(0,4)
\psline[linewidth=1.2pt](4,4)(5,6)
\psline(0,4)(0,0)
\psline(0,0)(1,2)
\psline(1,2)(1,6)
\psline(1,6)(0,4)
\psline(1,2)(4,0)
\psline(4,0)(5,6)
\psline(5,6)(1,2)
\psline(1,2)(4.5,3)
\psline(4.5,3)(5,2)
\parametricplot{-2.8632929945846817}{-1.1071487177940902}{0.18*cos(t)+4.5|0.18*sin(t)+3}
\begin{scriptsize}
\psdots[dotstyle=*](0,0)
\rput[bl](-0.04,-0.25){$A$}
\psdots[dotstyle=*](4,0)
\rput[bl](3.96,-0.3){$B$}
\psdots[dotstyle=*](5,2)
\rput[bl](5.03,2.07){$C$}
\psdots[dotstyle=*](1,2)
\rput[bl](0.96,1.6){$D$}
\psdots[dotstyle=*](0,4)
\rput[bl](-0.3,4.22){$A_1$}
\psdots[dotstyle=*](1,6)
\rput[bl](0.95,6.19){$D_1$}
\psdots[dotstyle=*](4,4)
\rput[bl](3.7,4.21){$B_1$}
\psdots[dotstyle=*](5,6)
\rput[bl](5.03,6.07){$C_1$}
\psdots[dotstyle=*](4.5,3)
\rput[bl](4.59,3.02){$E$}
\end{scriptsize}
\end{pspicture}
\end{document}
I want style of the the segments BD, C_1D, AD and D_1D is dashed. I tried
\psset{linestyle=dashed}
\psline(B)(D)
\psline(C_1)(D)
\psline(A)(D)
\psline(D_1)(D)
but the lines are not dashed. How can I get that?










linestyle=dashedas option. – Sigur Feb 08 '14 at 14:13