oaSegStyle
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaSegStyle 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaSegStyle 当前在 oapy 中可用的 Python 接口。
详细说明
The oaSegStyle class implements a utility class whose objects are used to specify and retrieve the width and the two end styles for an oaPathSeg object。 oaSegStyle objects by themselves are not persistent but become persistent when associated with one or more oaPathSeg objects。 Its supporting classes includes the oaEndStyle class, which implements an enumerated type representing the different styles the end of a path segment may have。
构造函数
_design.oaSegStyle()
obj = _design.oaSegStyle()
_design.oaSegStyle(width, beginStyleIn, endStyleIn, beginExtIn=0, endExtIn=0)
obj = _design.oaSegStyle(width, beginStyleIn, endStyleIn, beginExtIn=0, endExtIn=0)
_design.oaSegStyle(beginStyleIn, endStyleIn, endExtIn, endLeftDiagExtIn, endRightDiagExtIn, endRightHalfWidthIn, beginExtIn=0)
obj = _design.oaSegStyle(beginStyleIn, endStyleIn, endExtIn, endLeftDiagExtIn, endRightDiagExtIn, endRightHalfWidthIn, beginExtIn=0)
_design.oaSegStyle(beginStyleIn, beginExtIn, beginLeftDiagExtIn, beginRightDiagExtIn, beginRightHalfWidthIn, endStyleIn, endExtIn=0)
obj = _design.oaSegStyle(beginStyleIn, beginExtIn, beginLeftDiagExtIn, beginRightDiagExtIn, beginRightHalfWidthIn, endStyleIn, endExtIn=0)
_design.oaSegStyle(beginStyleIn, beginExtIn, beginLeftDiagExtIn, beginRightDiagExtIn, beginRightHalfWidthIn, endStyleIn, endExtIn, endLeftDiagExtIn, endRightDiagExtIn, endRightHalfWidthIn)
obj = _design.oaSegStyle(beginStyleIn, beginExtIn, beginLeftDiagExtIn, beginRightDiagExtIn, beginRightHalfWidthIn, endStyleIn, endExtIn, endLeftDiagExtIn, endRightDiagExtIn, endRightHalfWidthIn)
_design.oaSegStyle(segStyleIn)
obj = _design.oaSegStyle(segStyleIn)
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getWidth() |
| ✅ | obj.getBeginStyle() |
| ✅ | obj.getBeginExt() |
| ✅ | obj.getBeginExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth) |
| ✅ | obj.getEndStyle() |
| ✅ | obj.getEndExt() |
| ✅ | obj.getEndExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth) |
| ✅ | obj.setWidth(widthIn) |
| ✅ | obj.setBeginStyle(style, ext=0) |
| ✅ | obj.setBeginStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth) |
| ✅ | obj.setEndStyle(style, ext=0) |
| ✅ | obj.setEndStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth) |
| ✅ | obj.operator==(style) |
| ✅ | obj.operator!=(style) |
| ✅ | _design.oaSegStyle.genBoundary(points) |
方法说明
obj.getWidth()
绑定状态: 已绑定
Python 调用: obj.getWidth()
This function returns the width that this osSegStyle object currently represents。 The returned value can be either be in regular orthogonal units or diagonal units based on the user context。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getWidth()
obj.getBeginStyle()
绑定状态: 已绑定
Python 调用: obj.getBeginStyle()
This function returns an oaEndStyle object that this object represents for the beginning of an oaPathSeg object to which it may be applied。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getBeginStyle()
obj.getBeginExt()
绑定状态: 已绑定
Python 调用: obj.getBeginExt()
This function returns the custom begin extension values this object represents for an oaPathSeg object to which it may be applied。 All returned values are valid if the begin endStyle is custom chamfered。 Only 'ext' is valid if the begin endStyle is variable。 For all other endStyles the returned values will be zero。
参数
ext: This parameter gets populated with the regular begin extension。leftDiagExt: This parameter gets populated with the left diagonal extension。rightDiagExt: This parameter gets populated with the right diagonal extension。rightHalfWidth: This parameter gets populated with the right half width。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getBeginExt()
obj.getBeginExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
绑定状态: 已绑定
Python 调用: obj.getBeginExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
This function returns the regular begin extension this object represents for an oaPathSeg object to which it may be applied。 The return value is valid only if the begin endStyle is variable or custom chamfered。 A zero is returned if the begin endStyle is truncate, extend or chamfer。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getBeginExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
obj.getEndStyle()
绑定状态: 已绑定
Python 调用: obj.getEndStyle()
This function returns an oaEndStyle object that this object represents for the end of an oaPathSeg object to which it may be applied。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getEndStyle()
obj.getEndExt()
绑定状态: 已绑定
Python 调用: obj.getEndExt()
This function returns the custom end extension values this object represents for an oaPathSeg object to which it may be applied。 All returned values are valid if the end endStyle is custom chamfered。 Only 'ext' is valid if the end endStyle is variable。 For all other endStyles the returned values will be zero。
参数
ext: This parameter gets populated with the regular end extension。leftDiagExt: This parameter gets populated with the left diagonal extension。rightDiagExt: This parameter gets populated with the right diagonal extension。rightHalfWidth: This parameter gets populated with the right half width。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getEndExt()
obj.getEndExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
绑定状态: 已绑定
Python 调用: obj.getEndExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
This function returns the regular end extension this object represents for an oaPathSeg object to which it may be applied。 The return value is valid only if the end endStyle is variable or custom chamfered。 A zero is returned if the end endStyle is truncate, extend or chamfer。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.getEndExt(ext, leftDiagExt, rightDiagExt, rightHalfWidth)
obj.setWidth(widthIn)
绑定状态: 已绑定
Python 调用: obj.setWidth(widthIn)
This function sets the width of this segStyle。 The width cannot be changed if both ends are custom chamfered。 An exception will be thrown for this case。 If only one end is custom-chamfered, the right half-width of that custom end is adjusted to be half the specified 'widthIn' value。 For all other cases, the width applies directly and implies to all dependent extensions。
参数
widthIn: The new width value to assign to this oaSegStyle object。
异常
oacCannotChangeWidthForBothCustomEnds。oacEvenWidthRequiredForSegStyle。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.setWidth(widthIn)
obj.setBeginStyle(style, ext=0)
绑定状态: 已绑定
Python 调用: obj.setBeginStyle(style, ext=0)
This function sets the begin endStyle of this segStyle, and should be used for setting custom endStyles only。 An exception is thrown if this requirement is not met。 The width of this object is adjusted according to whether the segStyle at the end is custom or non-custom。 The ext and rightHalfWidth values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments。 These values should be set in diagonal database units if it is intended to be used for diagonal segments。 Conversely, the leftDiagExt and rightDiagExt values should be specified in diagonal database units if this segStyle is intended to be used for orthogonal segments, and they should be set in regular database units if it is intended to be used for diagonal segments。
参数
style: The oaEndStyle to be used for the beginning of an oaPathSeg。ext: The extension to be used at the beginning of an oaPathSeg。leftDiagExt: The left diagonal extension to be used at the beginning of an oaPathSeg。rightDiagExt: The right diagonal extension to be used at the beginning of an oaPathSeg。rightHalfWidth: The right half width to be used at the beginning of an oaPathSeg。
异常
oacOnlyCustomEndStyleAllowedForBegin。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.setBeginStyle(style, ext=0)
obj.setBeginStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
绑定状态: 已绑定
Python 调用: obj.setBeginStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
This function sets the begin endStyle for this segStyle and should be used for the non-custom endStyles only。 If an extension 'ext' is specified, the style must be variable。 An exception is thrown if these criteria are not met。 If the end endStyle is a custom endStyle, the width gets adjusted to be double that of the endRightHalfWidth。 Otherwise, it remains unchanged。 The value of 'ext' should be specified in regular database units if the style is to be used for orthogonal segments and in diagonal database units if the intended use is for diagonal segments。
参数
style: The new end style that this object will represent for the beginning of an oaPathSeg 。ext: The extension value that this object will represent for the beginning of an oaPathSeg。
异常
oacCustomEndStyleNotAllowedForBegin。oacInvalidSegStyleBeginExtValue。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.setBeginStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
obj.setEndStyle(style, ext=0)
绑定状态: 已绑定
Python 调用: obj.setEndStyle(style, ext=0)
This function sets the end endStyle of this segStyle and should be used for setting custom endStyles only。 An exception is thrown if this requirement is not met。 The width of this object gets adjusted based on whether the segStyle at the begin is custom or non-custom。 The 'ext' and 'rightHalfWidth' values should be specified in regular database units if this segStyle is intended to be used for orthogonal segments and in diagonal database units if it is intended to be used for diagonal segments。 The 'leftDiagExt' and 'rightDiagExt' values should be specified in diagonal database units if this segStyle is intended to be used for orthogonal segments and in regular database units if it is intended to be used for diagonal segments。
参数
style: The oaEndStyle to be used for the end of an oaPathSeg。ext: The extension to be used at the end of an oaPathSeg。leftDiagExt: The left diagonal extension to be used at the end of an oaPathSeg。rightDiagExt: The right diagonal extension to be used at the end of an oaPathSeg。rightHalfWidth: The right half width to be used at the end of an oaPathSeg。
异常
oacOnlyCustomEndStyleAllowedForEnd。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.setEndStyle(style, ext=0)
obj.setEndStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
绑定状态: 已绑定
Python 调用: obj.setEndStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
This function sets the end endStyle for this segStyle and should be used for the non-custom endStyles only。 If an extension 'ext' is specified, the style must be variable。 An exception is thrown if these criteria are not met。 If the begin endStyle is a custom endStyle, the width gets adjusted to be double that of the beginRightHalfWidth。 Otherwise, it remains unchanged。 The value of 'ext' should be specified in regular database units if the style is to be used for orthogonal segments and in diagonal database units if the intended use is for diagonal segments。
参数
style: The new end style that this object will represent for the end of an oaPathSeg 。 The style should be a regular end style。ext: The extension value that this object will represent for the end of an oaPathSeg。
异常
oacCustomEndStyleNotAllowedForEnd。oacInvalidSegStyleEndExtValue。
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.setEndStyle(style, ext, leftDiagExt, rightDiagExt, rightHalfWidth)
obj.operator==(style)
绑定状态: 已绑定
Python 调用: obj.operator==(style)
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.operator==(style)
obj.operator!=(style)
绑定状态: 已绑定
Python 调用: obj.operator!=(style)
Python 示例
from oapy._oa import _design
# assume obj is a oaSegStyle
obj.operator!=(style)
_design.oaSegStyle.genBoundary(points)
绑定状态: 已绑定
Python 调用: _design.oaSegStyle.genBoundary(points)
This function fills out boundary with the boundary polygon of a virtual segStyle。 The segStyle is placed at the origin, and in left to right direction。
参数
boundary: The point array that will get populated with the boundary points。
Python 示例
from oapy._oa import _design
_design.oaSegStyle.genBoundary(points)