- 积分
- 738
- 明经币
- 个
- 注册时间
- 2004-11-5
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
因为样条曲线的拟合点可能比较多,一次输入进去显得比较乱,想让用户一个一个地输入每个拟合点坐标,然后将各个拟合点的坐标组成一个一维数组,用来画出样条曲线。但试了半天还是没法实现,请高手帮忙解决。下面的程序是错的,拿出来主要是想表达一下我的问题所在
Dim stpoint As Variant Dim etpoint As Variant Dim x As Integer '拟合点个数 Dim i As Integer Dim j As Integer Dim vet As Variant,Dim vetpoint As Variant x = ThisDrawing.Utility.GetInteger("请输入拟合点个数:") Dim xx As Integer '拟合点参数个数 'xx = (x - 1) * 3 For i = 0 To x j = i + 1 vet(, i) = ThisDrawing.Utility.GetPoint(, vbCrLf & "请输入第" & j & "个拟合点坐标:") Next stpoint = ThisDrawing.Utility.GetPoint(, vbCrLf & "请输入起始控制点坐标:") etpoint = ThisDrawing.Utility.GetPoint(, vbCrLf & "请输入终结控制点坐标:") 'Set splineob = ThisDrawing.ModelSpace.AddSpline(vetpoint, stpoint, etpoint) |
|