• 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. Custom IC SKILL
  3. Getting Path Properties Whilst Being Placed

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 11664
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Getting Path Properties Whilst Being Placed

kdolan
kdolan over 4 years ago

Hi,

I want to create a function that can obtain a paths bounding box whilst the user is still placing the path.  i.e. the user has used the create path command and is adding path points, but has not clicked the enter key yet to fully place the path object.

I've tried using geGetSelSet() but it returns nil because I guess the path is not 'selected', and instead is still being created. I've been looking around and haven't come across a function or method that can do this.

Any ideas or input is appreciated!

Thanks in advance for any help.

Keelan

  • Cancel
Parents
  • ebecheto
    ebecheto over 4 years ago

    Hi kdolan,

    You found what you need with the graphical tool.

    But for the sake of the questions, i find interesting to share with you a way to do it in skill.

    defun(bBox2array (@optional (bBox list(0:1 2:3))) let((X0 Y0 X1 Y1)
    X0=caar(bBox);=> 0
    Y0=cadar(bBox);=> 1
    X1=caadr(bBox);=> 2
    Y1=cadadr(bBox);=> 3
    list(X0:Y0 X1:Y0 X1:Y1 X0:Y1)))
    
    procedure( trBBoxIntersection( bBoxList )
        let( ( llxList llyList 
            urxList     uryList
            maxllx      maxlly
            minurx      minury      )
            llxList = foreach( mapcar bBox bBoxList
                xCoord( lowerLeft( bBox )))
            llyList = foreach( mapcar bBox bBoxList
                yCoord( lowerLeft( bBox )))
            urxList = foreach( mapcar bBox bBoxList
                xCoord( upperRight( bBox )))
            uryList = foreach( mapcar bBox bBoxList
                yCoord( upperRight( bBox )))
            minurx = apply( 'min urxList )
            minury = apply( 'min uryList )
            maxllx = apply( 'max llxList )
            maxlly = apply( 'max llyList )
            cond(
                ( maxllx >= minurx nil )
                ( maxlly >= minury nil )
                ( t
                    list( maxllx:maxlly minurx:minury ))
                ) ; cond
          ) ; let
    ) ; procedure
    
    
    cv=geGetWindowCellView()
    techFile = techGetTechFile(cv)
    constraintGroupId = cstFindConstraintGroupIn(techFile "virtuosoDefaultSetup")
    myViaOptions = viaGetViaOptions(constraintGroupId)
    myViaOptions~>createInRoute = nil
    
    
    path1=dbCreatePath(cv "M1" list(0:0 0:50 ) 10)
    path2=dbCreatePath(cv "M2" list(-20:20 20:20 ) 12)
    path1~>bBox;=> ((-5.0 0.0) (5.0 50.0))
    path2~>bBox;=> ((-20.0 14.0) (20.0 26.0))
    
    bBox=trBBoxIntersection(list(path1~>bBox path2~>bBox));=> ((-5.0 14.0) (5.0 26.0))
    array=bBox2array(bBox);=> ((-5.0 14.0) (5.0 14.0) (5.0 26.0) (-5.0 26.0))
    viaGenerateViasInArea(cv array myViaOptions);=> output lot of blabla in virtuoso
    

    Hope it helps,

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ebecheto
    ebecheto over 4 years ago

    Hi kdolan,

    You found what you need with the graphical tool.

    But for the sake of the questions, i find interesting to share with you a way to do it in skill.

    defun(bBox2array (@optional (bBox list(0:1 2:3))) let((X0 Y0 X1 Y1)
    X0=caar(bBox);=> 0
    Y0=cadar(bBox);=> 1
    X1=caadr(bBox);=> 2
    Y1=cadadr(bBox);=> 3
    list(X0:Y0 X1:Y0 X1:Y1 X0:Y1)))
    
    procedure( trBBoxIntersection( bBoxList )
        let( ( llxList llyList 
            urxList     uryList
            maxllx      maxlly
            minurx      minury      )
            llxList = foreach( mapcar bBox bBoxList
                xCoord( lowerLeft( bBox )))
            llyList = foreach( mapcar bBox bBoxList
                yCoord( lowerLeft( bBox )))
            urxList = foreach( mapcar bBox bBoxList
                xCoord( upperRight( bBox )))
            uryList = foreach( mapcar bBox bBoxList
                yCoord( upperRight( bBox )))
            minurx = apply( 'min urxList )
            minury = apply( 'min uryList )
            maxllx = apply( 'max llxList )
            maxlly = apply( 'max llyList )
            cond(
                ( maxllx >= minurx nil )
                ( maxlly >= minury nil )
                ( t
                    list( maxllx:maxlly minurx:minury ))
                ) ; cond
          ) ; let
    ) ; procedure
    
    
    cv=geGetWindowCellView()
    techFile = techGetTechFile(cv)
    constraintGroupId = cstFindConstraintGroupIn(techFile "virtuosoDefaultSetup")
    myViaOptions = viaGetViaOptions(constraintGroupId)
    myViaOptions~>createInRoute = nil
    
    
    path1=dbCreatePath(cv "M1" list(0:0 0:50 ) 10)
    path2=dbCreatePath(cv "M2" list(-20:20 20:20 ) 12)
    path1~>bBox;=> ((-5.0 0.0) (5.0 50.0))
    path2~>bBox;=> ((-20.0 14.0) (20.0 26.0))
    
    bBox=trBBoxIntersection(list(path1~>bBox path2~>bBox));=> ((-5.0 14.0) (5.0 26.0))
    array=bBox2array(bBox);=> ((-5.0 14.0) (5.0 14.0) (5.0 26.0) (-5.0 26.0))
    viaGenerateViasInArea(cv array myViaOptions);=> output lot of blabla in virtuoso
    

    Hope it helps,

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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