oaConnFig
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaConnFig 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaConnFig 当前在 oapy 中可用的 Python 接口。
详细说明
The oaConnFig class is an abstract class that is the base for all OpenAccess database figures that can represent connectivity, including pinFigs, guides and routes。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.hasNet() |
| ✅ | obj.getNet() |
| ✅ | obj.addToNet(net) |
| ✅ | obj.removeFromNet() |
方法说明
obj.hasNet()
绑定状态: 已绑定
Python 调用: obj.hasNet()
This function returns a boolean value that indicates whether this figure implements a net。
Python 示例
from oapy._oa import _design
# assume obj is a oaConnFig
obj.hasNet()
obj.getNet()
绑定状态: 已绑定
Python 调用: obj.getNet()
This function returns the net this figure implements。 If this figure does not implement a net, NULL is returned。 Note that this function returns a net if the shape is directly assigned to a net or if the shape is in a route that is assigned to a net。 If the shape belongs to a pin, it does not return a net but returns NULL 。
Python 示例
from oapy._oa import _design
# assume obj is a oaConnFig
obj.getNet()
obj.addToNet(net)
绑定状态: 已绑定
Python 调用: obj.addToNet(net)
This function adds this figure to the specified net。 If this figure is already connected to another net, it is detached from the other net first。
参数
net: The net to attach to the figure。
异常
oacNetFigNotInSameBlock。oacCannotAddFigToImplicitNet。oacCannotAddPinFigToNet。oacCannotAddRouteFigToNet。oacCannotAddViaToNonBitNet。oacCannotAddSteinerToNonBitNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaConnFig
obj.addToNet(net)
obj.removeFromNet()
绑定状态: 已绑定
Python 调用: obj.removeFromNet()
This function removes this figure from the net to which it is attached。 If this figure is not attached to a net, this function does nothing。
异常
oacCannotRemoveRouteFigFromNet。
Python 示例
from oapy._oa import _design
# assume obj is a oaConnFig
obj.removeFromNet()