Contour Interpolation with Rhino

Landscape Architecture for Landscape Architects Forums TECHNOLOGY Contour Interpolation with Rhino

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #177425
    Ryland Fox
    Participant

    I don’t know if anyone uses Rhino very much, I have pretty much replaced Autocad with it because it is easy to use and extremely powerful.

    Anyways, I wrote a script to interpolate between points so that the process of setting up new contours is quick.

    Here is how it works:
    Pick two points
    Set the grid size
    Set the height of the new contour
    A new point is created and inserted on a layer that is named its height
    i.e. a point at 97 meters would be in a layer called 97, if the layer does not exist
    it is created.

    The script works for me but it is better if others test it, so let me know what you think.

    #177427
    Ryland Fox
    Participant

    Wrote a companion script that displays the z Coordinate of selected points so you can see what it is and know
    what height to interpolate from it.
    Looks like this:
    Option Explicit

    ‘ Subroutine: ZCoordinate
    ‘ Purpose: Adds text dot with zCoordinate to points
    ‘ Author: Ryland Fox a href=”http://www.landscripting.blogspot.com”>http://www.landscripting.blogspot.com(adapted from Roland Snooks annotateCurve | 2006 | http://www.kokkugia.com)

    ZCoordinate()
    Sub ZCoordinate ()

    Dim arrPick, dblHeight, strPoint, arrPoint, zCoor

    ‘ Choose points
    arrPick = Rhino.GetObjects(“Pick points”, 1)
    If IsNull(arrPick) Then Exit Sub

    ‘ Loop through each picked point and insert an annotation dot
    For Each strPoint In arrPick
    arrPoint = Rhino.PointCoordinates(strPoint)
    zCoor = arrPoint(2)
    Rhino.print(zCoor)

    ‘ Insert Text Dot
    Rhino.AddTextDot zCoor, arrPoint

    Next

    End Sub

    #177426
    Ryland Fox
    Participant

    I haven’t actually done anything with it except test it. I just wrote it to see if I could. I am going to see if I can make an Autocad version of it for a friend at a firm though.

    There are definite improvements it needs. You have to put in the distance between the two points, which I think
    I can automate. It just needs some simplification in general. But anyway. Attached is a file you can try it on.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Lost Password

Register