Where is grasshopper in rhino questions

Read this first! How to get help on this forum.

Asking questions and getting answers is a big part of this Grasshopper Ning group. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions, but don’t think of them as rules and especially don’t think of them as guarantees.

1. Choose a descriptive title for your post

Don’t call your question “Help!” or “I have a problem” or “Deadline tonight!”, but actually describe the problem you are having.

2. Be succinct but clear in your wording

People need to know some details about your problem in order to understand what sort of answers would satisfy you, but nobody cares about how angry your boss or how bad your teacher or how tight your deadline is. Talk about the problem and only the problem. If you don’t speak English well, you should probably post in your native language as well as providing a Google Translation of your question.

3. Attach minimal versions of all the relevant files

If you have a GH/GHX file you have a question about, attach it to the post. Don’t expect that people will recreate a file based on a screen-shot because that’s a lot of pointless work. It’s also a good idea to remove everything non-essential from a GH file. You can use the ‘Internalise Data’ menu option to cut everything to the left of a parameter:

If you’re importing curves or Breps or meshes from Rhino, you can also internalise them so you won’t have to post a 3DM file as well as a GH file. If you do attach large files, consider zipping them first. Do not use RAR, Ning doesn’t handle it.

It is especially a good idea to post files that don’t require any non-standard components if at all possible. Not everyone has Kangaroo or Hoopsnake or Geco installed so if your file relies on those components, it might not open correctly elsewhere.

4. Include a detailed image of the GH file if it makes sense

If your question is about a specific (group of) components, consider adding a screenshot of the file in the text of the post. You can use the Ctrl+Shift+Q feature in Grasshopper to quickly create nice screenshots with focus rectangles such as this:

5. Include links to online resources if possible

If you have a question about Schwarz Minimal surfaces, please link to a website which talks about these.

6. Create new topics rather than continuing old ones

It’s usually better to start a fresh question, even if there’s already a discussion that kinda sorta tangentially touches upon the same issue. Please link to that discussion, but start anew.

7. This is not a ‘do my work for me’ group

Many of us like to help, but it’s good to see effort on our part being matched by effort on your part. Questions in the form of ‘I need to do X but cannot be bothered to try and learn the software‘ will (and should) go unanswered.

7b. Similarly, questions in the form of ‘How do I quickly recreate this facade that took a team of skilled professionals four months to figure out?‘ have a very low success rate.

Lead Grasshopper Development

Robert McNeel & Associates

Arthur Mamou-Mani

Thank you very much David, very goog tips!

May I also suggest to use the Stack Exchange platform when questions can be abstracted into general scientific problems? I had so many useful answers on topics such as C# on StackOverflow and Geometry on Mathematics.

. please use NAMES for the components instead of ICONS . THX

Pieter Segeren

Hi David, fellow GHusers,
I’d like to propose a new rule (could be 1B): Add relevant tags to the discussion, and have that be compulsory.

If you don’t, noone will be able to find the discussion, and thereby kind of makes your discussion a do-my-private-homework discussion. Good chance it will be ignored.

www.grasshopper3d.com

Food4Rhino

What is food4Rhino?
Food4Rhino is the Plug-in Community Service by McNeel. Users can find the newest Rhino Plug-ins, Grasshopper Add-ons, Materials, Textures and Backgrounds, Scripts and much more, get in contact with the developers of these applications, and also share their applications.

Getting Started
Are you ready? Just register (accepting the Terms & Conditions and our Privacy policy), log-in, and download any plug-in, add-on, material, textures, scripts and additional resources.
Use the new search tool to filter your selection.

Fees
There are no fees to use food4Rhino.

What happened to the Remote Control Panel
As we are working on a system so that Rhino and Grasshopper find automatically the last version of any plug-in or add-on, the Remote Control Panel has been discontinued.

Questions, suggestions and support
food4Rhino is in constant development, so we’ll be glad to hear your questions and feedback at [email protected]@.

ADD YOUR CONTENT TO FOOD4RHINO:
As a developer of Rhino plug-ins, Grasshopper add-ons, Scripts, Materials and Textures or other resources, you can now take advantage of the site’s infrastructure and exposure to improve how you share and market your applications, get valuable feedback from users and manage your updates and new builds easily.

