TA的每日心情 | 奋斗 2024-11-26 10:05 |
---|
签到天数: 1136 天 [LV.10]以坛为家III
入门
- 积分
- 70
|
找了一下说明书,有这样一段话,确实和你的不太一样,还有个例子,你看下
[size=2em]SetSweptProfilePoints
Sets the points that define a polyline or a fitted curve in a swept primitive profile. If the profile curve is a fitted curve, the start and end tangent vectors can also be specified. Similar to GetSweptProfilePoints, profileKey can be either the data access name of a specific profile curve or the data access name of the primitive.
[size=1.5em]Visual Basic Syntax
SetSweptProfilePoints(profileKey As String, profilePoints() As Double, numPoints As Integer, [startTanY As Double], [startTanZ As Double], [endTanY As Double], [endTanZ As Double])
[size=1.5em]Parameters
profileKey
| (input) specifies the data access name of the curve of interest in the swept primitive profile.
| profilePoints
| (input) is a 2-dimensional array defining the profile curve. The first dimension corresponds to the number of points in the curve. The second dimension of the array must be 2 (Y and Z coordinate values for each point).
| numPoints
| (input) is the number of points in profilePoints.
| startTanY
| (input, optional) is the Y component of the tangent vector at the starting point of the fitted curve.
| startTanZ
| (input, optional) is the Z component of the tangent vector at the starting point of the fitted curve.
| endTanY
| (input, optional) is the Y component of the tangent vector at the end point of the fitted curve.
| endTanZ
| (input, optional) is the Z component of the tangent vector at the end point of the fitted curve.
|
[size=1.5em]Return Values
A status indicating success or failure.
[size=1.5em]Example
Dim LT As New LightTools.LTAPI4
Dim status As LTReturnCodeEnum
Dim curve as String
curve = "LENS_MANAGER[1].COMPONENTS[Components].SWEPT_PRIMITIVE[1].CURVE[1]"
numPoints = 20
Dim newPoints() As Double
ReDim newPoints(numPoints - 1, 1)
For i = 0 To numPoints - 1
Z = -1 + 2 * (i / (numPoints - 1))
Y = 0.5 + 0.5 * Z * Z
newPoints(i, 0) = Y
newPoints(i, 1) = Z
Next
status = LT.SetSweptProfilePoints(curve, newPoints, numPoints)
|
|