oaPathSeg
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaPathSeg 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaPathSeg 当前在 oapy 中可用的 Python 接口。
详细说明
The oaPathSeg class is a specialization of the oaShape class and is used to realize physical routing segments that can either be orthogonal or diagonal。 oaPathSeg objects can be used stand-alone or they can be made a component of an oaRoute object。 The former case represents the geometric routing case while the latter represents symbolic routing。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getRoute() |
| ✅ | obj.getPoints(beginPoint, endPoint) |
| ✅ | obj.getStyle(style) |
| ✅ | obj.getRouteTopology() |
| ✅ | obj.getBoundary(boundary) |
| ✅ | obj.isOrthogonal() |
| ✅ | obj.hasRoute() |
| ✅ | obj.setPoints(beginPoint, endPoint) |
| ✅ | obj.setStyle(style) |
| ✅ | obj.setRouteTopology(topology) |
| ✅ | _design.oaPathSeg.create(block, layerNum, purposeNum, beginPoint, endPoint, style) |
| ✅ | _design.oaPathSeg.genBoundary(beginPoint, endPoint, style, boundary) |
方法说明
obj.getRoute()
绑定状态: 已绑定
Python 调用: obj.getRoute()
This function returns a pointer to the route to which this pathSeg may belong。 A NULL is returned if this pathSeg is not part of a route。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.getRoute()
obj.getPoints(beginPoint, endPoint)
绑定状态: 已绑定
Python 调用: obj.getPoints(beginPoint, endPoint)
This function gets the begin and end points of an oaPathSeg object。 The two points specify the centerline of the oaPathSeg。
参数
beginPoint: The beginning point of the oaPathSeg。endPoint: The ending point of the oaPathSeg。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.getPoints(beginPoint, endPoint)
obj.getStyle(style)
绑定状态: 已绑定
Python 调用: obj.getStyle(style)
This function populates 'style' with the segStyle of this pathSeg。
参数
style: A reference to an oaSegStyle object to be populated。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.getStyle(style)
obj.getRouteTopology()
绑定状态: 已绑定
Python 调用: obj.getRouteTopology()
This function returns the current routing topology of this pathSeg。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.getRouteTopology()
obj.getBoundary(boundary)
绑定状态: 已绑定
Python 调用: obj.getBoundary(boundary)
This function constructs a boundary with the polygonal outline of the pathSeg。 This function is useful for overlap checks with the pathSeg, and to render what the pathSeg looks like。
参数
boundary: The generated boundary point array。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.getBoundary(boundary)
obj.isOrthogonal()
绑定状态: 已绑定
Python 调用: obj.isOrthogonal()
This function returns a boolean value that indicates if the points for the oaPathSeg are orthogonal。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.isOrthogonal()
obj.hasRoute()
绑定状态: 已绑定
Python 调用: obj.hasRoute()
This function returns true if this pathSeg is part of a route; otherwise it returns false。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.hasRoute()
obj.setPoints(beginPoint, endPoint)
绑定状态: 已绑定
Python 调用: obj.setPoints(beginPoint, endPoint)
This function sets the beginning and ending points of the oaPathSeg to the specified points。 The two points are checked to verify that the length of the segment is greater than zero and that the oaPathSeg remains horizontal, vertical, or diagonal。
参数
beginPoint: The beginning point for the oaPathSeg。endPoint: The ending point for the oaPathSeg。
异常
oacInvalidPathSegPoints。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.setPoints(beginPoint, endPoint)
obj.setStyle(style)
绑定状态: 已绑定
Python 调用: obj.setStyle(style)
This function sets the segStyle of this pathSeg to the specified value。 This style will determine the size and shape of the extension at each end of the segment (see oaSegStyle )。
参数
style: The oaSegStyle object used to update this pathSeg。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.setStyle(style)
obj.setRouteTopology(topology)
绑定状态: 已绑定
Python 调用: obj.setRouteTopology(topology)
This function sets the routeTopology of this pathSeg to the specified topology。
参数
topology: An oaRouteTopology object used to update this pathSeg。
Python 示例
from oapy._oa import _design
# assume obj is a oaPathSeg
obj.setRouteTopology(topology)
_design.oaPathSeg.create(block, layerNum, purposeNum, beginPoint, endPoint, style)
绑定状态: 已绑定
Python 调用: _design.oaPathSeg.create(block, layerNum, purposeNum, beginPoint, endPoint, style)
This function creates an oaPathSeg object with the given attributes。 The specified begin and end points are checked to verify that the segment will be horizontal, vertical, or diagonal and that the length of the segment will be greater than zero。
参数
block: The block in which the oaPathSeg is created。layerNum: The number of the layer on which the oaPathSeg is created。purposeNum: The number of the layer purpose for the oaPathSeg。beginPoint: The beginning point for the oaPathSeg。endPoint: The ending point for the oaPathSeg。style: A reference to an oaSegStyle object that defines the style for the segment。
异常
oacInvalidPathSegPoints。
Python 示例
from oapy._oa import _design
_design.oaPathSeg.create(block, layerNum, purposeNum, beginPoint, endPoint, style)
_design.oaPathSeg.genBoundary(beginPoint, endPoint, style, boundary)
绑定状态: 已绑定
Python 调用: _design.oaPathSeg.genBoundary(beginPoint, endPoint, style, boundary)
This function fills out boundary with the boundary polygon of a virtual pathSeg that could be realized with the specified attributes without having to create an actual pathSeg object。
参数
beginPoint: The begin point for the virtual pathSeg。endPoint: The end point for the virtual pathSeg。style: The segStyle to use for the virtual pathSeg。boundary: The point array that will get populated with the boundary points。
异常
oacInvalidPathSegPoints。
Python 示例
from oapy._oa import _design
_design.oaPathSeg.genBoundary(beginPoint, endPoint, style, boundary)