首页 / design / oaDonut

oaDonut

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

概览

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

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

详细说明

This class implements a donut shape defined by two concentric circles。

方法总览

状态 Python 调用
obj.getHoleBBox(bBox)
obj.getCenter(point)
obj.getRadius()
obj.getHoleRadius()
obj.getBoundary(points, numSides=20)
obj.setCenter(center)
obj.setRadius(radius)
obj.setHoleRadius(holeRadius)
obj.setRadii(radius, holeRadius)
obj.convertToPolygon(numSides=20)
_design.oaDonut.create(block, layerNum, purposeNum, center, radius, holeRadius)
_design.oaDonut.genBoundary(center, radius, holeRadius, numSides, boundary)

方法说明

obj.getHoleBBox(bBox)

绑定状态: 已绑定

Python 调用: obj.getHoleBBox(bBox)

This function fills out bBox with the hole bBox of this donut。

参数

  • bBox: The bounding box of the donut。

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.getHoleBBox(bBox)

obj.getCenter(point)

绑定状态: 已绑定

Python 调用: obj.getCenter(point)

This function fills out point with the center point of this donut。

参数

  • point: The center of the donut。

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.getCenter(point)

obj.getRadius()

绑定状态: 已绑定

Python 调用: obj.getRadius()

This function returns the outer radius of this donut。

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.getRadius()

obj.getHoleRadius()

绑定状态: 已绑定

Python 调用: obj.getHoleRadius()

This function returns the inner radius of this donut。

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.getHoleRadius()

obj.getBoundary(points, numSides=20)

绑定状态: 已绑定

Python 调用: obj.getBoundary(points, numSides=20)

This function fills out points with the boundary polygon of this donut。 The polygon is generated with the number of sides specified by numSides。

参数

  • points: The point array for the resulting boundary。
  • numSides: The number of sides of the resulting boundary。

异常

  • oacDonutNumSidesInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.getBoundary(points, numSides=20)

obj.setCenter(center)

绑定状态: 已绑定

Python 调用: obj.setCenter(center)

This function sets the center of this donut to the specified value。

参数

  • center: The center point for the donut。

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.setCenter(center)

obj.setRadius(radius)

绑定状态: 已绑定

Python 调用: obj.setRadius(radius)

This function sets the outer radius of this donut to the specified value。

参数

  • radius: The outer radius for the donut。

异常

  • oacDonutRadiiInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.setRadius(radius)

obj.setHoleRadius(holeRadius)

绑定状态: 已绑定

Python 调用: obj.setHoleRadius(holeRadius)

This function sets the inner radius of this donut to the specified value。

参数

  • holeRadius: The inner radius for the donut。

异常

  • oacDonutRadiiInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.setHoleRadius(holeRadius)

obj.setRadii(radius, holeRadius)

绑定状态: 已绑定

Python 调用: obj.setRadii(radius, holeRadius)

This function sets the inner and outer radii of this donut to the specified values。

参数

  • radius: The outer radius for the donut。
  • holeRadius: The inner radius for the donut。

异常

  • oacDonutRadiiInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.setRadii(radius, holeRadius)

obj.convertToPolygon(numSides=20)

绑定状态: 已绑定

Python 调用: obj.convertToPolygon(numSides=20)

This function converts this donut to a polygon using the specified number of sides。 The pointer to the polygon is returned。

参数

  • numSides: The number of segments to represent the donut as a polygon; the default is 20。

异常

  • oacDonutNumSidesInvalid

Python 示例

from oapy._oa import _design

# assume obj is a oaDonut
obj.convertToPolygon(numSides=20)

_design.oaDonut.create(block, layerNum, purposeNum, center, radius, holeRadius)

绑定状态: 已绑定

Python 调用: _design.oaDonut.create(block, layerNum, purposeNum, center, radius, holeRadius)

This function creates a donut with the specified attributes。 The specified radii are checked to verify the inner radius is less than the outer radius。

参数

  • block: The block in which the donut is created。
  • layerNum: The number layer on which the donut is created。
  • purposeNum: The number of the purpose on which the donut is created。
  • center: The center point for the donut。
  • radius: The outer radius for the donut。
  • holeRadius: The inner radius for the donut。

异常

  • oacDonutRadiiInvalid

Python 示例

from oapy._oa import _design

_design.oaDonut.create(block, layerNum, purposeNum, center, radius, holeRadius)

_design.oaDonut.genBoundary(center, radius, holeRadius, numSides, boundary)

绑定状态: 已绑定

Python 调用: _design.oaDonut.genBoundary(center, radius, holeRadius, numSides, boundary)

This function fills out boundary with the bounding polygon of a donut with the specified parameters。 The polygon is generated with the number of sides specified by numSides。

参数

  • center: The center point of the donut。
  • radius: The outer radius of the donut。
  • holeRadius: The inner radius of the donut。
  • numSides: The number of sides of the resulting boundary。
  • boundary: The point array for the resulting boundary。

异常

  • oacDonutNumSidesInvalid

Python 示例

from oapy._oa import _design

_design.oaDonut.genBoundary(center, radius, holeRadius, numSides, boundary)