• 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. Draw multiple clines on a given box or shape

Stats

  • Replies 3
  • Subscribers 160
  • Views 13408
  • Members are here 0
More Content

Draw multiple clines on a given box or shape

vramananx
vramananx over 13 years ago

Hi

This is what I am trying to do

User to select a shape drawn in a drawing layer, now I want the skill to draw cline segments on regular interval with given width horizontally in one etch layer and vertically on the adjacent layer

 now I want to inserta a via on where the clines intersect on the adjacent layer

 I  am going to test out a procedure and let you guys know what is the result

Any ideas welcome

regards

Venkata

  • Sign in to reply
  • Cancel
  • Pawandeep
    Pawandeep over 13 years ago

    Hi Venkata, 

    There is function axl_ol_ol2() which finds the intersection point of two lines and for adding a via we can use axlDBCreateVia().

    By the way we can manually also place multiple vias using the Copy command on your preferred x and y spacing.I assume the purpose might be taking traces straight without bends.

    -Pawan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • vramananx
    vramananx over 13 years ago

    Hi Guys

    I forgot to update, I figured it out and here is  a sample code

    Draw a shape (only rectangular) in an drawing layer then select it

    I still don't know how to achieve this with an irregular shape(this is where i need some help)

     axlClearSelSet()
     axlSetFindFilter(?enabled list("noall", "SHAPES"), ?onButtons list("noall", "SHAPES"))
     
     shape = car(axlGetSelSet(axlSelect()) )
       
     layer1 = "CONDUCTOR/METAL2"
     layer2 = "CONDUCTOR/METAL1"
     _shbBox = shape->bBox
     _startX = car(xCoord(_shbBox))
     _startY = cadr(xCoord(_shbBox))
     _endX = car(yCoord(_shbBox))
     _endY = cadr(yCoord(_shbBox))

      i = _startY
      while(round(i)<=round(_endY) axlDBCreateLine((list _startX:i _endX:i), 20 layer1), i=i+100)
      j = _startX
      while(round(j)<=round(_endX) axlDBCreateLine((list j:_startY j:_endY), 20 layer2), j=j+100) 
       
       axlClearSelSet()
       axlSetFindFilter(?enabled list("noall", "clines"), ?onButtons list("noall", "clines"))
       clines = axlGetSelSet(axlAddSelectBox(_shbBox))
       axlClearSelSet()
       endType = 'SQUARE

       l1_clines = setof(a clines a->layer == "CONDUCTOR/TOP")
       l2_clines = setof(a clines a->layer == "CONDUCTOR/BOTTOM)
       l1_lines = l1_clines~>segments~>startEnd
       l2_lines = l2_clines~>segments~>startEnd
       _xSecList= list()
       foreach(a l1_clines foreach(b l2_clines _xSecList = cons(axl_ol_ol2(car(a->segments)->startEnd  car(b->segments)->startEnd) _xSecList)))

       foreach(a _xSecList axlDBCreateVia("VIA1", car(a), nil, nil)
     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • arealist
    arealist over 13 years ago
    Thanks for your post.Here I was trying to search for a code and I found it here.Thanks! Gulf coast claims
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
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