Summary: RhinoScript 를 사용하여 여러 개의 커브를 한 번에 파이프로 만드는 방법을 소개합니다.
Rhino 의 Pipe 명령은 한 커브를 중심으로 원형 프로파일로 서페이스를 만듭니다. 이 명령은 한 번에 하나의 커브에 실행됩니다. 즉, n 개의 커브를 파이프 실행하려면 Pipe 명령을 n 번 실행해야 합니다.
다음 샘플 RhinoScript 코드를 사용하면 한 번에 여러 개의 커브를 파이프 실행할 수 있습니다.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' PipeAll.rvb -- September 2008 ' If this code works, it was written by Rajaa Issa. ' If not, I don't know who wrote it. ' Works with Rhino 4.0. Option Explicit Sub PipeOne(strRail, strRadius) Dim strCmd strCmd = "! _-Pipe _SelID " & strRail & " " & strRadius & " _Cap=_Round _Enter _Enter" Call Rhino.Command(strCmd, 0) End Sub Sub PipeAll Dim arrCurves, name, pipeRadius arrCurves = Rhino.GetObjects("Select curves to pipe", 4) pipeRadius = Rhino.GetReal("Pipe radius") 'PIPE If IsArray(arrCurves) Then For Each name In arrCurves Call PipeOne(name, pipeRadius) Next End If End Sub ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Rhino.AddStartupScript Rhino.LastLoadedScriptFile Rhino.AddAlias "PipeAll", "_NoEcho _-RunScript (PipeAll)"