11 September 2007
TMD_membrane skin
This is the rhinoscript for realize this kind of pattern on surface:
( first you must to download ArchCut plugin for Rhino4)
------------------------------------------------
Call Main()
Sub Main()
Dim strBrepObject, arrPoints, ArchCut, arrBase(1), arrShift(1), arrPattern(17)
Const intUNum = 30 'Number of points in U direction
Const intVNum = 300 'Number of points in V direction
Const bAdd = False 'Add points to context
Const bPull = True 'Pulled to surface. false=straight panels
'PATTERN DEFINITION
'Base u,v of pattern unit
arrBase(0) = 0 : arrBase(1) = 0
'Shift amount in u,v of unit for pattern repetition
arrShift(0) = 4 : arrShift(1) = 4
'(u,v) Panel points shift (relative to (0,0) base point)
arrPattern(0) = 0 : arrPattern(1) = 0 ' (0,0)
arrPattern(2) = 2 : arrPattern(3) = 1 ' (2,1)
arrPattern(4) = 4 : arrPattern(5) = 0 ' (4,0)
arrPattern(6) = 3 : arrPattern(7) = 2 ' (3,2)
arrPattern(8) = 4 : arrPattern(9) = 4 ' (4,4)
arrPattern(10) = 2 : arrPattern(11) = 3 ' (2,3)
arrPattern(12) = 0 : arrPattern(13) = 4 ' (0,4)
arrPattern(14) = 1 : arrPattern(15) = 2 ' (1,2)
arrPattern(16) = 0 : arrPattern(17) = 0 ' (0,0)
'END OF PATTERN DEFINITION
On Error Resume Next
'Get ArchCut Object
Set ArchCut = Rhino.GetPluginObject("ArchCut")
If Err Then
MsgBox Err.Description
Exit Sub
End If
'Select a polysurface
strBrepObject = Rhino.GetObject("Select object to generate UV based grid points by number", 8 +16)
If (strBrepObject <> vbNull) Then
'Call UV Paneling Method with pattern definition
arrPoints = ArchCut.GenerateUVPanelsNUM( strBrepObject, intUNum, intVNum, bAdd, bPull, arrBase, arrShift, arrPattern )
End If
Set ArchCut = Nothing
End Sub
---------------------------------------------------------
Subscribe to:
Post Comments (Atom)
1 commenti:
ho visto tutto in anteprima... FANTASTICO!
Post a Comment