Forgot password?

Create an account!

Forum

« back

RhinoScript – surface from contour curves

Messages

Please log in to write a message.

  • 3. clausneergaard (Feb 28, 2011 12.02):

    Thanks, Johannes, I'll definitely check that out.

    Cheers.

  • 2. Johannes (Feb 28, 2011 11.17):

    hi, i am convinced that you can program it. but there still exist a powerful tool to get a terrain (surface or mesh) out of heightcurves:
    www.rhinoterrain.com/
    there is a 18 days trial...

    johannes

  • 1. clausneergaard (Feb 28, 2011 10.31):

    Hey all,

    I am an architect, and I've come across the issue of creating a surface from contour curves many times. However, I haven't been able to figure it out yet, which is why I am starting this new topic.

    Is it, in any way, possible to do this? To build a surface from height curves or from points only?

    If I divide all the curves and get all the points from the curve divisions - would I be able to build a surface from these points?

    The pseude-code could look something like this:

    ' input surface (planar surface located in height 0)
    ' input points (from divided height curves)
    ' find closest point on surface from each input pt
    ' insert knot or control point on surface at this location
    ' move knot or control point up in z-direction to match original input pt location

    I image the script would look something like this:

    Call ScriptName()
    Sub ScriptName()

            Dim i
           
            Dim strSrf : strSrf = Rhino.GetObject("select surface", 8)
           
            Dim arrPts : arrPts = Rhion.GetObjects("select points", 1)
            If IsNull(arrPts) Then Exit Sub
           
            If IsSurface(strSrf) Then
                   
                    For i = 0 To UBound(arrPt)
                            Dim arrParam : arrParam = Rhino.SurfaceClosestPoint(strSrf, arrPt(i))
                            ' insert control point at arrParam?
                            ' move control point in z-direction, to arrPt(i) location
                    Next
                   
            End If
           
    End Sub

    Any thoughts?

    Thanks in advance ...

    /Claus

    surface from contour curves
Recommend

Why are these buttons gray?