Grasshopper Space Planner

Updated GH Graphic Programming tool can be found here.

Projects will often start off with a period of program analysis, part of which requires each of the program spaces to be drawn to get a graphic sense of the project’s pieces.  This information tends to be provided in the form of a spreadsheet which categorizes the spaces in addition to specifying the room’s name, quantity, areas, and other relevant information.  With a few modifications, this spreadsheet can be used to generate all of the space geometry through the use of a Grasshopper definition.

The Grasshopper definition begins by importing specific rows and columns according to markers that are placed within the spreadsheet.  These markers tell Grasshopper where to start and stop importing data as well as where to find the appropriate information for each parameter.  In addition to the name, area, and space numbers that are likely already included within the spreadsheet, other parameters such as width, depth, height, level, and other possible relationships are added to the spreadsheet.  The names of those columns are then added to a component within Grasshopper that then retrieves any information that occurs under that heading.  While there is time invested in reformatting the spreadsheet, the advantage to this approach is that any change to the spreadsheet will then update the Grasshopper geometry.

Simple 2D rectangles can be created using the Grasshopper definition or the rectangles can be extruded to become 3D boxes which can then be arranged according to the level that they will occur on.  The geometry is initially laid out in columns according to program categories.  It is possible to rearrange this geometry with a few changes to the Grasshopper definition which allows the boxes to then be moved around by dragging the box’s center point to a new location.

Nearly any parameter in the spreadsheet can be used to differentiate the color of the boxes.  Multiple color options can be established which create distinctions between level or program category with the ability to switch between options or combine into a composite color.  In the end, the geometry can be baked into Rhino and rendered or exported to another piece of CAD software if necessary.

The spreadsheet import portion of the definition was made possible by Damien Alomar’s Excel Import components.

Giulio Piacentino’s C# Bake Attributes component is used to bake the geometry into Rhino while retaining the color, and grouping that are created within Grasshopper.

Obligatory disclaimer: the author does not guarantee that these parametric models are bug-free or that they will solve all of your problems.  If you find bugs or have suggestions for improvements, please let us know.

Download GH-graphicprogram, 241.63 kB

 

