Forgot password?

Create an account!

Forum

« back

RhinoScript – Where is the problem?

Messages

Please log in to write a message.

  • 3. caldescm (Mar 14, 2011 11.23):

    Hi Johannes!

    It's true. Script runs without erros message... but it doesn't do what I want...

    In the "first part", the script runs perfectly. It offset the curves and it created a surface between them. But when it copies the curve called "selcala" to the end of the offset curve to do a "Rhino.addsweep1"... the surface is not created...

    ¿?

    How is syntax highlighting used?

    Thanks

  • 2. Johannes (Mar 10, 2011 19.25):

    hi, there will be no restriction for beginner or professional. feel free to ask.
    The script runs without error message .... want exactly do you want to achieve and where exactly is the problem?

    please use next time syntax highlighting.

    johannes

  • 1. caldescm (Mar 10, 2011 18.46):

    Hi! I am a beginner on this... sorry!
    I'm trying to do a double loop, but... something is going wrong!
    could someone help me?

    The code is:

    Option Explicit

    Dim arrObjects, i, arrNewobject, a, b, c, d, e, arrStart, arrEnd, dist, borralas, puntocopy, selcala, puntofinal, strRail, arrshapes
    arrObjects = Rhino.GetObjects("Select curves to offset")
    arrStart = Array(0,0,0)

    If IsArray(arrStart) Then
    dist = Rhino.Realbox("ala")
    arrEnd = Array(dist,0,0)

    If IsArray(arrEnd) Then
    Rhino.AddLine arrStart, arrEnd
    End If
    End If

    puntocopy = Rhino.GetPoint("selecciona el punto del ala")
    selcala = Rhino.GetObject("selecciona el ala")
    borralas = Rhino.GetObjects("selecciona objetos a borrar")



    If IsArray(arrObjects) Then
    For i = 0 To UBound(arrObjects)
    arrNewobject = Rhino.OffsetCurve(arrObjects(i), Array(0,0,1), 0.5, Array(1,0,0), 0)
    a = Rhino.selectobject(arrNewobject(0))
    b = Rhino.selectobject(arrobjects(i))
    c = Rhino.selectedobjects
    Rhino.AddEdgeSrf c
    Rhino.UnselectallObjects
    puntofinal = Rhino.CurveStartPoint(arrobjects(i))
    Rhino.CopyObject selcala, puntocopy, puntofinal

    strRail = Rhino.selectobject(arrobjects(i))
    If IsArray(strRail) Then
    arrshapes = Rhino.selectobject(selcala(i))
    If IsArray(arrshapes) Then
    Rhino.addsweep1 strRail, arrshapes
    End If
    End If
    Rhino.unselectallobjects
    Next
    End If
    Rhino.DeleteObjects borralas


    Thanks for your time!

Recommend

Why are these buttons gray?