Forgot password?

Create an account!


« back

RhinoScript – multiple curve lofting


Please log in to write a message.

  • 2. pulgarata (Sep 09, 2013 14.11):

    You have an array with an empty space. This will work:

    Dim LoftArray(1)


  • 1. eren_c (Sep 08, 2013 20.24):


    I'm working on a simple script where the user selects multiple closed curves and the script offsets each curve by a certain amount and creates a loft surface between each original curve and its offset curve.

    for example if there are 4 user created curves (crv1, crv2, crv3, crv 4) the script offsets them creating (crv1_offset, crv2_offset etc.) and lofts between (crv1 and crv1_offset, crv2 and crv2_offset until there are 4 loft surfaces.

    ? can't get it to work. Any help would be appreciated. Thanks in advance. Here's what I have so far:

    Call Main()
    Sub Main()


    Dim arrObjects, strObject

    arrObjects = Rhino.GetObjects("Pick some curves", 4)

    Dim LoftArray(2)

    If IsArray(arrObjects) Then

    For Each strObject In arrObjects

    Dim dblLength

    Dim NewCRV

    dblLength = Rhino.CurveLength(strObject)

    Rhino.OffsetCurve strObject, Array(0, 0, 0), -dblLength / 200

    NewCRV = Rhino.FirstObject

    Rhino.ObjectLayer newCRV, "OffsetCRV"

    LoftArray(0) = strObject

    LoftArray(1) = newCRV

    Rhino.AddLoftSrf LoftArray


    End If

    End Sub


Why are these buttons gray?