Forgot password?

Create an account!

Forum

« back

RhinoScript – contour linies

Messages

Please log in to write a message.

  • 3. Johannes (Jun 19, 2010 14.32):

    equally to the

    Call Rhino.ObjectColor(strCurve, RGB(255,0,0))

    you can change the object layer

    Call Rhino.ObjectLayer(strCurve, "-5")

    but you need to create the layer before (somewhere outside the loop)

    Call Rhino.AddLayer("-5")

  • 2. tobi haptik (Jun 19, 2010 14.22):

    Option Explicit

    Call SortCurvesHeight()
    Sub SortCurvesHeight()

    Dim arrCurves
    Dim strCurve, arrCoordinates

    arrCurves = Rhino.ObjectsByType(4,False)
    Call Rhino.ObjectColorSource(arrCurves,0)

    Dim i
    For i = 0 To UBound(arrCurves)

    strcurve = arrCurves(i)
    arrCoordinates = Rhino.CurveMidPoint(strCurve)

    If arrCoordinates(2) <= -10 Then
    Call Rhino.ObjectColor(strCurve,RGB(128,0,255))
    ElseIf arrCoordinates(2) >-10 And arrCoordinates(2) <= -5 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,0,128))
    ElseIf arrCoordinates(2) >-5 And arrCoordinates(2) <= 0 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,0,0))
    ElseIf arrCoordinates(2) >0 And arrCoordinates(2) <= 5 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,128,0))
    ElseIf arrCoordinates(2) >5 And arrCoordinates(2) <= 10 Then
    Call Rhino.ObjectColor(strCurve,RGB(128,255,0))
    ElseIf arrCoordinates(2) >10 And arrCoordinates(2) <= 15 Then
    Call Rhino.ObjectColor(strCurve,RGB(0,255,255))
    ElseIf arrCoordinates(2) >15 And arrCoordinates(2) <= 20 Then
    Call Rhino.ObjectColor(strCurve,RGB(0,0,255))
    ElseIf arrCoordinates(2) >20 And arrCoordinates(2) <= 25 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >25 And arrCoordinates(2) <= 30 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >30 And arrCoordinates(2) <= 35 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >35 And arrCoordinates(2) <= 40 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >40 And arrCoordinates(2) <= 50 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >50 And arrCoordinates(2) <= 55 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >60 And arrCoordinates(2) <= 65 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >65 And arrCoordinates(2) <= 70 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >70 And arrCoordinates(2) <= 75 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >80 And arrCoordinates(2) <= 85 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >85 And arrCoordinates(2) <= 90 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >90 And arrCoordinates(2) <= 95 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >100 And arrCoordinates(2) <= 105 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >105 And arrCoordinates(2) <= 110 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >110 And arrCoordinates(2) <= 115 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >115 And arrCoordinates(2) <= 120 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >120 And arrCoordinates(2) <= 125 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >125 And arrCoordinates(2) <= 130 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >130 And arrCoordinates(2) <= 135 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >135 And arrCoordinates(2) <= 140 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    ElseIf arrCoordinates(2) >140 And arrCoordinates(2) <= 150 Then
    Call Rhino.ObjectColor(strCurve,RGB(255,255,255))
    Else
    Call Rhino.ObjectColor(strCurve,RGB(0,0,0))
    End If
    Next
    Call Rhino.Print("done!")
    End Sub

  • 1. tobi haptik (Jun 19, 2010 14.20):

    hello how can i change the contour lines into new layers ?

    change contour lines -5 to new layer -5

    can i do this with rhino.objectlayer ?

Recommend

Why are these buttons gray?