1

I want to handle the bug mentioned in my previous question. However, the following MWE produces an error. My prediction is that \psGetDistance seems to reject nodes as its arguments.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\multido{\i=0+30}{12}{%
\begin{pspicture}(-2,-2)(2,2)
    \pscircle{1}
    \pnode(1;\i){R}
    \psset{arrows=->}
    \psline(R)
    \psGetDistance(0,0)(R|0,0)\Distance
    \ifnum\Distance=0\relax
    \else
        \psline[linecolor=blue](R|0,0)
    \fi
    \psGetDistance(0,0)(0,0|R)\Distance
    \ifnum\Distance=0\relax
    \else
        \psline[linecolor=red](0,0|R)
    \fi
    \psset{linecolor=gray,linestyle=dashed,linewidth=0.5\pslinewidth,arrows=-,dash=2pt 2pt}
    \psline(R)(0,0|R)
    \psline(R)(R|0,0)
\end{pspicture}}
\end{document}

How to pass a node to \psGetDistance?

1 Answers1

2

that is not possible, the nodes are saved on PS level and \psGetDistance uses always the TeX level.