30 Comments

  1. David says:

    Hey there, this is an awesome little tool. I can’t seem to get the GH definition to recognise the excel file, I have it open, and have refreshed GH. Is there some VB needed within Excel?

  2. scrawford says:

    Hi David, you shouldn’t need to enter anything into excel. I’ve uploaded a new version of the definition which has the overall Grasshopper Preview turned off and one of the columns names were wrong. You likely weren’t seeing anything because of that preview issue. The definition has been tested with both Excel 2003 and 2007.

  3. Hello guys thanks for sharing this interesting tools besides many of us who are focusing on the parametric modeling of surfaces and structures you´re exploring another great potential of grasshopper which is the organization of data , good work keep it up !!

  4. Israel Blasco says:

    Hello and thx for the work.
    I found it very interesting, but I’m getting an error when I try to use it:
    the first VB component in the GHdef gives this error “Formato antiguo o tipo de biblioteca no válida. (Excepción de HRESULT: 0x80028018 (TYPE_E_INVDATAREAD)) (line: 0)”
    I use Excel in spanish language, and I think this makes GH and excel couldn’t understand each other.

    I’m architect, not programmer, but any suggestion will be accepted.

    THX

  5. scrawford says:

    Hi Israel, I’ve uploaded a new version of the definition. Take a look and let me know if it solves your problem

  6. Israel Blasco says:

    I’ve tested it and i can’t bake the grashopper points into rhino, but should be a problem of mine because, Finally!! the GHdef is able to read data from excel.

    I’ll keep testing it, but thanks a lot!!

    Keep on working!

  7. Israel Blasco says:

    Well, I finally found the problem. It was because of the uppercase text on excel [even after reading the warning… :)]
    Now it works fine, thank you very much!

  8. Sihyun says:

    Hi Scrawford,

    Thank you for sharing stunning information and scripts. I am also working on medical space planing with nearly same logic. Even though it is fun work, I am not sure what is applicable real space planning something like that… I am willingness to talk with you more! Please email me!

    Thank you! :)

  9. Shannon says:

    Thanks for this definition but I am having a bit of trouble getting the sample files to work, the excel range component is displaying a runtime error “Invalid class string (Exception from HRESULT: 0x800x401f3 (CO_E_CLASSSTRING)) (line:0)” any help to get this working would be great

  10. dbelcher says:

    Shannon-

    What build of Grasshopper are you using? This definition was built with a specific version (0.6.0012) and needs to be paired with that build.

    -Dan

  11. Marc Syp says:

    Hi there again… I’m a bit surprised I haven’t seen your site sooner… it appears we think alike in many respects… I recently completed a parametric space planner that might interest you, a video can be found here:

    http://vimeo.com/15563685

    It uses Excel import to Grasshopper, and realtime spring dynamics in Kangaroo to develop an initial solution for adjacencies… then using VB components to grab geometry on specified layers, it allows the designer to build spaces based on malleable footprints, all controlled by the GBA and FTF reqs from the excel file. Anyway, let me know what you think.

  12. dbelcher says:

    Marc-

    You’re spring-based system using Kangaroo looks great. I’m assuming that you can control the spring-constants in near real-time. How scalable is this maintaining the interactive feel? I’m wondering if you were to make this into a mass-spring system (some spaces have more mass, ie: they want to stay put) if you would still get reasonable/workable refresh rates. It seems like making it a truly non-linear system of masses and springs could dramatically increase the calculation time, but it also might add another dimension to the space-planning system that could be useful. The question would then: is the usefulness of the feature proportional to the performance hit for calculation.

    Cool stuff. I’m assuming you’ve shared your work with Daniel Piker.

  13. Marc Syp says:

    Hey Dan –

    Sorry, I didn’t see your response until just now… the mass-spring system wouldn’t take much to implement, and I don’t think the calculations would cripple the system. But I wonder how much is to be gained from using mass as a kind of anchor system. Could be useful for a set of program pieces that potentially have multiple focii. I’ll check it out some time.

    Anyway, yes, Daniel Piker was one of the first to see the system in action; he helped me iron out a few glitches with it early on. Back then Kangaroo was sparsely documented. I still have to convert this to the new Kangaroo release, it’s on my list of things to do this week.

    Cheers,
    Marc

  14. Marc Syp says:

    P.S. Kangaroo was not able to control spring constants while in the middle of a simulation in the last version. I don’t know if that’s changed in the new version, but I’ll let you know what I find out.

  15. dbelcher says:

    Mark-

    I’d like to test out the newest version as well. Kangaroo is great. As I said above, I’m betting it would be possible to do dynamic systems in near real-time (ie: control spring constants during the simulation), but only for simple “Hello World” examples. Perhaps I’m wrong – I’m constantly surprised by what those Runge-Kutta solvers can do anyway – but Grasshopper and Rhino are having to do a lot in the background anyway…which is why Processing is probably so popular with these sorts of explorations.

    Looking forward to hearing what you find out.

    Best,
    -Dan

  16. Matt says:

    Great tool. Thanks for sharing. I’m really looking forward to using it.Is there any way a current definition could be uploaded that works with the most current version of Grasshopper?

    Cheers,
    Matt

  17. scrawford says:

    Hi Matt,

    I’ve updated the link for the Space Planner tool. Some changes have been made to how it works and I will be posting more information on those changes later this week. In the meantime, give it a try and let us know what you think.

    Thanks

  18. JJP says:

    Hi, Just found this and was wondering if it works with the current version of grasshopper and Rhino 5.0.

  19. David says:

    Hi there! Has anyone tried this in the past year? I cannot make it to work. There are to many nulls that mess up the definition. Also the initial curves from the floor plates layer are missing. Can you please help? I am an architecture student and this would really help me. Thank you

  20. dan says:

    Hi
    very cool!
    Is it possible for you to update the tool to work with latest gh and v5?

  21. scrawford says:

    There’s been a number of inquiries lately about this tool and we wanted to let folks know that we’re working on a new version. Look for an updated post in the next month or so. Thanks

  22. Alexandra says:

    I’ve just downloaded this file to test for an intitial space analysis document and i can’t figure out where to plug in the excel sheet in the grasshopper file. I create a file path button to import the excel file, but i’m not sure where in the grasshopper file to plug in the file path. This is probably the easiest question in the world, but I am super new to grasshopper!

    Thanks so much!
    Alexandra

  23. scrawford says:

    Hi Alexandra,

    You just need to have to open the spreadsheet in excel before launching the grasshopper definition or you can click the recompute button in grasshopper if you opened the excel file after the grasshopper definition.

  24. braxton giffin says:

    Hello Scrawford,
    I’m also new to grasshopper. Ive worked through the solutions posted on this page but I still cannot utilize your definition. Ive tried to update grasshopper and I have the most recent version of rhino. I keep getting “empty curve parameter” under the import floor plate button. any recommendations would be great.
    Thanks,
    Braxton

  25. Yayla says:

    Thank you very much for sharing your code. I tried to use it with rhino 4 and rhino 5 but could not figure out. There were so many old parameters and data could not be imported from Excel 2010. I read on the comments above that you are working on the updated version. Will you be sharing it anytime soon?

  26. scrawford says:

    Yayla and Braxton,

    The updated Graphic Programming Tool can be found here:
    http://lmnts.lmnarchitects.com/parametrics/graphic-programming-round3/

Leave a Comment