oaPath Class Reference

Inheritance diagram for oaPath:

oaShape oaPinFig oaConnFig oaFig oaBlockObject oaDesignObject oaObject


Public Methods

oaDist getWidth () const
oaUInt4 getNumPoints () const
void getPoints (oaPointArray &points) const
oaPathStyle getStyle () const
oaDist getBeginExt () const
oaDist getEndExt () const
void getBoundary (oaPointArray &boundary) const
oaBoolean isOrthogonal () const
void setWidth (oaDist width)
void setPoints (const oaPointArray &points)
void setStyle (oaPathStyle style)
void setBeginExt (oaDist beginExt)
void setEndExt (oaDist endExt)
oaPolygonconvertToPolygon ()

Static Public Methods

oaPath * create (oaBlock *block, oaLayerNum layerNum, oaPurposeNum purposeNum, oaDist width, const oaPointArray &points, oaPathStyle style=oacTruncatePathStyle, oaDist beginExt=0, oaDist endExt=0)
void genBoundary (const oaPointArray &points, oaDist width, oaPathStyle style, oaDist beginExt, oaDist endExt, oaPointArray &boundary)

Detailed Description

The oaPath class implements the oaPath object, which derives from the oaShape class. An oaPath object represents a path that contains a point array and has certain width and style represented by oaPathStyle.

Two coincident and three collinear points are illegal, and an exception is thrown if these combinations are detected. You can use oaPointArray::compress() to remove these combinations. For more information on coincident and collinear points, see oaPointArray::compress()

Paths that have segments whose length is less than half the width of the path might have self-intersecting boundaries. These boundaries might have unexpected geometry.


Member Function Documentation

oaPolygon * oaPath::convertToPolygon  
 

This function converts this path object to a polygon object. The resulting polygon is equivalent to the outline of the path. All path attributes are discarded after the object conversion is complete. Pointers to the path are still valid, but point to the new polygon.

oaPath * oaPath::create oaBlock *    block,
oaLayerNum    layerNum,
oaPurposeNum    purposeNum,
oaDist    width,
const oaPointArray &    points,
oaPathStyle    style = oacTruncatePathStyle,
oaDist    beginExt = 0,
oaDist    endExt = 0
[static]
 

This function creates an oaPath object with the given attributes. The specified pointArray is checked to verify that there are at least two points and no collinear or coincident points. The begin or end extension arguments must be both zero if the style is not variable.

Parameters:
block The block in which the oaPath is created
layerNum The number of the layer on which the oaPath is created
purposeNum The number of the layer purpose for the oaPath
width The oaPath width
points The array of points for the oaPath
style An enum value that defines the oaPath style
beginExt The beginning extension of the oaPath; this value must be 0 (zero) for styles other than oacVariablePathStyle
endExt The ending extension of the oaPath; this value must be 0 (zero) for styles other than oacVariablePathStyle
Exceptions:
oacPathTooFewPoints 
oacPathHasExtraPoints 
oacInvalidPathExtensionValue 

void oaPath::genBoundary const oaPointArray &    points,
oaDist    width,
oaPathStyle    style,
oaDist    beginExt,
oaDist    endExt,
oaPointArray &    boundary
[static]
 

This function constructs a boundary with the polygonal outline of the path using the specified parameters. This function is useful for determining what a path overlaps before the path is actually created. Another common use is to render the outline of a path before the path is created.

Parameters:
points The points that define the centerline of the oaPath
width The oaPath width
style The oaPath style (an enum value between zero and four)
beginExt The beginning extension of the oaPath
endExt The ending extension of the oaPath
boundary The generated boundary point array
Exceptions:
oacPathTooFewPoints 
See also:
getBoundary()

oaUInt4 oaPath::getBeginExt   const
 

This function returns the beginning extension of an oaPath in database units. By definition, the extension is zero if the oaPathStyle is anything other than oacVariablePathStyle.

Returns:
An oaUInt4 that is the beginning extension of the oaPath, in database units

void oaPath::getBoundary oaPointArray &    boundary const
 

This function constructs a boundary with the polygonal outline of the path. This function is useful for overlap checks with the path, and to render what the path looks like.

Parameters:
boundary The generated boundary point array
See also:
genBoundary()

oaUInt4 oaPath::getEndExt   const
 

This function returns the ending extension of an oaPath in database units. By definition, the extension is zero if the oaPathStyle is anything other than oacVariablePathStyle.

Returns:
An oaUInt4 that is the ending extension of the oaPath, in database units

oaUInt4 oaPath::getNumPoints   const
 

This function returns the number of points in the oaPath, which is the number after the oaPath is compressed by oaPath::create().

void oaPath::getPoints oaPointArray &    points const
 

This function gets the point array of an oaPath object. The point array consists of the points along the centerline of the oaPath after the oaPath is compressed by oaPath::create().

Parameters:
points The pointArray of the oaPath after compression
Returns:
Void

oaPathStyle oaPath::getStyle   const
 

This function returns the style of the oaPath.

Returns:
oaPathStyle

oaUInt4 oaPath::getWidth   const
 

This function returns the width of this oaPath in database units.

oaBoolean oaPath::isOrthogonal   const
 

This function returns a boolean value that indicates if the point array for the oaPath is orthogonal.

void oaPath::setBeginExt oaDist    beginExt
 

This function sets the beginning extension for an oaPath that has the oacVariablePathStyle.

Parameters:
beginExt The value of the beginning extension for the oaPath, in database units
Exceptions:
oacInvalidPathExtensionValue 

void oaPath::setEndExt oaDist    endExt
 

This function sets the ending extension for the oaPath to the specified value.

Parameters:
endExt The value of the ending extension for the oaPath in database units
Exceptions:
oacInvalidPathExtensionValue 

void oaPath::setPoints const oaPointArray &    points
 

This function sets the points of the oaPath with the specified point array. The point array is first compressed to remove collinear and coincident points, then is checked to verify that at least two points remain.

Parameters:
points A point array that defines the centerline of the oaPath
Exceptions:
oacPathHasExtraPoints 
oacPathTooFewPoints 

void oaPath::setStyle oaPathStyle    style
 

This function sets the oaPathStyle value.

void oaPath::setWidth oaDist    width
 

This function sets the width of the oaPath to the specified value.

Parameters:
width The width value of the oaPath, in database units


The documentation for this class was generated from the following files:

Return to top of page