# How to find the intersection point between the invisible frame of \rput and the line segment of \ncline?

Points enclosed by black ovals are the intersection points between the frame boundary of \rput and the line segment of \ncline.

How to find these points?

The screenshot above is copied from PSTricks Tutorial series on page 4.

-

\documentclass{article}
\usepackage{pst-node}\SpecialCoor
\makeatletter
\def\psGetEdgeA#1#2{tx@NodeDict begin 0.0 0.0 neg 0.0 0.0 0 0
/N@#1 /N@#2 InitNC { NCCoor } if pop pop \tx@UserCoor end}
\def\psGetEdgeB#1#2{tx@NodeDict begin 0.0 0.0 neg 0.0 0.0 0 0
/N@#1 /N@#2 InitNC { NCCoor } if 4 2 roll pop pop \tx@UserCoor end}
\makeatother

\begin{document}
\Huge
\hspace*{4cm}\rnode{B}{Node B}

\vspace{2cm}
\rnode{A}{Node A}
\ncline{A}{B}
\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeA{A}{B}){10pt}
\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeB{A}{B}){10pt}

\end{document}

-
thanks for this help. Very good. –  xport Dec 28 '10 at 16:54
the pst-node version from http://texnik.dante.de/tex/generic/pst-node/ knows the above two macros. Will be available from CTAN this year :-) –  Herbert Dec 28 '10 at 21:13