Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 62848

Forum Post: RE: skill to create shape based on vias

$
0
0
Hi zpofrp ! Please refer this code. HoangKhoi. ; ##################################################################### axlCmdRegister("createShapeByVia" 'createShapeByVia ) (defun createShapeByVia () vi_via = setof(e axlSubclassRoute(?field 'isEtch) axlIsVisibleLayer(strcat("VIA CLASS/" e ))) if(length(vi_via) > 1 then axlUIConfirm( "Visible Via must one layer") else layer = car(vi_via) axlClearSelSet(vi_via) axlSetFindFilter(?enabled '(noall VIAS NAMEFORM) ?onButtons '(noall VIAS)) mypopup = axlUIPopupDefine(nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun))) axlUIPopupSet( mypopup) while(axlSelect(?prompt "Please select an element...") Input_List = axlGetSelSet() axlClearSelSet() if(length(Input_List)>1 then tmp = nil net = car(Input_List)->net foreach(via Input_List foreach(via2 setof(e Input_List e->net == net && e->xy != via->xy) sizeVia1 = getSizeVia(via, layer) sizeVia2 = getSizeVia(via2, layer) lineWidth = max(sizeVia1,sizeVia2) r_path = axlPathStart(list( via->xy via2->xy ) lineWidth) r_path_poly = car(axlPolyFromDB(r_path ?line2poly t ?endCapType 'ROUND)) tmp = cons(r_path_poly tmp) ) ) poly_tmp = car(axlPolyOperation(car(tmp) cdr(tmp) 'OR)) if(poly_tmp->holes != nil then hole_list = nil foreach(h poly_tmp->holes hole_list = cons(car(axlPolyFromHole(h)) hole_list) ) poly_tmp = car(axlPolyOperation(poly_tmp hole_list 'OR)) ) create_shape = axlDBCreateShape(poly_tmp t strcat("ETCH/" layer) net ) ) ) ) ) (defun getSizeVia (via, layer) prog((sizeVia) pad_box = axlDBGetPad(via strcat("VIA CLASS/" layer) "regular")->bBox p1 = car(pad_box) p2 = xCoord(car(pad_box)) : yCoord(cadr(pad_box)) p3 = xCoord(cadr(pad_box)) : yCoord(car(pad_box)) sizeVia = max(axlDistance(p1 p2), axlDistance(p1 p3)) return(sizeVia) ) ) ;#####################################################################

Viewing all articles
Browse latest Browse all 62848

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>