Finally I have used your idea with a divide by length component before
and store lists in the script
Thanks for your help
Sorry for responding so late but i'm a little bit busy

Sub RunScript(ByVal listCrv As List(Of OnCurve), ByVal listLength As
Integer, ByVal oneStep As Double, ByVal startSize As Double, ByVal
ptMidle As List(Of On3dPoint), ByVal crvLength As List(Of Double),
ByVal ptOncrv As List(Of On3dPoint), ByVal nbptOncrv As List(Of
Integer))
    Dim i,j As Integer
    Dim x,y  As Integer
    Dim divSize As Double
    Dim Increment As Double
    Increment = startSize
    x = 0
    j = 0
    Dim ptList As New List(Of Double)
    Dim sizeList As New List(Of Double)
    Dim lengthList As New List(Of Double)


    For i = 0 To listLength
      ptList.Add(Increment)
      sizeList.Add(x)
      For j = x To (x + (nbptonCrv(i) - 1))
        If ptonCrv(j).x < ptMidle(i).x Then
          Increment = Increment + oneStep
        Else Increment = Increment - oneStep
        End If
        ptList.Add(Increment)
      Next
      Increment = startSize
      x = x + ( nbptonCrv(i) + 1 )
    Next
    A = sizeList
    B = ptList

  End Sub

On 10 fév, 01:27, Mary <[email protected]> wrote:
> Hi loizoju
>
> I am trying to write a similar script.  From what I've heard about
> grasshopper and its ability to manage lists, you have to make the list
> of lists (list of curves each with point lists, right?) within the
> script (I would use another for loop advancing curves around your
> current for loop) and then also draw the boxes within the script.  GH
> can't handle outputs of lists of lists yet, apparently that is the
> first thing on the list to get fixed for the next version.
>
> Hope that helps, your script helped me.  This was successful for one
> divide?
>
> mary
>
> On Feb 5, 7:06 am, loizoju <[email protected]> wrote:
>
>
>
> > Hi to everybody
>
> > I would like to fine a solution todividea curve by a fixed length
> > using a vb component
> > I'm working on multiple curves and i would like to create points on
> > with a fixed interval on each curve to place some squares with
> > differents scales.
> > Following the script that i did for one single curve using adivideby
> > length component before. The output is used to define the width and
> > the heigth in a rectangle component.
>
> > Sub RunScript(ByVal ptsCurve As List(Of On3dPoint), ByVal ptMidle As
> > On3dPoint, ByVal inCurve As OnCurve)
> >     Dim ptonCrv As on3dPoint
> >     Dim ptListe As New List (Of Double)
> >     Dim Increment As Double
> >     Increment = 0.02
> >     For Each ptonCrv In ptsCurve
>
> >       ptListe.add(Increment)
> >       If ptonCrv.x < ptMidle.x Then
> >         Increment = Increment + 0.0025
> >       Else Increment = Increment - 0.0025
> >       End If
> >     Next
> >     A = ptListe
> >   End Sub
>
> > Thanks- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

Reply via email to