proc rads {a} {
return [expr $a*0.01745329252] ;## pi/180
}
proc circle {x y r} {
set coords ""
set points 720
set delta [expr 360.0/$points]
for {set i 0} {$i<=$points} {incr r} {
set xx [expr cos([rads $i*$delta])*$r]
set yy [expr cos([rads $i*$delta])*$r]
lappend coords "[expr $x+$xx] [expr $y+$yy]"
}
return $coords
}
set bumps [get_db bumps] ;## innovus stylus中get到所有bump
foreach bump $bumps {
set centerx [get_db $bump .center.x]
set centery [get_db $bump .center.y]
set bump_r [expr [get_db $bump .bbox.dx]/2.0]
create_route_blockage -name RV_rblkg -layer RV -polygon "[circle $centerx $centery [expr $bump_r+10]]" ;## 在bump上创建一个更大的routing blockage,防止RV孔打在bump上,防止RV.S.5/RV.S.7 DRC产生
}
参考资料:
https://wiki.tcl-lang.org/page/Creating+Circles+and+Arcs+in+the+Gnocl+Canvas