Grasshopper

algorithmic modeling for Rhino

generating terrain model from Text and 2D-Textposition-Points

Hi everyone,
I'm faced with a problem that seems to occur fairly regularly in my architecture studies.
I am trying to create a 3d terrain model from given points in a dxf-file.
Previously, when files had terrain contour lines , I made a grasshopper-file that divided these, took the division points, and in Rhino, with point set reconstruction tool, made a model via delauney triangulation.
Now, all I have is Rhino Text Objects and their position points in 2D. The Text Objects contain the z-value of the points. Is there a way to get the origin point of the text objects and the value of the text object into grasshopper in some sort of order, so that 3d points can be constructed?
Any suggestions, also as to how I can get the text objects as string into grasshopper, would be appreciated.
Thanks,
See Man

Views: 24073

Replies to This Discussion

Hia,

I tried your code but got the follow error:

Error: Overload resolution failed because no accessible 'New' can be called without a narrowing conversion

Any ideas why?

Thanks,

Will
Here's a link to a rhinoscript that does the same thing:

http://www.rhinoscript.org/rhinoscript/44
I'm also experiencing this bug, any solutions?
Hi all, digging up an old post- but this is a much better way of modeling terrain then I've been using. The survey's I often get include both number and letter combination, and this script will only accept numeric data (of course). Does anyone know of a quick way to select or isolate only the numeric components of text from Rhino?

Sorry I just saw this, one year too late. In case anyone else needs it, the code is the following:

    Dim objref As New docobjects.ObjRef(x)

    Dim txt As TextEntity = objref.TextEntity

     Dim z As String = system.Text.RegularExpressions.Regex.Replace(txt.text, "[^0-9.]", String.Empty)

    a = New point3d(txt.Plane.OriginX, txt.Plane.OriginY, z)

 

This works when the decimal separator is a point, if it's a comma replace [^0-9.] with [^0-9,]

Hi Vicente,

I have been following this script from day one and just realized that You had updated it to only accept numeric input! Thank You for that.

That makes this little tool even more productive!

I was asked to update this script so it works in the current GH version.

It works in the following way:

Place an ID parameter, reference the text objects in this parameter, place a vb component, right click on the x input and set the type hint to GUID, connect the ID parameter to the x input. Double click on the VB component and paste the following code:

 

Dim objref As New docobjects.ObjRef(x)

Dim txt As TextEntity = objref.TextEntity

a = New point3d(txt.Plane.OriginX, txt.Plane.OriginY, txt.Text)

Hi Vicente,

Is it possible to add options to select one or more points clouds. In order to extract the points of the cloud.

Thanks for your reply

This script converts text objects to 3d points with the z value of the point being the text content.

What would be the purpose of being able to select point clouds?

For add points in GH

You want the result of the script to be a point cloud rather than individual points?

I would extract points in pts clouds. If I have many pts clouds well Create brunch of tree

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service