Grasshopper

algorithmic modeling for Rhino

Sorting Lists & area comparisons, Please help!

Hi, 

I'm pretty new to Grasshopper and i'm using it for a unit of my Masters. 

The problem is: 

I have 2 sets of curve(polygon) data. Set 1 is small building outlines. Set 2 is the plots of land which the buildings sit. There are over 2000 of these entries (Its a small village).

I am trying to figure out the way that grasshopper sorts lists using the sort list tool. I basically want to calculate the area of the buildings and the individual plot sizes and then calculate the percentage of plot surrounding the building (so basically the difference but in a percentage not m2). The basic maths of this is fine, what I cant get grasshopper to do is match the correct building with the correct plot from the the list of 2000 values!! Does anyone know how to do this? 

The final stage of the process is to then extrude each plot according to the percentage calculated. This part is also fine. The problem currently is that grasshopper doesn't understand which value to match from each list. 

The current algorithm looks like this: 

I have tried just sorting the lists but it doesn't seem to be sorting them in the same order! 

Any help with this would be greatly appreciated! 

Thanks 

J

Views: 1208

Comment

You need to be a member of Grasshopper to add comments!

Comment by Michael Pryor on December 20, 2014 at 2:03am
You are not using sort correctly. Keys requires numerical values to which it will sort in ascending order. Values are the corresponding list of datathat will be sorted based on the sorting of the keys.

Example input
Values : keys
Rectangle 1 : area 3
Rectangle 2 : area 1
Rectangle 3 : area 2

Output
Values : Keys
Rectangle 2 : area 1
Rectangle 3 : area 2
Rectangle 1 : area 3

So it seems you want to use area so use area of the surfaces into keys and keep the surfaces into values.

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service