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

Forum Post: RE: How to expand/contract multiple voids at the same time?

$
0
0
Hi Judeeeee ! You can refer to it. It works with dynamic shapes only. Best regards, HoangKhoi ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ axlCmdRegister("expand_void_shape" `expand_void_shape) exp_value_float = 0.0 (defun de_expand_void () exp_value = axlUIPrompt("Enter the cutout size :" ) if(exp_value != nil && atof(exp_value) != 0.0 then exp_value_float = atof(exp_value) ) ) (defun de_contrac_void () exp_value = axlUIPrompt("Enter the cutout size :" ) if(exp_value != nil && atof(exp_value) != 0.0 then exp_value_float = atof(exp_value) * -1.0 ) ) (defun expand_void_shape () if(axlVersion('version) >= 17.2 then axlSetFindFilter(?enabled '(noall VOIDS NAMEFORM) ?onButtons '(noall ALL)) mypopup = axlUIPopupDefine(nil (list (list "Done" 'axlFinishEnterFun) (list "Cancel" 'axlCancelEnterFun) list("MENU_SEPARATOR" nil) (list "Expand" 'de_expand_void) (list "Contraction" 'de_contrac_void))) axlUIPopupSet( mypopup) while(axlSelect(?prompt "Please select an element...") Input_List = axlGetSelSet() axlClearSelSet() if(exp_value_float != 0.0 then tmp_list = nil foreach(void Input_List if(void->objType != nil then shape_parent = void->parent tmp = setof(e Input_List e->parent == shape_parent) poly_list = nil foreach(item setof(e tmp member(e tmp_list) == nil) tmp_list = cons(item tmp_list) poly = car(axlPolyFromDB(item ?endCapType 'ROUND)) poly_list = cons(poly poly_list) ) if(poly_list != nil then foreach(void2 shape_parent->shapeBoundary->voids poly = car(axlPolyFromDB(void2 ?endCapType 'ROUND)) foreach(_poly poly_list if(poly->bBox == _poly->bBox then axlShapeDeleteVoids(void2) ) ) ) axlSetFindFilter(?enabled '(noall SHAPES NAMEFORM) ?onButtons '(noall ALL)) foreach(poly poly_list axlAddSelectPoly(poly t) ) new_shape = car(axlGetSelSet())->shapeBoundary axlClearSelSet() if(new_shape != nil then openShape = axlDBOpenShape(new_shape) foreach(poly axlPolyExpand(poly_list exp_value_float 'NONE) axlDBCreateVoid(openShape, poly) ) openShape = axlDBCreateCloseShape(openShape) ) ) ) ) axlSetFindFilter(?enabled '(noall VOIDS NAMEFORM) ?onButtons '(noall ALL)) ) ) ) printf("Version 1.0 - Last update: 08/04/2025\n") )

Viewing all articles
Browse latest Browse all 62735

Trending Articles



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