Grasshopper

algorithmic modeling for Rhino

Hi there,

 

I'm wondering if there's any way I can take a bunch of text object numbers from rhino and use them as a list of integers in grasshopper.

I basically have a site model to make with several hundred blocks that would have to be extruded to specific heigths. the height numbers are given as a text object in the center of each one of the blocks in the floorplan...

 

Hoping I could use grasshopper to save some time, but it might be a job for rhino script maybe. Any help on this would be greatly appreciated.

 

Thanks!

 

Cheers,

 

Views: 2409

Reply to This

Replies to This Discussion

Here's a grasshopper script that will get text dot objects from rhino and return their contents and location.

 

If what you have are 3d text objects, you'll need to figure out a way to convert them to dots (I think this is also rhinoscriptable - see here for the reverse process: http://wiki.mcneel.com/developer/scriptsamples/convertdotstotext)

 

Hope this helps....

 

 

Attachments:

and here's a rhinoscript that will convert your text objects to dots:

 

 

Option Explicit

Call Main()

Sub Main()

 Dim arrObjects, strObject arrObjects = Rhino.AllObjects

 If IsArray(arrObjects) Then

For Each strObject In arrObjects

If Rhino.IsText(strObject)

Then Rhino.SelectObject strObject

Dim txtText, txtPt

txtText = Rhino.TextObjectText(strObject)

txtPt = Rhino.TextObjectPoint(strObject)

Rhino.AddTextDot txtText,txtPt 

Rhino.DeleteObject (strObject)

End If

Next

End If

End Sub

Hi, this is exactly what I need to do but unfortunately I can't get your script to work, any clue what might be the issue? I'm working in rhino4 sr9..

Thanks,

Linda

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2019   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service