Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 6017

How to Bridge between various Functions in Rhino Script?

$
0
0

@Vahab wrote:

Hello,
My question regarding Rhino Script is ...
What if we would define several "Sub"s in order to use their outputs in a new function?
Here is the Example:
Thanks :slight_smile:

Call c()

Sub a()
Dim strcr,ext,cp
strcr = Rhino.getobject("pick 1st")
ext = Rhino.ExtrudeCurveStraight(strcr, Array(0, 0, 0), Array(0, 0, 10))
cp = Rhino.CapPlanarHoles(ext)
End Sub

Sub b()
Dim strcr,ext,cp2
strcr = Rhino.getobject("pick 2nd")
ext = Rhino.ExtrudeCurveStraight(strcr, Array(0, 0, 0), Array(0, 0, 10))
cp2 = Rhino.CapPlanarHoles(ext)

End Sub

Sub c()
Rhino.BooleanDifference cp, cp2
End Sub

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6017

Trending Articles