%% syntaxe : (A) (B) str ncdiagg --> relie les nodes A et B
/ncdiagg {
12 dict begin
dup isstring
{
/option exch def
}
if
/nodeB_name exch def
/nodeB_name nodeB_name (node_dict) append store
/n@deBdict nodeB_name cvx def
/nodeA_name exch def
/nodeA_name nodeA_name (node_dict) append store
/n@deAdict nodeA_name cvx def
n@deAdict /cc get /A exch def
n@deBdict /cc get /B exch def
%% point de connection au node A
n@deAdict /noderayon known {
angleA A
n@deAdict /noderayon get
cpoint /A1 defpoint
} {
n@deAdict /dl get exec
n@deAdict /dr get exec
n@deAdict /ur get exec
n@deAdict /ul get exec
angleA
quadrilatereanglepoint /A1 defpoint
} ifelse
/ua {angleA dir armA dup ptojpoint pop mulv} def
/va {angleA dir nodesep dup ptojpoint pop mulv} def
A1 va addv /A' defpoint
A' ua addv /A" defpoint
%% point de connection au node B
n@deBdict /noderayon known {
B A" angle B
n@deBdict /noderayon get
cpoint /B1 defpoint
} {
n@deBdict /dl get exec
n@deBdict /dr get exec
n@deBdict /ur get exec
n@deBdict /ul get exec
B A" angle
quadrilatereanglepoint /B1 defpoint
} ifelse
/vb {B A" angle dir nodesep dup ptojpoint pop mulv} def
B1 vb addv /B' defpoint
[A' A" B']
currentdict /option known {
option
} if
ligne
end
} def
|