added a copy for the pin2pin file and a message on how to use
This commit is contained in:
parent
0f5c61225f
commit
fa034c5b95
57
examples/demo01_pin2pin.gvpr
Normal file
57
examples/demo01_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/demo02_pin2pin.gvpr
Normal file
57
examples/demo02_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex01_pin2pin.gvpr
Normal file
57
examples/ex01_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex02_pin2pin.gvpr
Normal file
57
examples/ex02_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex03_pin2pin.gvpr
Normal file
57
examples/ex03_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex04_pin2pin.gvpr
Normal file
57
examples/ex04_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex05_pin2pin.gvpr
Normal file
57
examples/ex05_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex06_pin2pin.gvpr
Normal file
57
examples/ex06_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex07_pin2pin.gvpr
Normal file
57
examples/ex07_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex08_pin2pin.gvpr
Normal file
57
examples/ex08_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex09_pin2pin.gvpr
Normal file
57
examples/ex09_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex10_pin2pin.gvpr
Normal file
57
examples/ex10_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex11_pin2pin.gvpr
Normal file
57
examples/ex11_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex12_pin2pin.gvpr
Normal file
57
examples/ex12_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex13_pin2pin.gvpr
Normal file
57
examples/ex13_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex14_pin2pin.gvpr
Normal file
57
examples/ex14_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex15_pin2pin.gvpr
Normal file
57
examples/ex15_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
examples/ex16_pin2pin.gvpr
Normal file
57
examples/ex16_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
import re
|
import re
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
@ -752,7 +753,7 @@ class Harness:
|
|||||||
os.environ['GVPRPATH'] = str(Path(__file__).parent)
|
os.environ['GVPRPATH'] = str(Path(__file__).parent)
|
||||||
graph.save(filename=f"{filename}_tmp.gv")
|
graph.save(filename=f"{filename}_tmp.gv")
|
||||||
os.system(f"dot {filename}_tmp.gv | gvpr -q -cf pin2pin.gvpr | neato -n2 -T{type} -o {filename}.{type}")#{':cairo'if type == 'svg' else ''}
|
os.system(f"dot {filename}_tmp.gv | gvpr -q -cf pin2pin.gvpr | neato -n2 -T{type} -o {filename}.{type}")#{':cairo'if type == 'svg' else ''}
|
||||||
os.remove(f"{filename}_tmp.gv")
|
os.remove(f"{filename}_tmp.gv")
|
||||||
else:
|
else:
|
||||||
graph.render(filename=filename) # old rendering methode, befor jumper implementations
|
graph.render(filename=filename) # old rendering methode, befor jumper implementations
|
||||||
|
|
||||||
@ -804,6 +805,9 @@ class Harness:
|
|||||||
# GraphViz output
|
# GraphViz output
|
||||||
if "gv" in fmt:
|
if "gv" in fmt:
|
||||||
graph.save(filename=f"{filename}.gv")
|
graph.save(filename=f"{filename}.gv")
|
||||||
|
filename_str = str(filename)
|
||||||
|
shutil.copyfile(str(Path(__file__).parent).replace('\\', '/') + "/pin2pin.gvpr", filename_str + "_pin2pin.gvpr")
|
||||||
|
print(f"Use: dot {filename_str}_tmp.gv | gvpr -q -cf {filename_str}_pin2pin.gvpr | neato -n2 -T<type> -o {filename_str}.<type>")
|
||||||
# BOM output
|
# BOM output
|
||||||
bomlist = bom_list(self.bom())
|
bomlist = bom_list(self.bom())
|
||||||
if "tsv" in fmt:
|
if "tsv" in fmt:
|
||||||
|
|||||||
57
tutorial/tutorial01_pin2pin.gvpr
Normal file
57
tutorial/tutorial01_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial02_pin2pin.gvpr
Normal file
57
tutorial/tutorial02_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial03_pin2pin.gvpr
Normal file
57
tutorial/tutorial03_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial04_pin2pin.gvpr
Normal file
57
tutorial/tutorial04_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial05_pin2pin.gvpr
Normal file
57
tutorial/tutorial05_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial06_pin2pin.gvpr
Normal file
57
tutorial/tutorial06_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial07_pin2pin.gvpr
Normal file
57
tutorial/tutorial07_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
57
tutorial/tutorial08_pin2pin.gvpr
Normal file
57
tutorial/tutorial08_pin2pin.gvpr
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************
|
||||||
|
|
||||||
|
see https://forum.graphviz.org/t/straitening-one-line-throu-a-table/2196 and https://forum.graphviz.org/t/way-of-drawing-a-black-circle-inside-a-table-field/2273/12
|
||||||
|
input must include pos values (must be output from one of the engines w/ -Tdot)#
|
||||||
|
Thanks to steveroush and FeRDNYC
|
||||||
|
|
||||||
|
*******************************************************************/
|
||||||
|
BEG_G{
|
||||||
|
double x1,y1,x2,y2,x3,y3,x4,y4;
|
||||||
|
string ptSize, tok[int], pt[];
|
||||||
|
int cnt, circ, i;
|
||||||
|
node_t aNode;
|
||||||
|
|
||||||
|
circ=0;
|
||||||
|
|
||||||
|
/***************************************
|
||||||
|
$G.bb="";
|
||||||
|
$G.nodesep="";
|
||||||
|
$G.ranksep="";
|
||||||
|
$G.splines="true";
|
||||||
|
****************************************/
|
||||||
|
}
|
||||||
|
E[straight] {
|
||||||
|
cnt=tokens($.pos,tok," ");
|
||||||
|
$.oldpos=$.pos;
|
||||||
|
x1 = xOf(tok[0]);
|
||||||
|
y1 = yOf(tok[0]);
|
||||||
|
x4 = xOf(tok[cnt-1]);
|
||||||
|
y4 = yOf(tok[cnt-1]);
|
||||||
|
x2 = x1 + (x4-x1)/3.;
|
||||||
|
y2 = y1 + (y4-y1)/3.;
|
||||||
|
x3 = x1 + 2.*(x4-x1)/3.;
|
||||||
|
y3 = y1 + 2.*(y4-y1)/3.;
|
||||||
|
pos=sprintf("%.3f,%.3f %.3f,%.3f %.3f,%.3f %.3f,%.3f", x1,y1, x2,y2, x3,y3, x4,y4);
|
||||||
|
$.label=""; // remove pesky label
|
||||||
|
$.lp=""; // remove peskier label pos
|
||||||
|
|
||||||
|
if (hasAttr($, "addPTS") && $.addPTS!="" && $.colorPTS!=""){
|
||||||
|
// now we place point nodes at the edge ends
|
||||||
|
pt[1] = tok[0];
|
||||||
|
pt[2] = tok[cnt-1];
|
||||||
|
ptSize=$.addPTS;
|
||||||
|
for (pt[i]) {
|
||||||
|
if (i==2 && pt[1]==pt[2])
|
||||||
|
continue;
|
||||||
|
aNode=node($G, "__CIRCLE__" + (string)++circ);
|
||||||
|
aNode.pos=pt[i];
|
||||||
|
aNode.shape="point";
|
||||||
|
aNode.width=ptSize;
|
||||||
|
aNode.height=ptSize;
|
||||||
|
aNode.style="filled";
|
||||||
|
aNode.fillcolor=$.colorPTS;
|
||||||
|
aNode.color=$.colorPTS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user