找回密码
 注册
搜索
楼主: f(x)

[相关书籍] RhinoScript深入教程

[复制链接]
发表于 2010-3-23 11:04:35 | 显示全部楼层
好......................
回复

使用道具 举报

发表于 2010-3-26 23:28:18 | 显示全部楼层
好棒的表現  我喜歡
回复

使用道具 举报

发表于 2010-4-17 23:58:38 | 显示全部楼层
从看例子开始,当觉得没什么好看时事就成了
回复

使用道具 举报

发表于 2010-4-26 20:52:51 | 显示全部楼层
太好了 太好了太好了太好了 太好了太好了太好了 太好了太好了太好了 太好了太好了太好了 太好了太好了太好了 太好了太好了
回复

使用道具 举报

发表于 2010-5-16 20:22:16 | 显示全部楼层
very useful
回复

使用道具 举报

发表于 2010-5-16 20:56:05 | 显示全部楼层
希望多一些这样的东西给初学者
回复

使用道具 举报

发表于 2010-5-16 20:56:34 | 显示全部楼层
very useful~~~
回复

使用道具 举报

发表于 2010-5-18 12:16:00 | 显示全部楼层
难呀,一个个学吧
回复

使用道具 举报

发表于 2010-5-18 22:03:18 | 显示全部楼层
现在还看不懂  不过感谢楼主的分享精神
回复

使用道具 举报

发表于 2010-6-4 11:01:13 | 显示全部楼层
Rhino 4.0 RS6版有一个“ShootRay”函数是专门干这个的,呵呵!
回复

使用道具 举报

发表于 2010-6-4 12:39:14 | 显示全部楼层
看看看啊看看
回复

使用道具 举报

发表于 2010-7-2 17:51:07 | 显示全部楼层
还是要学习啊 大学学的C语言快忘完了
回复

使用道具 举报

发表于 2010-7-6 16:19:38 | 显示全部楼层
汗,,,怎么搞的啊,,牛
回复

使用道具 举报

发表于 2010-7-7 11:44:18 | 显示全部楼层
感谢分享。。。
回复

使用道具 举报

发表于 2010-7-18 15:47:32 | 显示全部楼层
还是在学校念书的人心静得下来, 等到工作了,心都散了。

我又来坐坐,学习学习。
回复

使用道具 举报

发表于 2010-7-30 20:51:13 | 显示全部楼层
能否为你的脚本注释?很难明白
回复

使用道具 举报

发表于 2010-8-6 19:11:15 | 显示全部楼层
好东西啊。。。。。
回复

使用道具 举报

发表于 2010-8-10 10:38:02 | 显示全部楼层
maya......  学不过来了
回复

使用道具 举报

发表于 2010-8-15 16:38:23 | 显示全部楼层
很好的练习,感谢楼主!

自己也刚开始学
好多地方,慢慢才弄明白,加了些注释,希望大家能更理解
回复

使用道具 举报

发表于 2010-8-15 16:39:55 | 显示全部楼层
Call Main()
Sub Main()
Rhino.AddLayer "black",RGB(0,0,0)    'define a New layer

Dim headPt,endPt : endPt = Array (0,0,0)
'define begining point and terminal point
'pre-define the coordinate of the endPoint as the Looping beginning Point
Dim StrLine
Dim r,g,b : r=0 : g=0 : b=0   'define the RGB colour Value
Dim count : count = 0    'define the looping counter
Const EDGELEN = 500    'Define the Length of Line

Do
  headPt = endPt   'evaluate the coordinate to headpoint
  endPt = getPt (EDGELEN)    'call the subroutine,get a random point
  strLine = Rhino.AddLine(headPt,endPt)    'create a line
  Rhino.ObjectLayer strLine ,"black"    'set the Layer of Line
  Rhino.ObjectColor strLine ,RGB(r,g,b)    'set the color of Line, 1st is whight
   
  r = r + 1    'shift the R color ,step-Len is 1
  If r >= 255 Then
   r = 0
  End If
  b = b + 2    'shift the B color ,step-Len is 2
  If b >= 255 Then
   b = 0
  End If
  g = g + 3    'shift the G color ,step-Len is 3
  If g >= 255 Then
   g = 0
  End If
  '此处将RGB的步长调整为不同,这样就可以生成彩色的线了
  
  count = count + 1    'The looping step
  
  If count > 5000 Then Exit Do   ' The looping Judge term
  
Loop


End Sub
Function getPt (EDGELEN)   'subroutine
Dim randomNum : randomNum = Int(Rnd()*6)    'generate a random number 0~6
Select Case randomNum    'condition Judgement
  Case 0
   getPt = Array(Int(Rnd() * EDGELEN), Int(Rnd() * EDGELEN), 0)
  ' get a point on x-y plane
  Case 1
   getPt = Array(0, Int(Rnd() * EDGELEN), Int(Rnd() * EDGELEN))
  ' get a point on y-z plane
  Case 2
   getPt = Array(Int(Rnd() * EDGELEN), 0, Int(Rnd() * EDGELEN))
  ' get a point on x-z plane
  Case 3
   getPt = Array(Int(Rnd() * EDGELEN), Int(Rnd() * EDGELEN), EDGELEN)
  ' get a point on plane which parallel to x-y plane with 500 distance
  Case 4
   getPt = Array(Int(Rnd() * EDGELEN), EDGELEN, Int(Rnd() * EDGELEN))
  ' get a point on plane which parallel to x-z plane with 500 distance
  Case 5
   getPt = Array(EDGELEN, Int(Rnd() * EDGELEN), Int(Rnd()* EDGELEN))
  ' get a point on plane which parallel to y-z plane with 500 distance
  Case Else
   rhino.Print "else"
End Select
End Function
回复

使用道具 举报

NCFZ微信公众号

手机版|小黑屋|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 ) 辽公网安备21021102000973号

GMT+8, 2026-11-23 19:11 , Processed in 0.049896 second(s), 23 queries , Gzip On.

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表