Gas Tank Surface

Silindir.




Option Explicit

Sub GasTankSurface()
 Dim recIn
 Dim curLast, newLast
 Dim Axis(1)

 recIn = Rhino.GetRectangle()
 If IsNull(recIn) Then Exit Sub
 curLast = Rhino.FirstObject
 Rhino.Command "-_Rectangle _3Point _Rounded w" & Rhino.Pt2Str(recIn(0)) & _
             " w" & Rhino.Pt2Str(recIn(1)) & _
             " w" & Rhino.Pt2Str(recIn(2)) & _
             " _Pause", vbFalse
 newLast = Rhino.FirstObject
 If newLast = curLast Then Exit Sub
 If IsNull(newLast) Then Exit Sub

 Rhino.EnableRedraw vbFalse
 Axis(0) = Array((recIn(0)(0)+recIn(3)(0))/2, _
     (recIn(0)(1)+recIn(3)(1))/2, _
     (recIn(0)(2)+recIn(3)(2))/2)
 Axis(1) = Array((recIn(1)(0)+recIn(2)(0))/2, _
     (recIn(1)(1)+recIn(2)(1))/2, _
     (recIn(1)(2)+recIn(2)(2))/2)
 Rhino.UnselectAllObjects
 Rhino.SelectObject newLast
 Rhino.Command "-_Revolve w" & Rhino.Pt2Str(Axis(0)) & " w" & Rhino.Pt2Str(Axis(1)) & _
      " _StartAngle=0  _EndAngle=360  _DeleteInput=Yes  _Deformable=No _Enter", vbFalse
 Rhino.EnableRedraw vbTrue
 Rhino.SelectObject Rhino.FirstObject
End Sub
GasTankSurface




Ekleyen: Mad_Max

Kapalı

Topic closed automatically because it`s been more than a year!