首页 / base / oaTransform

oaTransform

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

概览

oaTransformoapy 中可用,可通过 _base 模块访问。

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

详细说明

The oaTransform class implements a 2-D transformation including orientation and translation。 This class consists of an orientation (angle and mirroring information) and an offset in the X and Y directions。 This information and the functions for modifying the transform are encapsulated in this class。 Note: when a transform is applied that contains both an orientation change and a translation, the orientation change is applied first。 OpenAccess can use oaTransform to transform various geometric objects, including figures ( oaFig::move ), boxes ( oaBox::transform ), and point arrays ( oaPointArray::transform )。 For more information, see Using Transforms in the Programmer's Guide。

构造函数

_base.oaTransform()

obj = _base.oaTransform()

_base.oaTransform(offsetIn, orientIn=oacR0)

obj = _base.oaTransform(offsetIn, orientIn=oacR0)

_base.oaTransform(xOffsetIn, yOffsetIn, orientIn=oacR0)

obj = _base.oaTransform(xOffsetIn, yOffsetIn, orientIn=oacR0)

_base.oaTransform(orientIn)

obj = _base.oaTransform(orientIn)

_base.oaTransform(xform1, xform2)

obj = _base.oaTransform(xform1, xform2)

方法总览

状态 Python 调用
obj.offset()
obj.xOffset()
obj.yOffset()
obj.orient()
obj.offset()
obj.xOffset()
obj.yOffset()
obj.orient()
obj.set(offsetIn, orientIn=oacR0)
obj.set(xOffsetIn, yOffsetIn, orientIn=oacR0)
obj.set(orientIn)
obj.set(xform1, xform2)
obj.init()
obj.invert(result)
obj.invert()
obj.concat(xform, result)
obj.concat(xform)
obj.isIdentity()
obj.operator==(xform)
obj.operator!=(xform)

方法说明

obj.offset()

绑定状态: 已绑定

Python 调用: obj.offset()

This function is the const version of offset() 。 You can get the value currently set in the offset but cannot modify the contents。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.offset()

obj.xOffset()

绑定状态: 已绑定

Python 调用: obj.xOffset()

This function is the const version of xOffset() 。 This function gets the value currently set in the delta X portion of the offset, but cannot modify the contents。

返回

  • The delta X portion of the offset of this transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.xOffset()

obj.yOffset()

绑定状态: 已绑定

Python 调用: obj.yOffset()

This function is the const version of yOffset() 。 This function gets the value currently set in the delta Y portion of the offset, but cannot modify the contents。

返回

  • The delta Y portion of the offset of this transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.yOffset()

obj.orient()

绑定状态: 已绑定

Python 调用: obj.orient()

This function is the const version of orient() 。 You can get the value currently set in the orientation, but cannot modify the contents。

返回

  • The orientation of the transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.orient()

obj.offset()

绑定状态: 已绑定

Python 调用: obj.offset()

This function returns a reference to the offset of the transform。 The offset represents the delta X and delta Y of the transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.offset()

obj.xOffset()

绑定状态: 已绑定

Python 调用: obj.xOffset()

This function returns a reference to the delta X portion of the offset。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.xOffset()

obj.yOffset()

绑定状态: 已绑定

Python 调用: obj.yOffset()

This function returns a reference to the delta Y portion of the offset。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.yOffset()

obj.orient()

绑定状态: 已绑定

Python 调用: obj.orient()

This function returns a reference to the orientation of the transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.orient()

obj.set(offsetIn, orientIn=oacR0)

绑定状态: 已绑定

Python 调用: obj.set(offsetIn, orientIn=oacR0)

This function sets the offset and orientation of this transform object to be the same as the concatenation of the two given transforms。 The resulting orientation equals the concatenation of the orientations of the two given transforms; the resulting offset equals the offset of the first given transform transformed by the second given transform。

参数

  • xform1: the first transform to concatenate。
  • xform2: the second transform to concatenate。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.set(offsetIn, orientIn=oacR0)

obj.set(xOffsetIn, yOffsetIn, orientIn=oacR0)

绑定状态: 已绑定

Python 调用: obj.set(xOffsetIn, yOffsetIn, orientIn=oacR0)

This function sets the orientation of this transform object to the given value。

参数

  • orientIn: the orientation that this transform is set to。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.set(xOffsetIn, yOffsetIn, orientIn=oacR0)

obj.set(orientIn)

绑定状态: 已绑定

Python 调用: obj.set(orientIn)

This function sets the offsets and orientation of this transform object according to the given values。

参数

  • xOffsetIn: the x-offset value that this transform is set to。
  • yOffsetIn: the y-offset value that this transform is set to。
  • orientIn: the orientation that this transform is set to。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.set(orientIn)

obj.set(xform1, xform2)

绑定状态: 已绑定

Python 调用: obj.set(xform1, xform2)

This function sets the offset and orientation of this transform object according to the given values。

参数

  • offsetIn: the offset that this transform is set to。
  • orientIn: the orientation that this transform is set to。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.set(xform1, xform2)

obj.init()

绑定状态: 已绑定

Python 调用: obj.init()

This function initializes this transform to represent the identity transform, with offset equal to (0, 0) and orientation equal to oacR0。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.init()

obj.invert(result)

绑定状态: 已绑定

Python 调用: obj.invert(result)

This function inverts this transform。 Note: The inverse transform is the transform that will undo the effect of the original transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.invert(result)

obj.invert()

绑定状态: 已绑定

Python 调用: obj.invert()

This function inverts this transform and stores the result in result。 Note: The inverse transform is the transform that will undo the effect of the original transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.invert()

obj.concat(xform, result)

绑定状态: 已绑定

Python 调用: obj.concat(xform, result)

This function concatenates this transform with the specified transform。 This transform becomes the concatenated transform。

参数

  • xform: The transform to concatenate to this transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.concat(xform, result)

obj.concat(xform)

绑定状态: 已绑定

Python 调用: obj.concat(xform)

This function concatenates this transform with the specified transform and stores the result in result。 The current transform is not changed。

参数

  • xform: The transform to concatenate to this transform。
  • result: The resulting transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.concat(xform)

obj.isIdentity()

绑定状态: 已绑定

Python 调用: obj.isIdentity()

This function returns true if this transform is the identity transform。

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.isIdentity()

obj.operator==(xform)

绑定状态: 已绑定

Python 调用: obj.operator==(xform)

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.operator==(xform)

obj.operator!=(xform)

绑定状态: 已绑定

Python 调用: obj.operator!=(xform)

Python 示例

from oapy._oa import _base

# assume obj is a oaTransform
obj.operator!=(xform)