- Circle Component
In these session we will be learning about Circle Component. This is our first component in this tutorial. Lets proceed practically and step-by-step. Once we pass to get the output of this component, others are similar. Lets start:
Step-By-Step:
1) Run Rhino program.
2) Type "Grasshopper" in the command window of Rhino. (note: it is considered that you have already installed Rhino and Grasshopper before starting this tutorial).
3) Click the "Curve" tab.
4) Click the "Circle" button/command
5) Click on the Canvas to place the circle component on canvas.
Circle Component with Tool Tips |
As soon as you place the Circle component on canvas, you can see a circle with plane on rhino screen (shown in the above picture in green color in rhino window).
You can see the Inputs (labeled with "P" and "R") on left side of component and Output (labeled with "C") on the right side of the component. where "P" denotes "Plane of the Circle", "R" denotes "Radius of Circle" and "C" denotes "Circle" itself.
Circle Component will have the default values as shown below:
For "P" - Plane : XY Plane
For "R" - Radius : 1 unit
As a result of the above default values, a Circle of "Radius 1 unit on XY Plane" has been generated, as soon as we placed the circle component.
Circle with radius 10mm |
To change the radius of the circle, Right click on "R" node (for radius), from the popup menu, select "Set Number" option, Type 10 in the next popup text box, lastly click the "Confirm" option (as shown in the above image). you can see the resultant circle in Rhino window.
- Number Slider:
The idea of introducing the "Number Slider" component here is to get a better understanding of how the components work together. With the help of the these two components (Circle and Number slider) we will get other basics which are carried out through out of our tutorials.
Number slider will be discussed in detail in separate session.
Circle with Number Slider |
Follow below steps to get Number Slider: (See the above picture)
1) Click "Params" Menu
2) Click "Input" Panel, down (Þ) arrow button to expand the panel fully.
3) Click "Number slider" from drop down options.
4) Click on Canvas near to the circle.
Or you can also do the following steps.
1) Double click on the Canvas to get "Enter a Search Keyword" text box.
2) Type "Number Slider" in the box, press enter or click the "Number Slider" option from the context menu.
At this point, we got the Number Slider on the canvas near to the circle.
The Number Slider will have the default value (0 to 1). To customize the Number Slider to our requirement.
1) Right click the Number Slider, to get popup menu
2) Point / Click to the "Values" option.
3) Set the "Max" ( for maximum), "Min" (for minimum), "Val" (for current) values.
4) Click "Confirm" option.
Now, you can move the Number Slider Pointer (a dot like on number slider) to adjust the Number Slider value as needed.
Connecting or Associating the Components:
This topic is most important since we will see how a component receives data and transfers it to the other connected component, in order to work collectively.
Now our aim is to feed the Number slider value in to the Circle's Radius. The result can be seen in Rhino window.
To Connect the Number Slider to Circle Component, do the following.
1) Bring the mouse near the Extreme Right Side of the Number Slider Node, you can see the change in the mouse pointer, Mouse pointer converts to 'Mouse pointer with a small arrow head'.
2) At that point Click and Drag, you can see a 'wire' like curve follows mouse pointer.
2) Drag that wire and drop it on the "R" node of the "Circle" component.
Note: To remove the wire or detach it from the connected component, Just do the same Drag and Drop on the Same nodes by holding CTRL key from keyboard. (you can also see a "-" Sign with mouse pointer when you press and hold the CTRL key).
Note: To remove the wire or detach it from the connected component, Just do the same Drag and Drop on the Same nodes by holding CTRL key from keyboard. (you can also see a "-" Sign with mouse pointer when you press and hold the CTRL key).
The result in shown in the below image.
At this point, we have got a parametric Circle, means as we change the parameter or value of Number Slider, the Circle Component generates the circle in rhino window.
Remember:
1) what we are seeing in the Rhino is just a preview, generated by the Grasshopper. This Circle does not exist in the Rhino window or Rhino file.
2) To get the actual circle (not the preview) in the Rhino Window/Rhino file, Press and hold the Middle mouse button on Circle Component and Choose the "Bake" button. (see below image).
3) Both the Files (Rhino and Grasshopper files) should be saved separately.
Once you got the complete process of this session, proceed to next sessions, as this is the basic thing we are going to do every where in the upcoming sessions.
Thank you, See You In The Next Session.
Hi,
ReplyDeleteEverybody's comments are welcome to guide to make this tutorial better. Thanks in Advance. Have a Nice Time.