oaShapeQuery
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaShapeQuery 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaShapeQuery 当前在 oapy 中可用的 Python 接口。
详细说明
The oaShapeQuery is used to examine and return shapes in oaVias and oaDesigns。 Note that stepping into a Via counts as a level of hierarchy。 Hence to use oaShapeQuery to find the pin shapes in the master for an instTerm, the query should descend two levels: the first level descends to the master, and the second level will be traversed if the pin contains an oaVia 。 The sequence of virtual functions that get called during the query is as follows。 oaShapeQuery::queryShape(oaShape shape) - For shapes in a design oaRegionQuery::startRef(oaRef ref, oaUInt4 row, oaUInt4 col) oaShapeQuery::queryShape(oaShape shape) - For shapes in the oaRef that is being processed。 oaRegionQuery::endRef(oaRef ref, oaUInt4 row, oaUInt4 col) The query descends the hierachy of an oaRef , if the maximum dimension of the ref's master is The query descends the hierarchy of an oaRef , if the maximum dimension of the ref's master is The query descends the hierarchy of an oaRef if the maximum dimension of the ref's master is larger than the filter size of the query and if the startRef function call returns true for that ref。 If then produces shapes recursively in its hierarchy。 endRef function for an oaRef gets called if the query descends into its hierarchy。 See documentation on startRef and endRef for additional information。
构造函数
_design.oaShapeQuery()
obj = _design.oaShapeQuery()
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getLayerNum() |
| ✅ | obj.getPurposeNum() |
| ✅ | obj.query(topDesign, layerNum, purposeNum, region, filterSize=0, startLevel=0, stopLevel=100) |
| ✅ | obj.query(topDesign, layerNum, purposeNum, region, xform, filterSize=0, startLevel=0, stopLevel=100) |
| ✅ | obj.getOccShape(shape) |
| ✅ | obj.queryShape(shape) |
方法说明
obj.getLayerNum()
绑定状态: 已绑定
Python 调用: obj.getLayerNum()
This function returns the layer number associated with this shape query。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.getLayerNum()
obj.getPurposeNum()
绑定状态: 已绑定
Python 调用: obj.getPurposeNum()
This function returns the purpose number associated with this shape query。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.getPurposeNum()
obj.query(topDesign, layerNum, purposeNum, region, filterSize=0, startLevel=0, stopLevel=100)
绑定状态: 已绑定
Python 调用: obj.query(topDesign, layerNum, purposeNum, region, filterSize=0, startLevel=0, stopLevel=100)
This function begins the query process to start generating shapes on the specified layer/purpose in the specified region of the specified design hierarchy。 A valid layer number and purpose number must be provided to the shape query, and the query produces all shapes in the design hierarchy on that layer and purpose。 If there isn't an oaLPPHeader corresponding to the specified layer and purpose numbers, the query does not produces any shapes。 The top block of any given design will have an LPPHeader for every LPPHeader that exists in the block of every bound, instantiated design in its hierarchy。 In order to produce all layer/purpose shapes of interest in a design, the application can get a collection of oaLPPHeaders in the top block, then for each LPPHeader in the collection the application can use the oaShapeQuery class to query the shapes for the layerNum and purposeNum from that LPPHeader。
参数
topDesign: Pointer to the top design in which to perform the query。layerNum: Only query objects with this layer number。purposeNum: Only query objects with this purpose number。 Note that oavPurposeNumberNo and oavPurposeNumberAny are only to be used in constraints and are not valid arguments here。region: The region of interest。xform: The current transform that is applied to the design。filterSize: Only query objects whose size is equal to or larger than filterSize。startLevel: The level of block hierarchy to start the querying。stopLevel: The level of block hierarchy to stop the querying。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.query(topDesign, layerNum, purposeNum, region, filterSize=0, startLevel=0, stopLevel=100)
obj.query(topDesign, layerNum, purposeNum, region, xform, filterSize=0, startLevel=0, stopLevel=100)
绑定状态: 已绑定
Python 调用: obj.query(topDesign, layerNum, purposeNum, region, xform, filterSize=0, startLevel=0, stopLevel=100)
This function begins the query process to start generating shapes on the specified layer/purpose in the specified region of the specified design hierarchy。 A valid layer number and purpose number must be provided to the shape query, and the query produces all shapes in the design hierarchy on that layer and purpose。 If there isn't an oaLPPHeader corresponding to the specified layer and purpose numbers, the query does not produces any shapes。 The top block of any given design will have an LPPHeader for every LPPHeader that exists in the block of every bound, instantiated design in its hierarchy。 In order to produce all layer/purpose shapes of interest in a design, the application can get a collection of oaLPPHeaders in the top block, then for each LPPHeader in the collection the application can use the oaShapeQuery class to query the shapes for the layerNum and purposeNum from that LPPHeader。
参数
topDesign: Pointer to the top design in which to perform the query。layerNum: Only query objects with this layer number。purposeNum: Only query objects with this purpose number。 Note that oavPurposeNumberNo and oavPurposeNumberAny are only to be used in constraints and are not valid arguments here。region: The region of interest。filterSize: Only query objects whose size is equal to or larger than filterSize。startLevel: The level of block hierarchy to start the querying。stopLevel: The level of block hierarchy to stop the querying。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.query(topDesign, layerNum, purposeNum, region, xform, filterSize=0, startLevel=0, stopLevel=100)
obj.getOccShape(shape)
绑定状态: 已绑定
Python 调用: obj.getOccShape(shape)
This function returns the occShape associated with the specified shape in a design hierarchy。 If the occShape does not exist, one will be generated and returned。
参数
shape: The shape from which the occShape will be generated。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.getOccShape(shape)
obj.queryShape(shape)
绑定状态: 已绑定
Python 调用: obj.queryShape(shape)
This function processes each result of the shape query。
参数
shape: Pointer to a shape found during querying。
Python 示例
from oapy._oa import _design
# assume obj is a oaShapeQuery
obj.queryShape(shape)