Grasshopper

algorithmic modeling for Rhino

Hello,

I'm attempting to recreate the script shown in the image to generate topography using an elevation image.

When I attempt to connect the "Replace Paths" component with the paths I've generated in the x direction, the component reports an error:

"Rule notation disallows use of any symbol outside of '[]' or '{}' blocks"

I've included my script, a screenshot of the script I am attempting to recreate, and a screenshot of the error I'm encountering. Is there a work-around for this using an alternate component ?

Thanks,

Matty

Views: 1018

Attachments:

Replies to This Discussion

I'm not sure what script you're trying to re-create or what you're trying to do with all the sorting and "Replace Paths" stuff but it looks to me like both the number of elements and the type of data expected are badly mis-matched.

Isn't this pretty close to what you want?

If you then flatten the 'PLine (PolyLine)' output and loft it, you get a surface.  There is one edge that has a bunch of points much higher than all others and a flat area between that edge and the "terrain" (the black part of the image?), but as you can see, this code is extremely simple.

Attachments:

Thanks for the solution Joseph!

Blend of nurbs (baked to one layer) and polylines (baked to a different layer) both visible, merged.

Or do it with a mesh to begin with so you can do the mesh / plane section thing too

The edge with the high points is because the image dimensions domains started at 1 instead of 0... i.e. they were 1 to 300 and 1 to 385 instead of 0 to 300 and 0 to 385

Attachments:

The mesh results are impressive, and so are the few bits of Grasshopper.  Thanks for the lesson.

There's another way getting an image to a mesh... use Input>>ImportImage component from the Parameters menu. This outputs a mesh representation and you can use the image sampler the same way to move the mesh vertices.

Not sure if this is advantageous or just different!

Good eye on 1-based domains in the image sampler 'Settings'!  Easy fix, much better.

And always good to know and compare tools and ways of terrain/surface modeling, thanks again, will give it a try.

This one compares polylines to nurbs curves; 'Degree (D)' = 2 or more is smoother and lofts faster than polylines.

uh-oh...  looks like the image sampler didn't get saved with either of the code mods I did?  Had to rebuild it for this screen shot "recording" - note the Profiler benchmarks:

oh, and must un-flatten the grid:

Attachments:

Thanks for taking the time to respond Martyn!

I'm attempting this method now and will let you know my thoughts on it. Again, Thanks so much for chiming in.

Matty

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service