• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Finding Un even Shapes

Stats

  • Replies 2
  • Subscribers 159
  • Views 8939
  • Members are here 0
More Content

Finding Un even Shapes

vimaldevlpr
vimaldevlpr over 3 years ago

Hi,

I have to find un even shape flooded area I don't know how to find using cadence skill programing please guide to find using skill attached the sample image below.

Code:

(defun unevenshape ()
originalVisible=axlVisibleGet()
designName = axlCurrentDesign()
design_path = axlGetDrawingName()
design_unit = car(axlDBGetDesignUnits())
View_list = list()
AllShapeCheck = axlDBGetShapes("ETCH")
if(length(AllShapeCheck)== 0 then
axlUIConfirm("No shape found!")
else
outputfile = outfile("./unevenshape.log" "w")
timeperform = fileTimeModified("unevenshape.log")
fprintf(outputfile, "Design name: %s\n", design_path)
fprintf(outputfile, "%s %s\n\n", "Date: ", timeToString(timeperform))
fprintf(outputfile, "%s\n", "--------------------------------------------------------------------------")
fprintf(outputfile, "%-5s %-10s %-10s %-22s\n\n", "No", "Layer", "Net Name", "Location")
STT = 0
foreach(shape AllShapeCheck
  ; I don't know the code to get un even shape anyone please help me out to get.
);foreach shape
View_list = sort(View_list 'alphalessp)
foreach(item View_list
STT = STT + 1
fprintf(outputfile,"%-5d %-s\n", STT, item)
);end foreach
close(outputfile)
if(STT > 0 then
axlUIViewFileCreate("unevenshape.log" " report..." nil)
else
axlUIConfirm( "No Error found.")
if(isFile("unevenshape.log") == t then deleteFile("unevenshape.log"))
)
)
)
  • Cancel
  • Sign in to reply
Parents
  • B Bruekers
    B Bruekers over 3 years ago

    I believe you only want circular or oblong shapes?

    foreach(shape AllShapeCheck

    voids = shape->voids
    foreach(void voids
        pprintln(void->nSegs)
    )

    )

    This will print how many segments each void has. 1 = circle, anything above that is 'different'.  Now it is your task to make a pass/fail function depending on the amount of segments and the geometry of void. :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vimaldevlpr
    vimaldevlpr over 3 years ago in reply to B Bruekers

    Hi Thanks for the reply

    Yes I want only Circular oblong shape as well

    one more suggestion by using bBox command its not finding exact center point location is any way to get exact location.

     axlClearSelSet()
     axlSetFindFilter(?enabled '("NOALL", "SHAPES"), ?onButtons "SHAPES")
     AllShapeCheck = axlGetSelSet(axlAddSelectAll())
     
     foreach(shape AllShapeCheck
      voids = shape->voids
      foreach(void voids
       ;UES = sprintf(nil "%L  %L" void->nSegs, void->bBox)
       segval = void->nSegs
       if(segval > 5 then
        fprintf(port, "%-16L %-16L %-16L %-16L\n" shape->net->name, shape->layer, void->nSegs, void->bBox)
       )
      )
     )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • vimaldevlpr
    vimaldevlpr over 3 years ago in reply to B Bruekers

    Hi Thanks for the reply

    Yes I want only Circular oblong shape as well

    one more suggestion by using bBox command its not finding exact center point location is any way to get exact location.

     axlClearSelSet()
     axlSetFindFilter(?enabled '("NOALL", "SHAPES"), ?onButtons "SHAPES")
     AllShapeCheck = axlGetSelSet(axlAddSelectAll())
     
     foreach(shape AllShapeCheck
      voids = shape->voids
      foreach(void voids
       ;UES = sprintf(nil "%L  %L" void->nSegs, void->bBox)
       segval = void->nSegs
       if(segval > 5 then
        fprintf(port, "%-16L %-16L %-16L %-16L\n" shape->net->name, shape->layer, void->nSegs, void->bBox)
       )
      )
     )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information