better selection of closest objects
This commit is contained in:
parent
622fb168c1
commit
3260d438c1
|
|
@ -32,9 +32,7 @@ void find_closest_net(double mx,double my)
|
|||
double tmp;
|
||||
int i,w=-1;
|
||||
double threshold;
|
||||
double cg;
|
||||
cg = tclgetdoublevar("cadgrid");
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * cg * cg / 400;
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * xctx->zoom * xctx->zoom;
|
||||
|
||||
for(i=0;i<xctx->wires;i++)
|
||||
{
|
||||
|
|
@ -57,9 +55,7 @@ void find_closest_polygon(double mx,double my)
|
|||
int i, c, j, l=-1, col = 0;
|
||||
double x1, y1, x2, y2;
|
||||
double threshold;
|
||||
double cg;
|
||||
cg = tclgetdoublevar("cadgrid");
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * cg * cg / 400;
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * xctx->zoom * xctx->zoom;
|
||||
for(c=0;c<cadlayers;c++)
|
||||
{
|
||||
if(!xctx->enable_layer[c]) continue;
|
||||
|
|
@ -94,9 +90,7 @@ void find_closest_line(double mx,double my)
|
|||
double tmp;
|
||||
int i,c,l=-1, col = 0;
|
||||
double threshold;
|
||||
double cg;
|
||||
cg = tclgetdoublevar("cadgrid");
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * cg * cg / 400;
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * xctx->zoom * xctx->zoom;
|
||||
for(c=0;c<cadlayers;c++)
|
||||
{
|
||||
if(!xctx->enable_layer[c]) continue;
|
||||
|
|
@ -184,9 +178,7 @@ void find_closest_arc(double mx,double my)
|
|||
int i,c,r=-1, col;
|
||||
int match;
|
||||
double threshold;
|
||||
double cg;
|
||||
cg = tclgetdoublevar("cadgrid");
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * cg * cg / 400;
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * xctx->zoom * xctx->zoom;
|
||||
|
||||
for(c=0;c<cadlayers;c++)
|
||||
{
|
||||
|
|
@ -288,12 +280,10 @@ void find_closest_text(double mx,double my)
|
|||
double xx1,xx2,yy1,yy2;
|
||||
int i,r=-1, tmp;
|
||||
double threshold;
|
||||
double cg;
|
||||
#if HAS_CAIRO==1
|
||||
int customfont;
|
||||
#endif
|
||||
cg = tclgetdoublevar("cadgrid");
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * cg * cg / 400;
|
||||
threshold = CADWIREMINDIST * CADWIREMINDIST * xctx->zoom * xctx->zoom;
|
||||
for(i=0;i<xctx->texts;i++)
|
||||
{
|
||||
rot = xctx->text[i].rot;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,15 @@ unitx=m
|
|||
T {ANALOG AUDIO AMPLIFIER
|
||||
N-Channel only power stage} 430 -270 0 0 0.5 0.5 {layer=8}
|
||||
N 180 -500 180 -470 {lab=E9}
|
||||
#
|
||||
# comment
|
||||
#
|
||||
N 260 -470 340 -470 {lab=E9}
|
||||
N 340 -500 340 -470 {lab=E9}
|
||||
N 1110 -700 1110 -670 {lab=SA}
|
||||
|
||||
|
||||
|
||||
N 840 -1020 840 -980 {lab=E4}
|
||||
N 1110 -590 1110 -570 {lab=OUTI}
|
||||
N 1110 -510 1110 -470 {lab=#net1}
|
||||
|
|
@ -117,7 +123,7 @@ C {res.sym} 960 -410 0 1 {name=R7 m=1 value=190 net_name=true}
|
|||
C {nmos3.sym} 1090 -760 0 0 {name=xm1 model=irf540 m=1
|
||||
program=evince
|
||||
url="https://www.vishay.com/docs/91021/91021.pdf" net_name=true}
|
||||
C {res.sym} 960 -730 0 1 {name=R0 m=1 value=190 net_name=true}
|
||||
C {res.sym} 960 -730 0 1 {name=R0 m=1 value=190 net_name=true} #comment
|
||||
C {lab_pin.sym} 1390 -590 0 1 {name=p14 lab=OUT}
|
||||
C {lab_pin.sym} 1110 -280 0 0 {name=p18 lab=VNN}
|
||||
C {lab_wire.sym} 920 -440 0 0 {name=l8 lab=GB}
|
||||
|
|
|
|||
Loading…
Reference in New Issue