首页 / design / oaLine

oaLine

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaLineoapy 中可用,可通过 _design 模块访问。

本页汇总 oaLine 当前在 oapy 中可用的 Python 接口。

详细说明

The oaLine class is a subclass of oaShape that implements a line shape。 The oaLine class contains a pointArray that represents a line in the design。

方法总览

状态 Python 调用
obj.getNumPoints()
obj.getPoints(points)
obj.setPoints(points)
_design.oaLine.create(block, layerNum, purposeNum, points)

方法说明

obj.getNumPoints()

绑定状态: 已绑定

Python 调用: obj.getNumPoints()

This function returns the number of nonidentical points in this line。

Python 示例

from oapy._oa import _design

# assume obj is a oaLine
obj.getNumPoints()

obj.getPoints(points)

绑定状态: 已绑定

Python 调用: obj.getPoints(points)

This function fills out points with the points of this line。

Python 示例

from oapy._oa import _design

# assume obj is a oaLine
obj.getPoints(points)

obj.setPoints(points)

绑定状态: 已绑定

Python 调用: obj.setPoints(points)

This function sets the points of this line to the specified pointArray。 The new pointArray is checked to verify there are at least two points。

异常

  • oacLineTooFewPoints

Python 示例

from oapy._oa import _design

# assume obj is a oaLine
obj.setPoints(points)

_design.oaLine.create(block, layerNum, purposeNum, points)

绑定状态: 已绑定

Python 调用: _design.oaLine.create(block, layerNum, purposeNum, points)

This function creates a line with the specified attributes。 The specified pointArray is checked to verify that there are at least two points。

参数

  • block: The block in which this line is located。
  • layerNum: The number of the layer on which this line is located。
  • purposeNum: The number of the purpose on which this line is located。
  • points: The pointArray used to construct this line。

异常

  • oacLineTooFewPoints

Python 示例

from oapy._oa import _design

_design.oaLine.create(block, layerNum, purposeNum, points)