A playground for University of Bologna Students and a 6-days seminar about digital tools.

Digital generative tools are a very important part of architectural education. Andrew Kudless during his conference at SimAE was telling about chinese traditional woodcraftsmen: they spend their first two years of apprentice in making their own tools. Today, we have a large pool of digital ready made tools, built to respond to more or less specific problems or tasks, while keeping a level of flexibility and personalization. The majority of these tools have hidden capabilities, which can only be accessed bypassing the conventional interface and getting close to the machine logic of programming or building parametric components which generate shapes. Thus, seriality, differentiation, complexity can be implemented in architectural projects through code, in order to exploit the power of algorithmic based complex systems which are the basis of biological systems.


But, before going through such complexity, we must start with simple tasks and simple rules. Before playing seriously we need practice. This is the playground where a bunch of students will start to practice, a pool where they will share their results and questions. Maybe the stuff here that will be posted will seem obvious or naive to the navigated code-monkey, but, as I mentioned before, we all start from the basics and this is intended as a place to start. However, any comment and contribution is appreciated.

Playground is open, let's play! _ Alessio

8.2.09

Crazy Trivela





This script make a drill along the curve you select:
You can also see the 3D model (but first install the viewer)
[link to 3Dmodel dont work. copy this address to your browser address line:
http://laliva.altervista.org/abc/trivela.wrl]


Option Explicit
'written by Luca Nazzari
'Script copyrighted by ©VitrartiV
'Date sabato 7 febbraio 2009 15.37.50

Sub Main()

Dim arrstart, arrend, arrlines, strsrf
Dim i
Dim dblj
Dim intNum
Dim strelica
Dim strline

Call rhino.enableredraw(False)

'input number of points

intNum=Rhino.GetInteger("n. of points?",50,10,200)

if isnull(intnum) then exit sub

ReDim arrstart(intNum-1)
ReDim arrend(intNum-1)
ReDim arrlines(intNum-1)

dblj=0

'start cycle
'it'll make the spiral's suface

For i=0 To UBOUND (arrstart)

arrstart(i)= array(dblj*cos(i),dblj*sin(i),i)
arrend(i)=array(dblj*(-cos(i)),dblj*(-sin(i)),i)
dblj=dblj+((i/(ubound(arrstart)))/4)

Next

'now i'll ask a curve to flow my surface

Dim strl1,strl2
Dim arrl12
Dim strsrfe, strbase, strtarget
Dim arrpi,arrpf
Dim cmd

strl1= rhino.addinterpcurve(arrstart)
strl2= rhino.AddInterpCurve(arrend)
arrl12=array(strl1,strl2)
strsrfe= rhino.AddLoftSrf(arrl12)

strbase=rhino.addline(array(0,0,0),array(0,0,intnum-1))

strtarget=Rhino.GetObject("Target ?")
If isnull (strtarget) Then Exit Sub
Dim dblleng
dblleng=rhino.curvelength(strtarget)
If dblleng Call msgbox("target curve is too short")
Exit Sub

End If

Rhino.selectobjects strsrfe
cmd="flow selid "&strbase&" selid "&strtarget
Rhino.command cmd

Call rhino.Deleteobject(strl1)
Call rhino.Deleteobject(strl2)
Call rhino.Deleteobject(strbase)
Call rhino.Deleteobjects(strsrfe)

Call rhino.enableredraw(True)

End Sub

Call Main()



2 comments:

  1. Luca,

    I think you posted just a part of the script. Please edit your post to include all the lines.

    Coming to the script, try to improve it by doing it directly on the curve, without first generating the trivela along a straight line.

    A.

    PS: watch out for the Enableredraw position at the beginning (remember to put it after all input operations or you might experience some screen psychedelic side-effects)

    ReplyDelete
  2. Yes, there was an error in posting images.
    Fixed.

    uhm, ok i'll try it.

    >>PS:yes, i'll remember it next time

    ReplyDelete