Hi
I'm trying to write a simple script to offset a curve muliptle times (using a 'for loop') but I don't know the vb dotNet syntax. I'm sure lines 84, 88 & 89 are wrong. Any ideas.
Thanks. P
Added by Paul Wintour at 8:25am on September 28, 2010
set of planar closed polylines
BB Difference: Difference of a set of planar closed polylines
BB Intersection: Intersection of a set of planar closed polylines
BB XOR: Exclusive or of a set of planar closed polylines
BB Python component dropped (use Node-in-Code instead)
minor bugfixes
Source code is now available on GitHub
Download Bowerbird…
Sub RunScript(ByVal x As OnCurve, ByVal y As Integer)
'your code here…
Dim BB As OnBoundingBox
BB = x.BoundingBox
Dim minPt As On3dPoint
minPt = BB.Corner(0, 0, 0)
Dim minx As Double = minPt.x
Dim miny As Double = minPt.y
Dim minz As Double = minPt.z
Dim maxPt As On3dPoint
maxPt = BB.Corner(1, 1, 1)
Dim maxx As Double = maxPt.x
Dim maxy As Double = maxPt.y
Dim maxz As Double = maxPt.z
Dim sx As Double = maxx - minx
Dim sy As Double = maxy - miny
Dim sz As Double = maxz - minz
Dim i As Integer
Dim RdPts As New List(Of On3dPoint)
Dim aa As Double
Dim dd As Double
Dim cc As Double
Randomize()
For i = 0 To y
Dim num As New Random
Dim Rnd As Integer = num.Next(1, 10)
aa = minx + sx * Rnd / 10
dd = miny + sy * Rnd / 10
cc = minz + sz * Rnd / 10
Dim pt As New On3dPoint (aa, dd, cc)
RdPts.Add(pt)
Next
A = RdPts…