• 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. How to get points from pathSeg ?

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 144
  • Views 15588
  • 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

How to get points from pathSeg ?

skillProgram14
skillProgram14 over 11 years ago

Hi,

I made simple script which put automaticaly ruller on all selected pathes.

But if the path is created as pathSeg I have a problem to get the points.

There are just beginPt and endPt for each segment. :( 

Is there anybody who can help me with it ?

The script should do same as for pathes:

(if you select couple of pathes and call script....it puts ruller on each of selected pathes)

procedure( Ruler_on_Path()
prog((winId cvId selObj)
winId = hiGetCurrentWindow()
cvId = getEditRep(winId)
selObj = geGetSelSet(cvId)
if(selObj then
        foreach(shape selObj
                case( shape~>objType                  
                ("path"
                points = shape~>path
                leCreateRuler(cvId points)
                )
                );case
                );foreach
                );if
    );prog
);procedure

 

Thanks for any advice.

Robert

 

 

  • Cancel
Parents
  • Li Ting
    Li Ting over 11 years ago

    The beginPt and endPt attributes are what define the legnth of a pathSeg object. In other words, a pathSeg is always have only two points.
     
    If you create a 'U' shaped path, you created one database object with 4 points.
     
    If you create the same 'U' shaped wire (implemented by pathSeg), you have acutally created three pathSeg objects. You will see that each of these pathSeg objects belong to the same 'route' object (an attribute on the pathSeg object).
     
    In order to replicate what you have done for path, you should process the selected set based on pathSeg's route value and build up a point list that represent the whole 'route' object (the U shape).
     
    Assume x is one of the pathSeg object, the following statement will give you the point list for this route object.
     
    append( x~>route~>objects~>beginPt  last(x~>route)~>endPt ) 
     
    You still need to modify the foreach loop so you only generate one ruler for each route.
     
    Li 
     
    ps. I don't know is there already a public SKILL API for getting the points for a route object. 
     
      
     
     
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Li Ting
    Li Ting over 11 years ago

    The beginPt and endPt attributes are what define the legnth of a pathSeg object. In other words, a pathSeg is always have only two points.
     
    If you create a 'U' shaped path, you created one database object with 4 points.
     
    If you create the same 'U' shaped wire (implemented by pathSeg), you have acutally created three pathSeg objects. You will see that each of these pathSeg objects belong to the same 'route' object (an attribute on the pathSeg object).
     
    In order to replicate what you have done for path, you should process the selected set based on pathSeg's route value and build up a point list that represent the whole 'route' object (the U shape).
     
    Assume x is one of the pathSeg object, the following statement will give you the point list for this route object.
     
    append( x~>route~>objects~>beginPt  last(x~>route)~>endPt ) 
     
    You still need to modify the foreach loop so you only generate one ruler for each route.
     
    Li 
     
    ps. I don't know is there already a public SKILL API for getting the points for a route object. 
     
      
     
     
    • 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