Grasshopper

algorithmic modeling for Rhino

Hello, 

I am trying to move a number of rectilinear surfaces onto a contoured surface so that the the lowest point (furthest distance to the contour) is on the contoured surface. 

The problem I am having is that when the rectilinear surfaces were moved onto the contoured surface, I end up with multiple surfaces, each replicating on top of all of the other surfaces. Since that is confusing to follow, here is a screenshot of my problem. 

In the image above, I have 11 surfaces and unfortunately, each surface is replicated on top of each other 11 times, at the height that the others are placed.

Here is my script below

The process I took is as follows: 

I exploded my surface breps, took the corner points and found the longest distance from each surface. I sorted then extracted the highest value and used it as the value to translate in the Z axis. I'm sure I'm doing something wrong at the second half of the script, but I cant figure out what. I'm rather new the Grasshopper, so any guidance, tips or recommendations would be greatly appreciated.

Thank you in advance. 

Views: 558

Replies to This Discussion

The problem has to do with data structure: the surface deconstruction created multiple lists of points, one list for each surface. This allowed you to sort each surface's points against your base surface discrete from one another. However, even though you have selected the point furthest from your base surface, that list of distances retains the data structure of being 11 discrete lists. Meanwhile, your original surface list doesn't have any data structure. You can read this in the wires: the flat surface list is a double-lined wire, and your structured distance data is a double dotted-lined wire. You also can see it in how the distances are represented in your panel, with each one separate from the rest and assigned a data path address ({0;0}, {0;1}, etc.). Right now, grasshopper is reading your inputs like 11 distinct operations of a single distance against 11 surfaces. 

You can either "flatten" your data tree of distances to have it match your list of surfaces - if you right click on the T input on your move function, you can select it there - or you can "graft" your list of surfaces into 11 discrete data paths in similar fashion.

David,

Thank you so much for your step by step instructions. Your advice on flattening my input list from the move function worked very well! List management is something I'll have to get better at- and thank you for pointing out what the different line types mean.

Best,

Issac

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service