Grasshopper

algorithmic modeling for Rhino

Hello all,

I am attempting to create a definition that takes potential room dimensions from Excel, creates boxes from the dimensions, and then places the boxes on a floor level based on floor plate area. 

(GH screenshot, Excel screenshot, and various model space screenshots in jpg below) 

organize%20by%20floor_v4_for_online_question.jpg

(GH definition) : organize%20by%20floor_v4.gh

The user controls the length of the floor plate with a slider while the width is taken from Excel as the largest width value among the rooms.

The rooms are prioritized sequentially. (e.g. 'A' is prioritized above 'B', 'B' is prioritized above 'C', etc.)   This essentially means that is the floor plate gets to small to accommodate all room, the last room (in this case 'D') would be first to move to higher floors, then 'C', and then 'B' as necessary.  'A' would always remain on the first floor plate.

My thought process: Compare the added lengths of different room combinations that could potentially be adjacent to one another to the user determined floor plate length.  Using dispatch components, create a 'flowchart' of If/Then scenarios that tests these comparisons and seek for a room configuration that minimizes room displacement. Once the definition knows what should move where, the rooms are moved using vertices that are put together from the room dimensions, as all movement is relative to the other spaces.

My problem: This definition is highly customized for the scenario of having only 4 rooms, but I would like to create a definition that performed a similar operation on any potential 'n' amount of rooms.  The problem with that is that it would require the use of a varying amount of components, as increased number of rooms would need more length summations, length comparisons, and embedded dispatch paths.  Is what I am trying to do possible? Can grasshopper create a varying number of components based on the list length of rooms?

Please help!! Thanks!! 

Views: 1676

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service