oaEllipse
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaEllipse 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaEllipse 当前在 oapy 中可用的 Python 接口。
详细说明
The oaEllipse class implements an ellipse shape。 Ellipses are defined by their bounding boxes。 A circle is a special case of an ellipse where the bounding box is square。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getBoundary(points, numSides) |
| ✅ | obj.setBBox(bBoxIn) |
| ✅ | obj.convertToPolygon(numSides=32) |
| ✅ | _design.oaEllipse.create(block, layerNum, purposeNum, bBox) |
| ✅ | _design.oaEllipse.genBoundary(ellipseBBox, numSides, boundary) |
方法说明
obj.getBoundary(points, numSides)
绑定状态: 已绑定
Python 调用: obj.getBoundary(points, numSides)
This function fills out points with the bounding polygon of this ellipse。 The polygon is generated with the number of sides specified by numSides。
参数
points: The location for the returned array of points for the ellipse。numSides: The number of sides that define the bounding polygon。
异常
oacEllipseNumSidesInvalid。
Python 示例
from oapy._oa import _design
# assume obj is a oaEllipse
obj.getBoundary(points, numSides)
obj.setBBox(bBoxIn)
绑定状态: 已绑定
Python 调用: obj.setBBox(bBoxIn)
This function sets the bBox of this ellipse to the specified value。
参数
bBoxIn: The specified bounding box for the ellipse。
异常
oacEllipseBBoxInvalid。
Python 示例
from oapy._oa import _design
# assume obj is a oaEllipse
obj.setBBox(bBoxIn)
obj.convertToPolygon(numSides=32)
绑定状态: 已绑定
Python 调用: obj.convertToPolygon(numSides=32)
This function converts this ellipse to a polygon using the specified number of sides。 The polygon is returned, although it is the same pointer as the ellipse。
参数
numSides: The number of segments to represent the ellipse as a polygon。
异常
oacEllipseNumSidesInvalid。
Python 示例
from oapy._oa import _design
# assume obj is a oaEllipse
obj.convertToPolygon(numSides=32)
_design.oaEllipse.create(block, layerNum, purposeNum, bBox)
绑定状态: 已绑定
Python 调用: _design.oaEllipse.create(block, layerNum, purposeNum, bBox)
This function creates an ellipse with the specified attributes。 The specified bBox is checked to verify it does not have a zero area and it is not inverted。
参数
block: The block in which the ellipse is created。layerNum: The number of the layer on which the ellipse is created。purposeNum: The number of the purpose on which the ellipse is created。bBox: The bounding box for the ellipse。
异常
oacEllipseBBoxInvalid。
Python 示例
from oapy._oa import _design
_design.oaEllipse.create(block, layerNum, purposeNum, bBox)
_design.oaEllipse.genBoundary(ellipseBBox, numSides, boundary)
绑定状态: 已绑定
Python 调用: _design.oaEllipse.genBoundary(ellipseBBox, numSides, boundary)
This function fills out boundary with the boundary polygon of the ellipse specified by ellipseBBoxIn。 The polygon is generated with the number of sides specified by numSidesIn。
参数
ellipseBBox: The bounding box for the ellipse。numSides: The number of sides returned。boundary: The location of the returned point array。
异常
oacEllipseNumSidesInvalid。
Python 示例
from oapy._oa import _design
_design.oaEllipse.genBoundary(ellipseBBox, numSides, boundary)