oaBoundary
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaBoundary 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaBoundary 当前在 oapy 中可用的 Python 接口。
详细说明
The oaBoundary class is an abstract base for all types of boundary classes。 In general, all types of boundaries are used to define an enclosed area。 Boundaries include a polygonal outline。 Each segment of the boundary can have a name associated with it。 Two coincident and three collinear points are illegal, and if detected, cause an exception to be thrown。 You can use oaPointArray::compress() to remove these combinations。 The oaBoundary class can be observed by deriving from oaObserver
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getPoints(points) |
| ✅ | obj.getEdgeNames(edgeNamesIn) |
| ✅ | obj.getNumEdges() |
| ✅ | obj.hasDefaultConstraintGroup() |
| ✅ | obj.getDefaultConstraintGroup() |
| ✅ | obj.setEdges(points, edgeNames=NULL) |
| ✅ | obj.transform(scale, angle) |
| ✅ | obj.getEdgeNames(edgeNamesIn) |
| ✅ | obj.setEdges(points, edgeNames) |
方法说明
obj.getPoints(points)
绑定状态: 已绑定
Python 调用: obj.getPoints(points)
This function fills out the given oaPointArray with the points of this boundary。
参数
points: An oaPointArray to fill in。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.getPoints(points)
obj.getEdgeNames(edgeNamesIn)
绑定状态: 已绑定
Python 调用: obj.getEdgeNames(edgeNamesIn)
This function fills in edgeNamesIn with the names of each edge of this boundary。
参数
edgeNamesIn: The array of names to fill in。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.getEdgeNames(edgeNamesIn)
obj.getNumEdges()
绑定状态: 已绑定
Python 调用: obj.getNumEdges()
This function returns the number of edges in this boundary。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.getNumEdges()
obj.hasDefaultConstraintGroup()
绑定状态: 已绑定
Python 调用: obj.hasDefaultConstraintGroup()
This function returns a boolean indicating whether there is a default constraint group for this boundary。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.hasDefaultConstraintGroup()
obj.getDefaultConstraintGroup()
绑定状态: 已绑定
Python 调用: obj.getDefaultConstraintGroup()
This function returns the default constraint group for this boundary。 If no constraints have been set on the default constraint group, a new constraint group is created and returned。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.getDefaultConstraintGroup()
obj.setEdges(points, edgeNames=NULL)
绑定状态: 已绑定
Python 调用: obj.setEdges(points, edgeNames=NULL)
This function sets the point array and edge names array of this boundary to the specified points and edgeNames, respectively。 Note that the number of edge names must be equal to the number of points or an oacBoundaryInvalidEdgeNames exception is thrown。
参数
points: The array of points。edgeNames: The array of edge names。
异常
oacBoundaryInvalidEdgeNames。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.setEdges(points, edgeNames=NULL)
obj.transform(scale, angle)
绑定状态: 已绑定
Python 调用: obj.transform(scale, angle)
This function transforms this boundary by the specified scale factor and rotation angle。
参数
scale: Scaling factor to apply to the boundary。angle: Rotation to apply to the boundary。
异常
oacPRBoundaryInvalidRotation。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.transform(scale, angle)
obj.getEdgeNames(edgeNamesIn)
绑定状态: 已绑定
Python 调用: obj.getEdgeNames(edgeNamesIn)
This function is deprecated。 Refer to the getEdgeNames function that takes a reference to an oaStringArray for edgeNamesIn。 This function fills out the edgeNamesIn array with the names of each edge of this boundary。
参数
edgeNamesIn: The array of names to fill in。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.getEdgeNames(edgeNamesIn)
obj.setEdges(points, edgeNames)
绑定状态: 已绑定
Python 调用: obj.setEdges(points, edgeNames)
This function is deprecated。 Refer to the setEdges function that takes a reference to an oaStringArray for the edgeNames。 This function sets the point array and edge names of this boundary to the specified points and edgeNames respectively。 If boundary edgeNames are not supplied, the edges are automatically named using the form EDGE_ n, where n starts at zero and increments by one。 Note that the number of edge names is assumed to be equal to the number of points。 Note: The order of the points actually set on the oaBoundary is not guaranteed to be the same as the order of points passed to the setEdges() function。 Consequently, the order of points returned by a subsequent oaBoundary::getPoints() may be different from the order of points specified in points。
异常
oacBoundaryHasExtraPoints。oacBoundaryTooFewPoints。
Python 示例
from oapy._oa import _design
# assume obj is a oaBoundary
obj.setEdges(points, edgeNames)