Forgot password?

Create an account!

Forum

« back

RhinoScript – Grey Values

Messages

Please log in to write a message.

  • 4. ivo (Feb 02, 2009 09.17):

    go and have a look at this:
    en.wiki.mcneel.com/default.aspx/McNeel/RhPicture_GDIPen.html
    it's a plugin which allows you reading and writing images

  • 3. tosteri (Jan 29, 2009 09.08):

    Ups, take out the extra

    Rhino.EnableRedraw(False)

    before using

  • 2. tosteri (Jan 29, 2009 09.06):

    Sure. You can use the 'meshheighfield' command. It's a bit rude way to do it, but nevertheless effective. Here's an implementasion of it used in an older script to make openings in a structure according to a bitmap-image. (sorry, its party in finnish)

    Dim lngWidth : lngWidth = Rhino.GetReal("Meshgridsize in width", 10, 2, 100)
    Dim lngHeight : lngHeight = Rhino.GetReal("Meshgridsize in height", 10, 2, 100)
    Dim rakkork : rakkork = Rhino.GetReal("Total height of mesh in units", 30, 2, 100)
    Dim korkeus : korkeus = Rhino.GetReal("Lower surface height factor", 25, 2, 30)

    Dim strCmd : strCmd = "_MeshHeightfield _pause _pause _gridsize _width=" & lngWidth & " _Height=" & lngHeight & " _enter _elevation _valuefactor=" & korkeus & "  _enter _enter _enter"

    Call Rhino.Command(strCmd)
           
    Rhino.EnableRedraw(False)
           
    Call Rhino.Command("_SelLast")
    Pinta = Rhino.SelectedObjects()
    'use these to store the vertex information from the picture
    'the z-value and clolor of the vertex correspond to the color of the image
    'so you can use either one
    arrFaceVert = Rhino.MeshFaceVertices(Pinta(0))
    arrvertex = Rhino.MeshVertices(Pinta(0))
  • 1. nivis (Dec 15, 2008 12.25):

    Hi all,
    is there a function which gets the grey values of a jpg file? i want to use it for a facade and control window openings...
    thanks,
    Ben

Recommend

Why are these buttons gray?