• 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. To change the rectangle area

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 14134
  • 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

To change the rectangle area

naresh9005
naresh9005 over 4 years ago

Hi

we are trying to write skill script to change the rectangle area as required in a particular direction selected by user. for example if i have a MET1 rectangle with 10u width and 10u Hight , now my rectangle area will be 100usq. if the user wants to change the area to 150usq in the partially selected direction then rectangle should grow in that direction. if the user partially selected  top side of the rectangle then Hight should be 15u and width should be 10u, now the total area will be 150usq.

I am trying below code which is not completed, and i am trying to get the partially selected coordinates by using "geGetSelSetFigPoin()" but it is not returning any coordinates. 

could you please help me with full skill script . 

procedure(recArea()
cv=geGetEditCellView()
;wid=geGetCellViewWindow(cv) \\\to get the window ID.
cr= geGetSelectedSet()
;scr=cadr(cr)
ccr=car(cr)
sp= geGetSelSetFigPoint(ccr)
x=ccr~>objType
if(ccr~>objType == "rect" then
print("seleted obj is rectongal")t
cbBox=ccr~>bBox
left=car(car( cbBox ))
bottom=cadr(car(cbBox))
right=car(cadr(cbBox))
top=cadr(cadr(cbBox))
area=(right-left)*(bottom-top)
printf("\n area of the rectongal is = %10.2f.\n " area )
)
;geSubSelectPoint( wid t list(0:0))
)

recArea()

  • Cancel
Parents
  • mbracht
    mbracht over 4 years ago

    Hi,

    It worked for me after I changed bottom-top to top-bottom and removed the trailing 't' of the print statement

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naresh9005
    naresh9005 over 4 years ago in reply to mbracht

    Thank you , I am not trying to find the area of the rectangle, instead i am trying to change the area as user mentioned in particular direction as mention in the problem statement. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 4 years ago in reply to naresh9005

    Then I don't understand your code at all. It doesn't do any recomputation of the rectangle. And why do you assign geGetSelSetFigPoint(ccr) to a variable named sp and then never use that variable again.
    Anyway - I take it that you want to resize a rectangle by stretching it in a direction that is determined by the selected edge - correct?
    But where is the information about the new area (150u in your example) coming from? I think you need to be a little more specific about the actual requirement.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • naresh9005
    naresh9005 over 4 years ago in reply to mbracht

    Thanks for you replay.

    yes, I want to resize the rectangle by stretching it in a direction that is determined by the selected edge and  new area should be given as input to the script.

               I am beginner to skill scripting and currently my script can only calculate rectangle area it does not have information about the new area.

              could you please help me,  how can I give new area as input to the script and resize the rectangle according to selected direction.

    Regards 

    Naresh 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • naresh9005
    naresh9005 over 4 years ago in reply to mbracht

    Thanks for you replay.

    yes, I want to resize the rectangle by stretching it in a direction that is determined by the selected edge and  new area should be given as input to the script.

               I am beginner to skill scripting and currently my script can only calculate rectangle area it does not have information about the new area.

              could you please help me,  how can I give new area as input to the script and resize the rectangle according to selected direction.

    Regards 

    Naresh 

    • 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