oaFig
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaFig 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaFig 当前在 oapy 中可用的 Python 接口。
详细说明
The oaFig class is an abstract base class for all OpenAccess database figures, including instances, arrays, markers, boundaries, rows, shapes, and routes。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.destroy() |
| ✅ | obj.getBBox(bBox) |
| ✅ | obj.getFigGroupMem() |
| ✅ | obj.overlaps(box) |
| ✅ | obj.move(xform) |
| ✅ | obj.move(xform, block) |
| ✅ | obj.copy(xform) |
| ✅ | obj.copy(xform, block) |
| ✅ | obj.move(xform, design) |
| ✅ | obj.copy(xform, design) |
方法说明
obj.destroy()
绑定状态: 已绑定
Python 调用: obj.destroy()
This function destroys this figure, removing it from the database。 Note: If this function is called on an instance, it throws an oacCannotDestroyImplicitInst exception if an attempt is made to destroy an instance that was implicitly created。 This function will throw an oacInstMustBeInUniqueOccHier exception if an attempt is made to destroy an instance where the instance is in a hierarchy of occurrences that are not unique。 When a Figure is destroyed, it has the side effect of destroying its properties and AppDefs and destroying all members of any group of which it is the leader。 In addition, there are some class-specific side-effects as listed below。 Considerations for Specific Figure Classes oaInst : When an oaInst is destroyed any oaAssignment or oaBlockage with the oaInst as an owner is destroyed。 oaFigGroup : When a FigGroup is destroyed, the figures contained in the FigGroup are not destroyed。 oaRoute : When a Route is destroyed, the PathSegs, Vias, and Guides contained in the Route are not destroyed。 Those figures remain attached to the oaNet that the Route is on。
异常
oacCannotDestroyImplicitInst。oacInstMustBeInUniqueOccHier。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.destroy()
obj.getBBox(bBox)
绑定状态: 已绑定
Python 调用: obj.getBBox(bBox)
This function returns the bounding box of this figure。 Note: For performance reasons, the values for the bounding box are cached。 Getting the bounding box of a top design will not provide a recalculated bounding box if changes were made to lower level designs while the top design was closed (and the lower level designs are not currently in memory)。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.getBBox(bBox)
obj.getFigGroupMem()
绑定状态: 已绑定
Python 调用: obj.getFigGroupMem()
This function gets the oaFigGroupMem that references this oaFig, if any, or returns NULL if the oaFig is not referenced by an oaFigGroupMem 。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.getFigGroupMem()
obj.overlaps(box)
绑定状态: 已绑定
Python 调用: obj.overlaps(box)
This function determines whether the figure overlaps with the given oaBox 。
参数
box: the oaBox to test against。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.overlaps(box)
obj.move(xform)
绑定状态: 已绑定
Python 调用: obj.move(xform)
Note : This function is deprecated。 Instead of this function, use the oaFig::move (oaTransform&, oaBlock*) overload that moves the figure to a specified block。 This function uses the specified transform to move this figure into the top block of the specified design。 An exception is thrown if the specified design does not have a top block。
异常
oacCannotMovePcellInst。oacDesignHasNoTopBlock。oacCannotCopyMoveUnboundViaToStrangerDesign。oacCannotCopyMoveUnboundRowToStrangerDesign。oacCannotCopyBlockageWithOwner。oacBindViaToIncorrectViaDefOnCopy。oacBindViaToIncorrectViaDefOnMove。oacBindRowToIncorrectSiteDefOnMove。oacCannotMoveDerivedBlockage。oacCannotMovePcellInst。oacInvalidMarkerMove。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.move(xform)
obj.move(xform, block)
绑定状态: 已绑定
Python 调用: obj.move(xform, block)
This function moves this figure by the specified transform to the specified block, which can be in a different design。 A pointer to the new oaFig is returned, and the original figure pointer is no longer valid because the original figure is destroyed。 When a Figure is moved, OpenAccess also moves members of any group of which the figure is a leader。 Considerations for Specific Figure Classes oaInst : When an oaInst is moved, any oaBlockage with the oaInst as an owner is moved。 Moving a figure that is a pcell instance into another oaBlock requires that the superMaster of the instance be open。 If the superMaster cannot be found, the move throws an oacCannotMovePcellInst exception。 Attempting to move an implicit oaInst results in an oacCannotMoveImplicitInst exception。 oaFigGroup : When a FigGroup is moved, the figures contained in the FigGroup also are moved。 Those figures follow the general oaFig::move rules with respect to what associated objects are moved。 oaRoute : When a Route is moved, the PathSegs, Vias, and Guides contained in the Route are moved。 oaVia and oaRow move restrictions: If no tech is available for the source design, the move is prohibited (oacCannotCopyMoveUnboundViaToStrangerDesign and oacCannotCopyMoveUnboundRowToStrangerDesign)。 If the object to be bound to (ViaDef, SiteDef) is or might be different in the destination block, the move is prohibited。 If the techs are different for the source and destination designs, if the source object is bound to a tech object, the destination object must bind to the same tech object -- otherwise, the move is prohibited (oacBindViaToIncorrectViaDefOnMove and oacBindViaToIncorrectSiteDefOnMove)。 If the techs are different for the source and destination designs, if the destination tech object to be bound to has conflicts, the move is prohibited (oacBindViaToIncorrectViaDefOnMove and oacBindViaToIncorrectSiteDefOnMove)。 If the techs are different for the source and destination designs, if the source object is not bound, the move is prohibited (oacCannotCopyMoveUnboundViaToStrangerDesign and oacCannotCopyMoveUnboundRowToStrangerDesign)。 oaMarker : Attempting to move a marker to another block throws an oacInvalidMarkerMove exception。 oaBlockage : Moving a blockage to another block as a result of moving a group leader or an oaFigGroup succeeds only if the owner of the blockage is included in the move, otherwise, an oacCannotMoveDerivedBlockage exception is thrown。
异常
oacCannotMovePcellInst。oacDesignHasNoTopBlock。oacCannotCopyMoveUnboundViaToStrangerDesign。oacCannotCopyMoveUnboundRowToStrangerDesign。oacCannotCopyBlockageWithOwner。oacBindViaToIncorrectViaDefOnMove。oacBindRowToIncorrectSiteDefOnMove。oacCannotMoveDerivedBlockage。oacCannotMovePcellInst。oacInvalidMarkerMove。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.move(xform, block)
obj.copy(xform)
绑定状态: 已绑定
Python 调用: obj.copy(xform)
Note: This function is deprecated, Instead of this function, use the oaFig::copy (oaTransform&, oaBlock*) overload that copies the figure to a specified block。 This function creates a copy of this figure in the top block of the specified design。 The new figure is moved from the location of the original by the specified transform。 An exception is thrown if the specified design does not have a top block。
异常
oacCannotMovePcellInst。oacDesignHasNoTopBlock。oacCannotCopyMoveUnboundViaToStrangerDesign。oacCannotCopyMoveUnboundRowToStrangerDesign。oacCannotCopyBlockageWithOwner。oacCannotCopyDerivedBlockage。oacCannotCopyImplicitInst。oacInvalidMarkerCopy。oacBindViaToIncorrectViaDefOnCopy。oacBindRowToIncorrectSiteDefOnCopy。oacBindRowToIncorrectSiteDefOnCopy。oacInvalidTextDisplayCopy。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.copy(xform)
obj.copy(xform, block)
绑定状态: 已绑定
Python 调用: obj.copy(xform, block)
This function creates a copy of this figure in the specified block, which can be in a different design。 The new figure is moved by the specified transform。 When figures are copied, their parameters are copied with them。 Their oaAppDefs and other associated objects are not copied with the exceptions listed in Considerations for Specific Figure Classes below。 If the specified figure is the leader of an oaGroup , all the other members of the group are copied as well。 Note that when followers in a group are copied, they are not updated to relate to the copied objects。 For example, if you copy an oaInst that is the leader of a group with an oaInstAttrDisplay that has the oaInst as its owner, the copied oaInstAttrDisplay still refers to the original oaInst 。 Considerations for Specific Figure Classes oaInst : When an oaInst is copied, certain objects that depend on that oaInst are copied with it。 In addition to its parameters and followers, any oaAssignment or oaBlockage with the oaInst as an owner is copied。 Note that properties on such oaAssignments or oaBlockages are not copied。 Copying a figure that is a pcell instance into another oaBlock requires that the superMaster of the instance be open。 If the superMaster cannot be found, the copy will throw an oacCannotCopyPcellInst exception。 Attempting to copy an implicit oaInst results in an oacCannotCopyImplicitInst exception。 oaFigGroup : When a FigGroup is copied, the figures contained in the FigGroup also are copied。 Those figures follow the general oaFig::copy rules with respect to what associated objects are copied。 oaRoute : When a Route is copied, the PathSegs, Vias, and Guides contained in the Route also are copied。 Those figures follow the general oaFig::copy rules with respect to what associated objects are copied。 oaVia and oaRow copy restrictions: If no tech is available for the source design, the copy is prohibited (oacCannotCopyMoveUnboundViaToStrangerDesign and oacCannotCopyMoveUnboundRowToStrangerDesign)。 If the object to be bound to (ViaDef, SiteDef) is or might be different in the destination block, the copy is prohibited。 If the techs are different for the source and destination designs, if the source object is bound to a tech object, the destination object must bind to the same tech object -- otherwise, the copy is prohibited (oacBindViaToIncorrectViaDefOnCopy and oacBindViaToIncorrectSiteDefOnCopy)。 If the techs are different for the source and destination designs, if the destination tech object to be bound to has conflicts, the copy is prohibited (oacBindViaToIncorrectViaDefOnCopy and oacBindViaToIncorrectSiteDefOnCopy)。 If the techs are different for the source and destination designs, if the source object is not bound, the copy is prohibited (oacCannotCopyMoveUnboundViaToStrangerDesign and oacCannotCopyMoveUnboundRowToStrangerDesign)。 oaMarker : Attempting to copy a marker to another block throws an oacInvalidMarkerCopy exception。 oaTextDisplay : Copying an oaTextDisplay to another block as a result of copying a group leader or an oaFigGroup succeeds only if the owner of the text display is included in the copy, otherwise, an oacInvalidTextDisplayCopy exception is thrown。 oaBlockage : Copying a blockage to another block as a result of copying a group leader or an oaFigGroup succeeds only if the owner of the blockage is included in the copy, otherwise, an oacCannotCopyDerivedBlockage exception is thrown。
异常
oacCannotCopyPcellInst。oacDesignHasNoTopBlock。oacCannotCopyMoveUnboundViaToStrangerDesign。oacCannotCopyMoveUnboundRowToStrangerDesign。oacCannotCopyBlockageWithOwner。oacCannotCopyDerivedBlockage。oacCannotCopyImplicitInst。oacInvalidMarkerCopy。oacBindViaToIncorrectViaDefOnCopy。oacBindRowToIncorrectSiteDefOnCopy。oacInvalidTextDisplayCopy。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.copy(xform, block)
obj.move(xform, design)
绑定状态: 已绑定
Python 调用: obj.move(xform, design)
This function moves this figure within the same block as this figure, using the specified transform。 For additional information, see the oaFig::move (oaTransform&, oaBlock*) function description。
异常
oacCannotMoveDerivedBlockage。oacCannotMovePcellInst。oacInvalidMarkerMove。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.move(xform, design)
obj.copy(xform, design)
绑定状态: 已绑定
Python 调用: obj.copy(xform, design)
This function creates a copy of this figure within the same block as this figure。 The new figure is moved from the location of the original by the specified transform。 For additional information, see the oaFig::copy (oaTransform&, oaBlock*) function description。
异常
oacCannotCopyDerivedBlockage。oacCannotCopyImplicitInst。oacInvalidMarkerCopy。oacInvalidTextDisplayCopy。
Python 示例
from oapy._oa import _design
# assume obj is a oaFig
obj.copy(xform, design)