Inheritance diagram for oaArc:
Public Methods | |
void | getEllipseBBox (oaBox &bBox) const |
oaDouble | getStartAngle () const |
oaDouble | getStopAngle () const |
void | getPoints (oaPointArray &points, oaUInt4 numSegs=10) const |
void | set (const oaBox &ellipseBBox, oaDouble startAngle, oaDouble stopAngle) |
oaLine * | convertToLine (oaUInt4 numSides=16) |
Static Public Methods | |
oaArc * | create (oaBlock *block, oaLayerNum layerNum, oaPurposeNum purposeNum, const oaBox &ellipseBBox, oaDouble startAngle, oaDouble stopAngle) |
void | calcArc (const oaPoint &p1, const oaPoint &p2, const oaPoint &p3, oaBox &ellipseBBox, oaDouble &startAngle, oaDouble &stopAngle) |
void | calcArc (const oaBox &ellipseBBox, oaBox &bBox, oaDouble &startAngle, oaDouble &stopAngle) |
void | calcBBox (const oaBox &ellipseBBox, oaDouble startAngle, oaDouble stopAngle, oaBox &bBox) |
void | genPoints (const oaBox &ellipseBBox, oaDouble startAngle, oaDouble stopAngle, oaUInt4 numEdges, oaPointArray &boundary) |
How Arcs are Specified in OpenAccess
In OpenAccess, arc angles are specified in positive radians, and are defined counterclockwise from a reference line that emanates from the center of the ellipse on which the arc is defined (at the intersection of imaginary x/y axes that pass through the ellipse center point). The positive (right-side) x axis is at 0 radians; the positive (upper) y axis is at pi/2 radians; and the left x axis is at pi radians.
The figures below show two arc segments, each with a sweep angle (stop angle minus start angle) that does not exceed pi radians (180 degrees). Note that the figures also depict a bounding box for each arc segment -- this is a box that fully encloses the arc segment and intersects the arc at its start and stop angles. This arc bounding box, together with the ellipse bounding box, can be input to oaArc::calcArc to obtain the arc start and stop angles for input to the oaArc::create function. Also, oaArc::calcBBox will return the arc bounding box when passed the ellipse bounding box and the arc start and stop angles.
Any arc sweep angle generated from calcArc is equal to or less than pi radians (equal to or less than 180 degrees). This is to avoid ambiguity in the interpretation of the calcArc arguments. However, the start angle and stop angles supplied to oaArc::create can have any values, positive, negative, or zero. These angles are normalized to [0,2pi). The start and stop angles cannot be equivalent (zero length arcs are not allowed).
|
This utility function takes the specified ellipse bounding box and arc bounding box as input parameters and fills in the startAngle and stopAngle parameters (these latter two parameters along with the ellipseBBox are needed to create an arc with oaArc::create). The input parameters are checked to verify that they represent a valid arc. The arc sweep angle, which is the stop angle minus the start angle, generated from this function is equal to or less than pi radians (equal to or less than 180 degrees). This is to avoid ambiguity in the interpretation of the calcArc arguments.
|
|
This utility function converts input points, p1, p2, and p3 into return parameters, ellipseBBox, startAngle, and stopAngle. The returned values are needed to create an arc with oaArc::create. OpenAccess verifies that the three input points represent a valid arc. The order in which the points are supplied is not relevant. OpenAccess determines the appropriate return parameters based on the rules for arc sweep angles. Refer to How Arcs are Specified in OpenAccess for more information. The arc sweep angle, which is the stop angle minus the start angle, generated from this function is equal to or less than pi radians (equal to or less than 180 degrees). This is to avoid ambiguity in the interpretation of the calcArc arguments.
|
|
This utility function calculates and returns the bBox of an arc (the arc bounding box) based on the specified ellipseBBox, startAngle and stopAngle parameters. The input parameters are checked to verify they represent a valid arc.
|
|
This function converts this arc to an oaLine using the specified number of sides.
|
|
This function creates an arc in the specified block with the specified layer/purpose pair using the specified ellipseBBox, startAngle, and endAngle parameters. The latter three parameters are checked to verify that they represent a valid arc. Note that the ellipseBBox cannot be arealess. The start angle and stop angle can have any values, positive, negative, or zero. These angles are normalized to [0,2pi). The start and stop angles cannot be equivalent (zero length arcs are not allowed).
|
|
This function calculates and returns a point array in points that delineates the arc specified by the ellipseBBox, startAngle, and stopAngle parameters. The number of edges delineated by the point array are specified by numEdges. The point array delineates the arc by representing it as a sequence of points connecting virtual line segments that approximate the arc. See oaArc::getPoints for a function that generates and returns a point array that delineates an existing oaArc object.
|
|
This function returns the ellipse bounding box associated with this arc.
|
|
This function returns a point array that delineates this arc. numSegs specifies the number of segments to use to delineate the arc, and determines the number of points returned in the pointArray -- specifically, the returned pointArray will contain numSegs+1 points. See oaArc::genPoints for a static function that generates and returns a point array that delineates an arc for a specified set of arc parameters.
|
|
This function retrieves the start angle of this arc in radians. |
|
This function retrieves the stop angle of this arc in radians. |
|
This function resets the ellipse bBox and start/stop angles of this arc to the specified values.
|
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.