• 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 Design
  3. Area measurement in Virtuoso

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 124
  • Views 14847
  • 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

Area measurement in Virtuoso

archive
archive over 18 years ago

Hi all,
Is there a way to get the area of a non rectangular selected shape on a given layer in Virtuoso ?
Thanks in advance !
Best regards
Herve


Originally posted in cdnusers.org by hm001
  • Cancel
  • archive
    archive over 18 years ago

    Herve,

    Look at sourcelink solutions 11091704, 11248454 and 11328674 .

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Here is the basic formula from: http://www.geometryalgorithms.com/Archive/algorithm_0101/algorithm_0101.htm#area2D_polygon() // area2D_Polygon(): computes the area of a 2D polygon // Input: int n = the number of vertices in the polygon // Point* V = an array of n+2 vertices // with V[n]=V[0] and V[n+1]=V[1] // Return: the (float) area of the polygon float area2D_Polygon( int n, Point* V ) { float area = 0; int i, j, k; // indices for (i=1, j=2, k=0; i<=n; i++, j++, k++) { area += V[i].x * (V[j].y - V[k].y); } return area / 2.0; } Here is some simple skill: procedure(getObjectArea(obj) let(((area 0.0) sum lastPt firstPt crdList dx dy) case(obj~>shape ("polygon" sum = 0 crdList = obj~>path firstPt = lastPt = car(crdList) foreach(crd cdr(crdList) sum = sum + ((xCoord(crd) - xCoord(lastPt)) * (yCoord(crd) + yCoord(lastPt))) lastPt = crd ) sum = sum + ((xCoord(firstPt) - xCoord(lastPt)) * (yCoord(firstPt) + yCoord(lastPt))) area = area + (0.5 * abs(sum)) ) ("rectangle" dx = xCoord(car(obj~>bBox)) - xCoord(cadr(obj~>bBox)) dy = yCoord(car(obj~>bBox)) - yCoord(cadr(obj~>bBox)) area = area + abs( dx * dy ) ) ) float(area) ) )


    Originally posted in cdnusers.org by dmay
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Try Again:

    procedure(MSutGetObjectArea(obj)
        let(((area 0.0) sum lastPt firstPt crdList dx dy)
    	case(obj~>shape
    	    ("polygon"
    		sum = 0
    		crdList = obj~>path
    		firstPt = lastPt = car(crdList)
    		foreach(crd cdr(crdList)
    		    sum = sum + ((xCoord(crd) - xCoord(lastPt))
    			* (yCoord(crd) + yCoord(lastPt)))
    		    lastPt = crd
    		)
    		sum = sum + ((xCoord(firstPt) - xCoord(lastPt))
    		    * (yCoord(firstPt) + yCoord(lastPt)))
    		area = area + (0.5 * abs(sum))
    	    )
    	    ("rectangle"
    		dx = xCoord(car(obj~>bBox)) - xCoord(cadr(obj~>bBox))
    		dy = yCoord(car(obj~>bBox)) - yCoord(cadr(obj~>bBox))
    		area = area + abs( dx * dy )
    	    )
    	)
    	float(area)
        )
    )
    
    
    
    procedure(MSutGetObjectArea(obj)
        let(((area 0.0) sum lastPt firstPt crdList dx dy)
    	case(obj~>shape
    	    ("polygon"
    		sum = 0
    		crdList = obj~>path
    		firstPt = lastPt = car(crdList)
    		foreach(crd cdr(crdList)
    		    sum = sum + ((xCoord(crd) - xCoord(lastPt))
    			* (yCoord(crd) + yCoord(lastPt)))
    		    lastPt = crd
    		)
    		sum = sum + ((xCoord(firstPt) - xCoord(lastPt))
    		    * (yCoord(firstPt) + yCoord(lastPt)))
    		area = area + (0.5 * abs(sum))
    	    )
    	    ("rectangle"
    		dx = xCoord(car(obj~>bBox)) - xCoord(cadr(obj~>bBox))
    		dy = yCoord(car(obj~>bBox)) - yCoord(cadr(obj~>bBox))
    		area = area + abs( dx * dy )
    	    )
    	)
    	float(area)
        )
    )
    
    
    
    <\pre>


    Originally posted in cdnusers.org by dmay
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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