|
Rhino.Print ("XXX")'在Command命令行中输出字符|参数|变量等
Rhino.MessageBox ("Info")'弹出信息窗口
Sin(X),Sqr(X),Tan(X),Log(X)
a = Left("Rollercoaster", 6)'Roller
myString = Rhino.GetString("Input String here:")
myString = UCase("helloRhino")'HELLORHINO
myString = LCase("HelloRhino")'hellorhino
vbFalse/vbTrue
Rhino.IsObject(strObjectID) '判断能力strObjectID是否是Object
Rhino.IsCurveClosed(strID) '判断strID是否为封闭曲线
Rhino.DeleteObject(strID) '从场景中删除物体strID
Rhino.UnselectAllObjects() '取消对所有场景中物体的选择
Rhino.SelectObject (strCurveID) '选择物体strCurveID
Rhino.Command ("_Move 0,0,0 2,0,1") '移动被选择的物体
Rhino.CopyObject (strCurveID) '复制strCurveID
在窗口中绘制矩形并连接各线段:
Rhino.Command "_Line 0,0,0 2,0,0" '在Command命令行中绘线
Rhino.Command "_Line 2,0,0 2,2,0"
Rhino.Command "_Line 2,2,0 0,2,0"
Rhino.Command "_Line 0,2,0 0,0,0"
Rhino.Command "_SelCrv"
Rhino.Command "_Join"
Rhino.CloseCurve(strCurveID) '将曲线strCurveID封闭
dbl = Rhino.GetReal("Specify a minimum curve length")'从Command输入Double数据并赋给dbl变量
lng = Rhino.GetInteger("What is your age?")' 从Command命令行中输入整型数量,并赋给lng
vbNewLine '转行
strObjects = Rhino.SelectedObjects() ' 将场景中选中的物体存入strObjects(数组)
str = Rhino.ObjectName(strObjects(index)) '提取数组strObjects中的第i个元素的名字并赋给出str
strObjects = Rhino.GetObjects("Select objects:")'逐个点取物体并存入strObjects数组
IsArray(strObjects) '判断strObjects是否为数组
VarType(strName) '返回strName的数据类型
dblPoint = Rhino.GetPoint("Pick a point!") '从场景中点取点并存入dblPoint数组变量
Rhino.AddPointCloud(arrPoints)
逐个加入点至自定义数组:
1
2 Dim i
3 Dim dblTempArray
4 Dim arrPoints()
56
i = -1
7 Do
8 dblTempArray = Rhino.GetPoint("Pick a point to add to the solution")
9 If IsArray(dblTempArray) Then
10 i = i+1
11 ReDim Preserve arrPoints(i)
12 arrPoints(i) = dblTempArray
13 Else
14 Exit Do
15 End If
16 Loop
17
18 If i = -1 Then Exit Sub
19 Rhino.AddPointCloud(arrPoints)
Rhino.EnableReDraw(vbFalse) '提高效率
...
Rhino.EnableReDraw(vbTrue) '
VarType(strBase) <> vbString ' 判断strBase是否不是String数据
Space(lngLength) '空出lngLength个字
|
评分
-
查看全部评分总评分 : 读者积分 +1
|