Getting Started

Log-in and click on your name on the top menu, then go to the “My Content” tab:

  • Apps: Rhino plug-ins and Grasshopper add-ons
  • Resources: Rhino scripts, Grasshopper definitions, Toolbars, Tutorials, Materials, Environments, Textures…

Uploading a Rhino plug-in or a Grasshopper add-on:

  • In “My Content” tab, choose “Add App”
  • Complete all mandatory fields (Title, Short Description, Body, Category, License Agreement, Support E-Mail, and Project Icon)
  • Media:
    This section lets you add some media files.
    Allowed media links: youtube, vimeo, p3d.in, mcneel.github.io,www.shapediver.com. Videos URL format must be “embed”.
    Click on Share then copy the Embed link, paste only the link in between quotation marks.
    For Vimeo, link should look like https://player.vimeo.com/video/58212839.
    For youtube, link should look like https://www.youtube.com/embed/hfPfvqC5fj0
    If you need any other media format, please contact us at [email protected]@
  • The “Files” section refers to your releases (installers). Choose the platform (Rhino for Mac, Rhino for Windows or Grasshopper) and the type of installer (Eval, Free, Open Source).
    You can upload a file (up to 500Mb) or put an external link directly to a file. Only supported formats below accepted, except if the link is a folder at Dropbox or AppBox.
    • Supported and suggested formats:
      • Rhino Installer Engine .rhi file (suggested): This allows Rhino to keep track of updates while, at the same time, deliver a simple-to-use release packaging method. The .rhi installer is a Rhino 5-only feature. See: http://wiki.mcneel.com/developer/rhinoinstallerengine/overview for details.
      • Windows Installer package .msi file (suggested): This has the broader installation abilities, both at machine-level and at local user-level. See http://msdn.microsoft.com/en-us/library/cc185688 for more information.
      • Supported: A simple .zip file as delivery method for both Rhinoceros and Grasshopper plug-ins; a single .rhp file; a single .gha or .ghuser file for Grasshopper components; several picture formats for textures and backgrounds. These will be unpacked as necessary and put in a suitable user-level folder on the target machine.
      • Supported: Specially crafted .exe installers. .exe installers must register themselves in the Windows Uninstall registry hive during install. Specifically: the food4Rhino Remote records the list of installed programs before running your .exe. Just after the .exe has run, it compares the new list of installed programs with the old one, and spots your program. Then it stores the uninstallation instructions. The full registry path being watched is LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall.
    • Deprecated formats:
      • Deprecated. .exe files that do not execute the operation described above.
      • Any other file with other extensions is deprecated.

      Reordering files

    You can choose the order in which your files will be shown.
    Just drag and drop each file using the anchor on the left

  • If you want to sell your app, select “Commercial app”, define the Price and currency, and add the direct link where users can buy it.
    If you don’t have your own system to sell, we suggest to take a look at Fast Spring (https://www.fastspring.com/), Digital River (http://www.digitalriver.com/), or other similar online software resellers.
  • We will then review the contents and make it public

Uploading Scripts, Materials, Textures, Tutorials, Grasshopper definitions, VisualARQ Styles, Companion software, Environments, Services, Models, Toolbars:

  • In “My Content” tab, choose “Add Resource”
  • Define the Resource type

  • Complete all other fields (Tittle, Short Description, License Agreement) and upload a thumbnail image
  • If you want to sell your resource, select “I want to sell this resource”, define the Price and currency, and add the direct link where users can buy it.
    If you don’t have your own system to sell, we suggest to take a look at Fast Spring (https://www.fastspring.com/), Digital River (http://www.digitalriver.com/), or other similar online software resellers.
  • We will then review the contents and make it public

Suggestions for a successful project
When you choose the icon and the text for your project and release, keep in mind that a nice looking icon and comprehensive explanation will greatly improve the final user experience.

We encourage every icon developer to have a custom drawn icon, and not a screenshot, to explain their project and make it memorable. The color choice is yours, and you can use tones that will remind users of your corporate look or something specific for your project. Do not use a blank icon.

Also, write a short introductory phrase at the beginning of the overview. Start with the name of your plug-in, then use a verb, then expand on the usage of your plug-in and explain what it means. You could write something like this: “The Ufo plug-in detects and monitors paranormal activity that is happening immediately around you while you are using Rhino’s 3D modeling abilities”.

How to contact users
User privacy, trust and security is very important for us and key for the success of food4Rhino.
Therefore, if you are a Developer that has uploaded a Rhino plug-in, Grasshopper add-on, or a Resource and want us to provide contact information for the users that downloaded your project, you need to:

  • Send us the “Data Disclosure Agreement” (http://www.food4rhino.com/legal/food4rhino-transfer-of-data-statement.docx) by e-mail to [email protected]@, by fax to +34 933195833 or by post to McNeel Europe SL – Roger de Flor 32-24 bajos – 08018 Barcelona – Spain.
  • Add a support e-mail address to your project (if a user wants to modify or remove his personal data from your database, he will use this e-mail address)
  • Keep users’ personal data safe, secure and confidential

Once we approve the documentation, you will be able to check all e-mails of users that have downloaded your contents, and the total number of downloads, on your personal area.

Translating your app:

McNeel Europe provides a translation and localization service for third-party developers We offer a complete localization service, including software applications, web sites, marketing material, documentation, and more. Contact us for a free quote.

www.food4rhino.com

Where is grasshopper in rhino questions

Currently, I am using Robo-dk to control a Comau Nj60 robot. to export my geometry to Robo-dk I am using the Rhino & grasshopper plugings by robo-dk .

But I do have a question that I tried to look it up in the manual but I couldn’t find an answer.

How can I change the movement type in the robot program for curves exported from rhino to Robo-dk,
how do I change it from linear movement to joint movement? the settings by default for the exported program are always linear! is there is any way to change that?

you can see in the photo the curves are divided into points by robo-dkand at each point the robot actually decelerate and accelerate again. I would like to mak e the movement along the curve continous

Looking forward for your help,

Attached Files Thumbnail(s)

(04-22-2019, 10:15 AM) Albert Wrote: Once you have a robot program in RoboDK you can do the following:

  1. Right click the program and select “Show Instructions”, if you don’t see them
  2. Select all the instructions starting from the first linear movement
  3. Right click and select “Set Joint Movements”

In your “Curve Follow/Machining Project”, click “Program Events” and activate the rounding. It will activate the “continuous” motion mode for the robot.
Note that the visual representation in RoboDK won’t be affected by that option. In RoboDK the simulation will still decelerate, but on the real robot, the rounding will take effect.

For your other question, Albert showed you how to do it as you asked, but I’m questioning myself as if it’s a good solution for you. I have no idea of your level of knowledge in robotics, so excuse me in advance if I’m stating the obvious.
If you use MoveJ in your “Curve Follow Project” nothing guarantees that the tool will follow the green line. It will simply pass from end point to end points (where the white lines – normals – are).
Just be aware that MoveJ can take an unpredictable path between two points.

robodk.com

Alea Gpu runtime error not finding a file or dependecy in a Rhino/GrassHopper project

I have a runtime problem with Alea Gpu which doesn’t find all related files (dll’s I guess). Being new to .NET I have a problem figuring out the correct paths when it doesn’t work out of the box, so if anyone can give me some hints based on the paths I present below, it would be gold.

Background

I installed the Alea Gpu packages for VS2017 using Nuget, and my project code compiles and creates the desired GrassHopper component for Rhino3d. This component also shows up properly in RT, but fails with the following error message when entering the the “solver” method containing Alea Gpu calls.

Error message

The error message (my translation from Swedish):

” 1. Solution exception:Cannot find the File or the Assembly Alea, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ba52afc3c2e933d6 or one of its dependencies. Cannot find the file. “

Perhaps not the most relevant, but here’s the failing component with the error message (in Swedish):

The calling .dll (.gha)

The code that runs this so called “GrassHopper definition” (a .gha file which essentially is a .dll) is located in the following folder structure in a VS project where also the Alea package structure is Shown.

The calling GrassHopper (.gha) file:

Alea.targets

The content of the file “. packagesAlea.3.0.3Alea.targets is as follows :

.csproj settings

. last rows in .csproj :

Hopefully this is enough info about paths and where to make any modifications so that the runtime files can be found, given the path to the individual calling GrassHopper file (” C:WorkbenchVSRILGH_DevelopmentRILGH_CSUtilsRILGH_CSUtilsbinx64DebugRILGH_CSUtils.gha “) and the general paths where the GrassHopper execution platform searches for related component dll’s (a path which Alea seemingly doesn’t care much about), ” C:Program FilesCommon FilesMcNeelRhinoceros5.0Plug-insGrasshopper (b45a29b1-4343-4035-989e-044e8580d9cf).9.76.0Components “. I have told GrassHopper to search in both these directories, and even tried dropping copies of the Alea dll’s in this (the last) folder, but no go.

Q: So how does package library like Alea actually control the paths it uses in runtime based on the files and path (se above) which I can control?

Reading through the posts tagged aleagpu was not helpful to me, nor the sparse troubleshooting info on the alea documentation pages (possibly due to being newbie with .Net and VS)

stackoverflow.com

A beginner’s guide to visual scripting with Grasshopper

In this tutorial, I will provide a very simple demonstration of the use of Grasshopper, a visual scripting environment embedded into the 3D modelling package Rhinoceros and a very useful computational design tool. This example is intended to give a brief overview of how the software works to people with no prior exposure to it and explain the core theoretical principles. Some basic prior knowledge of Rhino itself is assumed, however (i.e. you need to at least be familiar with the general interface – this video will cover most of what you need).

The example should take under 30 minutes to run through but will teach you everything you need to know in order to start using the software by yourself. Each step is accompanied by an animation showing exactly what you need to do.

We’re focusing on Grasshopper in this case, but most of the concepts shown here are also transferable to other similar node-based visual programming environments (for example, Dynamo).

Grasshopper is a free plugin for Rhino and can be obtained from its official website: www.grasshopper3d.com. In Rhino 6+, Grasshopper will be incorporated into the main Rhino install and will no longer need to be downloaded separately. Rhino itself can be downloaded here and will run as a free evaluation version for a full 90 days.

In this example, we will create a very straightforward parametric definition which will draw a line between two points. These two points will be our inputs; create these in Rhino by using the ‘Point’ command twice.

Once Grasshopper is installed, you can run it from inside Rhino by typing the command ‘Grasshopper’ at the command prompt.

2. Interface

Grasshopper’s subwindow will appear, and should look something like this:

  1. The title bar. This shows the name of the currently opened file (if any). It can also be double-clicked to collapse Grasshopper to just this title bar – useful if you are working on a single screen and want to get Grasshopper out of the way quickly.
  2. The menu bar. We’ll talk more about this in a minute…
  3. The component library. This is categorised into several different tabs for different kinds of functionality. (You probably won’t have as many as are shown in the images – many of these are optional plugins.)
  4. The component library is further sub-categorised into different groups. You can click on the title bar at the bottom of each group to expand it and see all of the components in that group with their names.
  5. The canvas toolbar. Contains several quick-tools to save the file, scribble on the canvas and change the way that things are being displayed.
  6. The main canvas. This is where the magic happens.
  7. The recent files grid. You probably won’t see this if it is your first time opening Grasshopper as you won’t have any recent files! This will disappear as soon as you start adding things to the canvas.
  8. The status bar – occasionally displays useful information.

Let’s go back to the menu bar to make a couple of important points:

  • Grasshopper files can be opened, saved, etc. via the File menu. Grasshopper definitions are saved separately from Rhino files, so make sure you save both if you don’t want to lose any data!
  • In the ‘View’ menu you can turn on an ‘Obscure Components’ option which will show more components in the library ribbon than you get by default. This option is presumably there to stop people getting scared by lots of component icons when they start out, but also makes it harder to find things.
  • In the display menu, turn on ‘Draw Icons’. This changes the way components are displayed on the canvas. This is a matter of personal taste and some people prefer the default (which just shows text), but these people are wrong.
  • You should also make sure ‘Draw Fancy Wires’ option is on (which it should be by default). This is not even a matter of personal taste; having this turned on will make certain definitions much, much easier to understand.

3. Grasshopper Basics

3.1 Adding Components

Now onto the creation of our actual definition.

The first step is to get the points we created in Rhino and put them into Grasshopper in a form that we can use. To do this we’ll need a couple of Point Parameter Components which you can find on the ‘Params’ tab in the ‘Geometry’ group on the component library ribbon. Left click on the icon and then left click again somewhere on the canvas to create one of those components.

This is one way of adding components to the definition. The other way is to search for them by name. To do this, double-click somewhere on the canvas (not on a component). In the text box that appears, type in ‘Point’. It will then show a range of suggestions – click on the component just called ‘Point’.

3.2 Referencing Rhino Geometry

These components are intended to store point data, but at the moment no data has been assigned to them. This is why they are showing up in orange – this indicates a warning, typically that the component does not have all of the inputs it needs to do whatever it is meant to be doing.

We’ll need to set up these components to refer to the two points we created earlier in Rhino. Right-click on the first component to bring up its context menu. Select the option ‘Set one Point’ and then in Rhino pick the first point.

This will assign the point to the parameter and the component should turn grey to indicate that everything is working as planned.

Repeat this for the second component and the second point.

You may notice that little red ‘x’s have appeared over the points in Rhino – these indicate that the geometry is also present in the Grasshopper model. If you left-click on one of the Grasshopper components it will become selected and will turn green. The ‘x’ in Rhino related to that component should also turn green. You can use this to remind yourself which Grasshopper component refers to which bit of Rhino geometry.

3.3 Creating Data Flows

Now that we have our input points in Grasshopper we can generate the line between them. Navigate to the ‘Primitive’ group on the ‘Curve’ tab and find the component called ‘Line’. Left click on the icon and left click again on the canvas to create a Line component.

This component has a few more features than the Point parameter components. Whereas the Point components simply store a bit of data, this Line component represents a process which will consume input data and generate an output from it. The process inputs are shown on the left hand side of the component (called ‘A’ and ‘B’) and the outputs are shown on the right hand side (called ‘L’). Hover your mouse over these letters and you should see tooltips that provide more information about them.

A and B are the start and end points of the line, respectively. We can populate these inputs using the data stored in our Point parameter components. To do this, hover your mouse over the small nodule on the right hand side of one of the point components. You should see a small arrow icon below your cursor. Click and hold the left mouse button and drag the mouse away to see a snaking arrow follow your mouse. Move your mouse over the first input of the line component and release.

This will create a connection between the output of the Point parameter component and the input of the Line component.

Repeat this for the second point and you should see the Line component turn grey and a red line appear between the two points in Rhino.

Congratulations! You now know how to use Grasshopper!

Grasshopper allows you to describe parametric models by essentially drawing a flow diagram of the process you want to follow to create that model. If you can diagram a process, you can use Grasshopper.

All components essentially work the same way; inputs on the left and outputs on the right. Click and drag to create connections between inputs and outputs and choose the way that data will flow between different operations. Simple!

So far we’ve just used this to draw a line, which isn’t enormously useful – we could have done the same thing in Rhino just by using the ‘Line’ command. But the power of Grasshopper comes from the fact that several different processes can be daisy-chained together, with the output of one operation feeding the input of another.

To demonstrate this, we’ll take the curve output from the Line component and we’ll create a tubular surface around it using the ‘Pipe’ component from under ‘Surface’/’Freeform’. Drop one of these onto the canvas and connect the ‘L’ output from the Line component to it’s ‘C’ input.

The ‘C’ input is the centreline curve around which the pipe surface will be created. You should be able to see this surface in the Rhino view. Click and drag one of the two initial points to move it and you should see the pipe geometry automatically update.

This is the power of Grasshopper. Changing an input (in this case a point) will prompt an update of any geometry which is linked to it. The process you have set out will be run again automatically and the model regenerated, without you having to go through all the pain of manually remodelling everything.

Complex chains of hundreds of different operations can be built up and whole buildings can be defined and controlled by just a few simple inputs, with changes automatically propagating throughout the model.

3.4 Number Sliders

The Pipe component is already working even though we haven’t put anything into the ‘R’ and ‘E’ inputs. This is because these inputs have default values – hover your mouse over these letters to see what those default values are. ‘R’ is the radius of the pipe, which we might want to be able to adjust. (We won’t bother looking at ‘E’ in any detail, but this can be used to control what the ends of the pipe look like).

We’ll control the radius with a Number Slider component from ‘Params’/’Input’. Drop one onto the canvas and connect the output to ‘R’ to override the default value.

This is a little input widget that we can use to control a numeric input just by dragging the slider left and right. If you want to change the maximum and minimum values right click on the slider and click on ‘Edit’ to access a form which will let you set up the properties of the slider, including the numeric domain it covers.

Grasshopper features many different input widgets that allow you to enter and modify different types of data easily.

We’ve now finished creating our definition for this example, but we will use the model that we’ve made to explore a few other aspects of the program.

4. Geometry Preview

You may already have noticed that the red transparent geometry that you can see in Rhino has some peculiar properties – you can’t select it, it won’t be saved in the Rhino file if you try to save it, if you hit the render button then it won’t show up, etc. This is because none of this geometry actually exists in Rhino yet – it is merely a ‘preview’ that Grasshopper is drawing in the Rhino viewport to show you what is going on.

If you want to turn this preview off – now that we have our pipe you might no longer care about seeing the centreline geometry, for example – you can turn it off by right-clicking on the middle part of the relevant component (not over one of the inputs or outputs) and toggling on or off the ‘Preview’ option.

The preview geometry associated with that component should disappear and the component should turn a darker shade of grey to indicate that its preview is turned off.

You can also change how everything is displayed using the first three buttons on the right-hand side of the toolbar just above the canvas, to ‘off’, ‘wireframe’ and ‘shaded’ modes respectively.

To add this previewed geometry to Rhino, so that we can manually modify it, export it, render it, etc. we need to ‘bake’ it. This will add a copy of that geometry into the current Rhino document.

To bake some Grasshopper geometry, right-click on the component whose geometry you wish to add to Rhino (again, this needs to be on the centre part of the component, not over any of the input or output components) and click on the ‘Bake’ option. This will throw up a small form which allows you to select certain properties of the new object in Rhino (for example, the layer it will be placed on). Click ‘OK’ to bake the geometry.

You can now modify, delete, move, export etc. this geometry the same way you would any other Rhino object. Note that there is no link between this baked object and the Grasshopper definition that created it – if you change the model in Grasshopper these changes will not be reflected in the Rhino model and likewise changes made to the geometry in Rhino will not matter a jot to Grasshopper. If you wish to later update the Rhino geometry from the Grasshopper model you will need to delete it and re-bake; for this reason it is a very good idea to keep baked geometry on its own set of layers in Rhino so that it can be easily selected and deleted in one go.

6. Data Matching

One advantage of Grasshopper is that, as we have already seen, (non-baked) geometry can be parametrically linked and automatically updated. Another advantage is that once we have a process defined, we can apply that process over and over and over again on multiple inputs, which is what we will do now. We do not have to modify our actual model definition at all for this; we simply need to change the inputs.

Rather than creating a single pipe between two points, we will now use our definition to create multiple pipes between multiple pairs of points. Add four more point objects to your Rhino model (using the ‘Point’ or ‘Points’ command) for a total of six.

Right-click on the first Point parameter component. Just below the option to ‘Set one Point’ is another which allows you to ‘Set multiple Points’. Click on this option and select in Rhino the three points you want to use as pipe start points. Press return or right-click once you have finished.

Note that this will override the data previously stored in this component, so you’ll need to include the original start point in this selection if you want to include it.

This component now contains multiple bits of data. Those multiple points are being passed along to the Line component and it is now generating three different lines from each of those three points to the single end point we currently have selected. Those three lines are being passed in turn to the Pipe component to create three different pipes. You can tell at a glance that multiple pieces of data are being passed between components by looking at the wires between them – provided you have the ‘Draw Fancy Wires’ option turned on these should now appear as double-lines rather than one. This indicates that a list of data is being passed along that connection instead of just one individual piece of data (which will be a single line).

Repeat this operation to set the three end points.

We now have three start points and three end points going into our Line component, and as an output we are getting three lines (and consequently, pipes). You might have expected that we would get nine lines connecting every start point to every end point, but instead Grasshopper is ‘pairing up’ start and end points and just creating one line for each pair – this behaviour is known as ‘Data Matching’ and it is a very important concept to understand when using Grasshopper.

Whenever a component has multiple pieces of input data plugged in Grasshopper will first determine which sets of inputs to use together and then will run the process once for each set. To figure out which inputs belong together, Grasshopper follows two simple rules:

RULE 1: When matching two or more lists of objects, items at equivalent positions in those lists will be matched together.

So, the first item in the first list will be matched with the first item in the second list, the second item in the first list will be matched to the second item in the second list, third with third, fourth with fourth and so on.

Imagine we have two lists of letters – in the first list we have A, B, C, D and E, while in the second we have F, G, H, I and J. Data matching these two lists together would give us the pairings A-F, B-G, C-H, D-I and E-J.

So, the order that things are stored in is important – in this case the order that the points were selected will be the order that they are matched up in.

This all works great when we have lists which are all the same length, but what if one is shorter than the others? This is where the second rule comes in.

RULE 2: When one list is shorter than the others, the last item in the list will be matched with subsequent items in the others.

Grasshopper will ‘re-use’ the last item in a list when there aren’t any further pieces of data to match up. If we dispose of the last two letters in our second list (so list 2 is now just F, G and H) the resultant pairings will be A-F, B-G, C-H, D-H, E-H. H will be used in three different pairings!

We can see this effect in action by setting our ‘end points’ input to only contain two points (or just one, as we originally had it) while the start points have three:

Now, the last end point will be connected to the last two start points.

This behaviour applies to any component and any type of data, not just lines and points. This means that we can take advantage of this to give us individual control over the diameter of each of the pipes we are creating.

Create a second Number Slider (you can press Ctrl-C, Ctrl-V to copy and paste the one we already made) and connect it to the Pipe component ‘R’ input. If you try and do this normally it will automatically replace the connection to our original slider, but if we hold down the shift key as we’re making the connection we can connect multiple outputs to one input.

Our ‘R’ input will now be a list of numbers comprising the values of the sliders that we’ve plugged in (in the order that you plugged them in) and these will be data-matched with the list of curves going into ‘C’. As a consequence, the first slider will control the radius of the first pipe and the second will control the radius of the others. If we wanted, we could add more sliders to give us total control over each pipe.

You now know everything you need to get started using Grasshopper. There is certainly a lot more to learn – there are thousands of different components available and as well as flat lists data can also be passed around in the form of multidimensional ‘Data Trees’ (essentially, lists of lists), which can make data matching a lot more confusing, but these all follow the basic principles we have covered here.

Becoming more proficient is largely just a matter of learning what tools are available to you and of getting used to manipulating the data flows between components to achieve the effect that you want. The best way to start is simply to choose something that you want to model, think about the basic geometric steps you would take to create it manually and then try to express that process in Grasshopper.

The official Grasshopper forums feature a very active and helpful community and are a useful resource to get help. For a little more structured learning, the ‘Parametric Engineering’ course that I co-teach at Imperial College London is available to view on YouTube. You can also discover how to use Grasshopper to create parametric structural analysis models via RCD’s Salamander plugin in the video below:

Computational Design

In recent years the tools used by engineers and architects to design buildings have changed. Influenced by developments in advanced 3D modelling, material science and automated fabrication designers are now harnessing the power of the computer to explore the world beyond the boundaries imposed by traditional design approaches.

blog.ramboll.com

Share:
No Comments

Leave a Reply

Your e-mail will not be published. All fields are required.

×
Recommend