Hi everyone,
I wrote this script but it doesn't work. I don't know what's wrong. Please help! Thx!
Private Sub RunScript(ByVal brep As Brep, ByVal vector As List(Of Vector3d), ByRef A As Object)
Dim breps As New List(Of Brep)
Call translate(breps, brep, vector)
A = breps
End Sub
'<Custom additional code>
Sub translate(ByRef breps As List(Of Brep), ByVal brep As Brep, ByVal vector As List(Of Vector3d))
If breps.Count() > vector.Count() Then Exit Sub
Dim v0 As New Vector3d
Dim count As Integer
count = vector.Count()
For i As Integer = 0 To count - 1
v0 = vector(i)
brep.translate(v0)
breps.Add(brep)
i = i + 1
Next
Call translate(breps, brep, vector)
End Sub
Andrew Heumann
you've created a recursive function with no way out! The subroutine "Translate" calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate" which calls the subroutine "Translate".... you get the picture.
It would be helpful to give an explanation of what you're trying to do so we can make suggestions about how to accomplish it.
Nov 24, 2012