by Steve Baer (Last modified: 05 Dec 2018)
This guide walks you through your first Grasshopper component for Rhino for Mac using RhinoCommon and Xamarin Studio.
Contact Grasshopper's Sales & Customer Support 24/7 by phone at 1.800.820.8210 or via email. Visual Studio for Mac (formerly Xamarin Studio, formerly MonoDevelop) is required to build Grasshopper components on macOS. Mac repair disk software. The core pieces of the Mono platform that are required are the Mono Framework and Visual Studio for Mac. Please check out the What are Mono and Xamarin? Guide for more information. Turtle beach n270 drivers for mac.
Prerequisites
- Features included in the Grasshopper desktop app: Voice calling over Wi-Fi: Make inbound and outbound calls from your PC or Mac using your local Wi-Fi connection. Send and receive text messages: SMS messaging must be enabled on your account.
- Grasshopper for Mac - One year on. Dan(Dan Belcher) January 24, 2017, 7:34pm #1. A Minor Change. In the latest RhinoWIP, Grasshopper is now Grasshopperit is no longer code-named ExplicitHistory. Just type the Grasshoppercommand; the splash screen should look familiar.
Grasshopper for Mac only exists in the RhinoWIP until the next major version of Rhino for Mac is released.
WARNING
Early-adopters: the following steps will NOT work with the currently released Rhinoceros (5.x.x). You will need to use WIP version of Rhinoceros.
Due to this, there are a few additional steps that need to be taken to install all of the tools needed to develop components. You will need to do the following: Nvidia geforce 7300 gt driver for mac.
- Install the latest RhinoWIP. The WIP can be safely installed along side the stable release of Rhino for Mac (but they cannot be run simultaneously).
- Install Xamarin Studio. Instructions can be found in the Installing Tools (Mac) guide.
- Install the Rhino Xamarin Add-in. Instructions can be found in the Installing Tools (Mac) guide in the Install the Rhino Add-in section.
HelloGrasshopper
We will use the Rhino Xamarin Add-in to create a new, basic, Grasshopper component called HelloGrasshopper.
If you are familiar with Visual Studio or Xamarin Studio, these step-by-step instructions may be overly detailed for you. Image exif editor 5 0 0 key. The executive summary: create a new Solution using the Grasshopper Component template, build and run, and then make a change.
We are presuming you have never used Xamarin Studio before, so we'll go through this one step at a time.
Rhino Grasshopper For Mac
File New
- If you have not done so already, launch Xamarin Studio.
- Navigate to File > New > Solution…
- A New Project wizard should appear. In the left column, find the Other > Miscellaneous section. Under General, select the Grasshopper Component template…
- Click the Next button.
- You will now Configure your new project. For the purposes of this Guide, we will name our demo component HelloGrasshopper. Fill in the Project Name field. Browse and select a location for this component on your Mac…
- Click the Create button.
- A new solution called HelloGrasshopper should open…
Boilerplate Build
- Before we do anything, let's build and run HelloGrasshopper to make sure everything is working as expected. We'll just build the boilerplate Component template. Click the large Build > Run (play) button in the upper-left corner of Xamarin Studio…
- Rhinoceros launches. Create a New Model…
- Enter the ExplicitHistory command. Notice that your new component is listed a loaded by Grasshopper…
- Go to the Curve tab in Grasshopper and you should see a new blank icon for your new component…
- Drag this component on to the Grasshopper canvas to verify that it is working…
- Quit Rhinoceros. This stops the session. Go back to Xamarin Studio. Let's take a look at the…
Component Anatomy
- Use the Solution Explorer to expand the Solution (.sln) so that it looks like this…
- The HelloGrasshopper project (.csproj) has the same name as its parent solution…this is the project that was created for us by the Grasshopper Component template wizard earlier.
- References: Just as with most projects, you will be referencing other libraries. The Grasshopper Component template added the necessary references to create a basic Grasshopper component.
- Eto is the cross-platform User Interface (UI) library Rhino uses. If you examine its properties, you will notice it comes bundled as part of Rhino for Mac.
- GH_IO is used for reading and writing Grasshopper definitions.
- Grasshopper is the Rhino for Mac main grasshopper DLL. Classes in this DLL are subclassed and used by your custom component.
- Rhino.UI is the Rhino-specific User Interface (UI) library associated with…
- RhinoCommon is used by your component to work with all of the geometry defined in Rhino.
- System, System.Core, and System.Drawing are .NET foundational libraries…in this case, we are referencing the Mono versions of these libraries (on Windows, these references will point to the canonical, Microsoft-provided, versions).
- Packages is used the the NuGet package-manager. There are no referenced packages in this boilerplate project, but note that Xamarin Studio supports NuGet, just like Visual Studio does.
- Properties contains the AssemblyInfo.cs source file. This file contains general information about your component.
- HelloGrasshopperComponent.cs is where a custom
Grasshopper.Kernal.GH_Component
subclass is defined. Your project may contain multiple subclasses of GH_Component if you want to ship multiple components in a single gha. - HelloGrasshopperInfo.cs defines general information about this gha.
Grasshopper For Rhino 5
Debugging
- Set a breakpoint on line1 103 of HelloGrasshopperComponent.cs. You set breakpoints in Xamarin Studio by clicking in the gutter…
- Build and Run. Drag one of your new components on to the Grasshopper canvas…as soon as you do, you should hit your breakpoint and pause…
- With Rhino paused, in Xamarin Studio switch to the Locals tab. In the list, you can inspect all of the values for the variables in your function…
- Continue Executing in Rhino by pressing the Play button in the upper navigation menu of Xamarin Studio…
- Control is passed back to Rhino and your command finishes. Quit Rhino or Stop the debugging session.
- Remove the breakpoint you created above by clicking on it in the gutter.
DONE!
Congratulations! You have just built your first Grasshopper component for Rhino for Mac. Now what?
Next Steps
Adding components
A single gha can contain more than one GH_Component derived class (and commonly does). The Xamarin Studio has support for adding more custom components to your project.
- Navigate to File > New > File…
- A New File wizard should appear. In the left column, find the Rhinoceros section. This should give you the ability to select an 'Empty Grasshopper Component'…
- After deciding on a name for the component click the New button.
Related topics
This article is focused on initial setup and debugging a Grasshopper component in Rhino for Mac. For further reading on customizing your component please see: TODO - provide good reference for component development
Grasshopper Company Download
Footnotes
Line numbers in Xamarin Studio can be enabled and disabled in Xamarin Studio > Preferences… > Text Editor section > Markers and Rulers entry > check Show line numbers. ↩ Picopix 2055 drivers for mac.