├── .editorconfig ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .vscode ├── launch.json ├── settings.json └── tasks.json ├── Directory.Build.props ├── README.md ├── Rhino.Templates ├── README.md ├── Rhino.Templates.csproj ├── content │ ├── CPPCommand │ │ ├── .template.config │ │ │ └── template.json │ │ └── MyCommand.1.cpp │ ├── CPPRhino │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── MyRhino.1.def │ │ ├── MyRhino.1.idl │ │ ├── MyRhino.1.rc │ │ ├── MyRhino.1.vcxproj │ │ ├── MyRhino.1.vcxproj.filters │ │ ├── MyRhino.1.vcxproj.user_file │ │ ├── MyRhino.1App.cpp │ │ ├── MyRhino.1App.h │ │ ├── MyRhino.1EventWatcher.cpp │ │ ├── MyRhino.1EventWatcher.h │ │ ├── MyRhino.1Material.cpp │ │ ├── MyRhino.1Material.h │ │ ├── MyRhino.1MaterialSection.cpp │ │ ├── MyRhino.1MaterialSection.h │ │ ├── MyRhino.1PlugIn.cpp │ │ ├── MyRhino.1PlugIn.h │ │ ├── MyRhino.1RdkPlugIn.cpp │ │ ├── MyRhino.1RdkPlugIn.h │ │ ├── MyRhino.1SdkRender.cpp │ │ ├── MyRhino.1SdkRender.h │ │ ├── Resource.h │ │ ├── cmdMyRhino__1Command.cpp │ │ ├── res │ │ │ ├── Digitizer.ico │ │ │ ├── Export.ico │ │ │ ├── Import.ico │ │ │ ├── MyRhino.1.rc2 │ │ │ ├── Render.ico │ │ │ └── Utility.ico │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ ├── CPPSkin │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── MySkin.1.def │ │ ├── MySkin.1.rc │ │ ├── MySkin.1.vcxproj │ │ ├── MySkin.1.vcxproj.filters │ │ ├── MySkin.1.vcxproj.user_file │ │ ├── MySkin.1App.cpp │ │ ├── MySkin.1App.h │ │ ├── Resource.h │ │ ├── res │ │ │ ├── MySkin.1.bmp │ │ │ ├── MySkin.1.ico │ │ │ └── MySkin.1.rc2 │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ ├── CSCommand │ │ ├── .template.config │ │ │ └── template.json │ │ └── MyCommand.1.cs │ ├── CSComponent │ │ ├── .template.config │ │ │ └── template.json │ │ └── MyComponent.1.cs │ ├── CSGrasshopper │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── MyGrasshopper.1.csproj │ │ ├── MyGrasshopper.1Info.cs │ │ ├── MyGrasshopper__1Component.cs │ │ └── Properties │ │ │ └── launchSettings.json │ ├── CSGrasshopper2 │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── Icons │ │ │ ├── MyGrasshopper.1Plugin.3dm │ │ │ ├── MyGrasshopper.1Plugin.ghicon │ │ │ ├── MyGrasshopper__1Component.3dm │ │ │ ├── MyGrasshopper__1Component.ghicon │ │ │ └── plugin.ico │ │ ├── MyGrasshopper.1.csproj │ │ ├── MyGrasshopper.1Plugin.cs │ │ ├── MyGrasshopper.1PluginInfo.cs │ │ ├── MyGrasshopper__1Component.cs │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── launchSettings.json │ ├── CSRhino │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── EmbeddedResources │ │ │ ├── plugin-digitize.ico │ │ │ ├── plugin-export.ico │ │ │ ├── plugin-import.ico │ │ │ ├── plugin-render.ico │ │ │ └── plugin-utility.ico │ │ ├── MyRhino.1.csproj │ │ ├── MyRhino__1Command.cs │ │ ├── MyRhino__1Plugin.cs │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── launchSettings.json │ ├── CSRhinoTest │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── MyRhino.1Tests.csproj │ │ ├── Rhino.Testing.Configs.xml │ │ └── UnitTest1.cs │ ├── CSZooPlugIn │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── MyZooPlugin.1.csproj │ │ ├── MyZooPlugin__1.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ ├── Directory.Build.props │ ├── Directory.Build.targets │ ├── VBCommand │ │ ├── .template.config │ │ │ └── template.json │ │ └── MyCommand.1.vb │ ├── VBComponent │ │ ├── .template.config │ │ │ └── template.json │ │ └── MyComponent.1.vb │ ├── VBGrasshopper │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── MyGrasshopper.1.vbproj │ │ ├── MyGrasshopper.1Info.vb │ │ ├── MyGrasshopper__1Component.vb │ │ └── Properties │ │ │ └── launchSettings.json │ ├── VBRhino │ │ ├── .template.config │ │ │ ├── dotnetcli.host.json │ │ │ ├── ide.host.json │ │ │ └── template.json │ │ ├── .vscode │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── EmbeddedResources │ │ │ ├── plugin-digitize.ico │ │ │ ├── plugin-export.ico │ │ │ ├── plugin-import.ico │ │ │ ├── plugin-render.ico │ │ │ └── plugin-utility.ico │ │ ├── MyRhino.1.vbproj │ │ ├── MyRhino__1Command.vb │ │ ├── MyRhino__1Plugin.vb │ │ └── Properties │ │ │ ├── AssemblyInfo.vb │ │ │ └── launchSettings.json │ └── VBZooPlugIn │ │ ├── .template.config │ │ ├── dotnetcli.host.json │ │ ├── ide.host.json │ │ └── template.json │ │ ├── MyZooPlugin.1.vbproj │ │ ├── MyZooPlugin__1.vb │ │ └── Properties │ │ └── AssemblyInfo.vb └── rhinocommon.png ├── Rhino.VisualStudio.Mac.sln ├── Rhino.VisualStudio.Mac ├── EtoInitializer.cs ├── Extensions.cs ├── Helpers.cs ├── OptionPanels │ └── RhinoOptionsPanel.cs ├── PlatformHelpersHandler.cs ├── PlatformThemeHandler.cs ├── Properties │ ├── AddinInfo.cs │ └── Manifest.addin.xml ├── Rhino.VisualStudio.Mac.csproj ├── RhinoDebuggerStartInfo.cs ├── RhinoExecutionCommand.cs ├── RhinoExecutionHandler.cs ├── RhinoFileTemplate.cs ├── RhinoGlobalProperties.cs ├── RhinoProjectServiceExtension.cs ├── RhinoRunConfiguration.cs ├── RhinoSoftDebuggerEngine.cs ├── RhinoSoftDebuggerSession.cs ├── Templates │ ├── Grasshopper │ │ ├── EmptyComponent.cs │ │ ├── EmptyComponent.xft.xml │ │ ├── grasshopper-project.png │ │ └── grasshopper-project@2x.png │ └── Rhino │ │ ├── EmptyCommand.cs │ │ ├── EmptyCommand.xft.xml │ │ ├── rhinocommon-project.png │ │ └── rhinocommon-project@2x.png ├── Wizard │ ├── BaseTemplateWizard.cs │ ├── EtoWizardPage.cs │ ├── GrasshopperWizard.cs │ ├── ProvideSampleControl.cs │ └── RhinoCommonWizard.cs ├── rhinocommon_addin.png └── rhinocommon_addin@2x.png ├── Rhino.VisualStudio.Windows.sln ├── Rhino.VisualStudio.Windows ├── 2019 │ └── source.extension.vsixmanifest ├── 2022 │ └── source.extension.vsixmanifest ├── EtoInitializer.cs ├── Helpers.cs ├── PlatformHelperHandler.cs ├── PlatformThemeHandler.cs ├── Properties │ ├── AssemblyInfo.cs │ └── wafflebuilder.targets ├── Rhino.VisualStudio.Windows.csproj ├── Services.cs ├── Templates │ ├── CPPCommand │ │ ├── cmdMyCommand.cpp │ │ ├── command.vstemplate │ │ └── icon.ico │ ├── CSCommand │ │ ├── command.vstemplate │ │ └── icon.ico │ ├── CSComponent │ │ ├── component.vstemplate │ │ └── icon.ico │ ├── CSGrasshopper │ │ ├── grasshopper.vstemplate │ │ └── icon.ico │ ├── CSGrasshopper2 │ │ ├── grasshopper2.vstemplate │ │ └── icon.ico │ ├── CSRhino │ │ ├── icon.ico │ │ └── rhino.vstemplate │ ├── CSRhinoTest │ │ ├── icon.ico │ │ └── rhinotest.vstemplate │ ├── CSZooPlugin │ │ ├── icon.ico │ │ └── zooplugin.vstemplate │ ├── CppRhino │ │ ├── icon.ico │ │ └── rhino.vstemplate │ ├── CppSkin │ │ ├── icon.ico │ │ └── skin.vstemplate │ ├── VBCommand │ │ ├── command.vstemplate │ │ └── icon.ico │ ├── VBComponent │ │ ├── component.vstemplate │ │ └── icon.ico │ ├── VBGrasshopper │ │ ├── grasshopper.vstemplate │ │ └── icon.ico │ ├── VBRhino │ │ ├── icon.ico │ │ └── rhino.vstemplate │ └── VBZooPlugin │ │ ├── icon.ico │ │ └── zooplugin.vstemplate ├── Wizard │ ├── CppRhinoWizard.cs │ ├── CppSkinWizard.cs │ ├── EtoWizard.cs │ ├── Grasshopper2Wizard.cs │ ├── GrasshopperWizard.cs │ ├── LegacyTemplateWizard.cs │ ├── RhinoTestWizard.cs │ ├── RhinoWizard.cs │ ├── WizardHost.cs │ └── ZooPluginWizard.cs ├── icon.ico ├── license.rtf ├── rhino.png ├── template.pkgdef └── themes │ ├── ComboBox.xaml │ ├── ComboBoxItem.xaml │ ├── Common.xaml │ └── WindowStyles.xaml ├── Rhino.VisualStudio ├── BaseCppRhinoOptionsPageView.cs ├── BaseCppRhinoOptionsViewModel.cs ├── BaseDesktopWizardViewModel.cs ├── BaseDialog.cs ├── BaseLocationWizardViewModel.cs ├── BasePageView.cs ├── BaseRhinoOptionsViewModel.cs ├── BaseRhinoPageView.cs ├── BaseViewModel.cs ├── BaseWizardViewModel.cs ├── Constants.cs ├── Controls │ ├── Divider.cs │ └── PanelSeparator.cs ├── CppRhinoPluginOptionsPanel.cs ├── CppRhinoPluginOptionsViewModel.cs ├── CppRhinoSkinOptionsPanel.cs ├── CppRhinoSkinOptionsViewModel.cs ├── Grasshopper2OptionsPanel.cs ├── Grasshopper2OptionsViewModel.cs ├── GrasshopperOptionsPanel.cs ├── GrasshopperOptionsViewModel.cs ├── IPlatformTheme.cs ├── IWizardHost.cs ├── Rhino.VisualStudio.csproj ├── RhinoCommonOptionsPanel.cs ├── RhinoCommonOptionsViewModel.cs ├── RhinoTestingOptionsPanel.cs ├── RhinoTestingOptionsViewModel.cs ├── Utility.cs ├── ZooFinder.cs ├── ZooPluginOptionsPanel.cs └── ZooPluginOptionsViewModel.cs ├── build ├── GenerateTemplates.proj └── rhinocommonsignature.snk ├── dotnet-workloads.json ├── global.json └── marketplace description.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 4 9 | 10 | # use spaces by default for everything 11 | [*.{cs,vb}] 12 | indent_style = space 13 | indent_size = 4 14 | charset=utf-8-bom 15 | spaces_around_brackets = none 16 | 17 | [*.{csproj,vbproj,proj,targets,props,json}] 18 | indent_style = space 19 | indent_size = 2 20 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | release: 9 | types: [ published ] 10 | 11 | env: 12 | DotNetVersion: "8.0.401" 13 | BuildParameters: "/v:Minimal /consoleLoggerParameters:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}" 14 | 15 | jobs: 16 | build-windows-2022: 17 | 18 | runs-on: windows-2022 19 | 20 | steps: 21 | - uses: actions/checkout@v4 22 | with: 23 | submodules: true 24 | 25 | - name: Setup .NET Core 26 | uses: actions/setup-dotnet@v4 27 | with: 28 | dotnet-version: ${{ env.DotNetVersion }} 29 | 30 | - name: Setup msbuild 31 | uses: microsoft/setup-msbuild@v2 32 | with: 33 | vs-version: '[17.0,18.0)' 34 | 35 | - name: Build VS2022 36 | run: msbuild /restore ${{ env.BuildParameters }} /p:VSVersion=2022 Rhino.VisualStudio.Windows\Rhino.VisualStudio.Windows.csproj /bl:artifacts/log/Build.Windows.2022.binlog 37 | 38 | - name: Upload extensions 39 | uses: actions/upload-artifact@v4 40 | with: 41 | name: extensions-windows 42 | path: artifacts/Release/*.vsix 43 | 44 | - name: Upload templates 45 | uses: actions/upload-artifact@v4 46 | with: 47 | name: templates 48 | path: artifacts/bin/Rhino.Templates/Release/*.nupkg 49 | 50 | - name: Upload log files 51 | if: ${{ failure() }} 52 | uses: actions/upload-artifact@v4 53 | with: 54 | name: log 55 | path: artifacts/log/**/* 56 | 57 | publish: 58 | needs: [ build-windows-2022 ] 59 | runs-on: ubuntu-latest 60 | if: (github.event_name == 'release' && github.event.action == 'published' && startsWith(github.ref, 'refs/tags/')) 61 | steps: 62 | - name: Download artifacts 63 | uses: actions/download-artifact@v4 64 | 65 | - name: Display structure of downloaded files 66 | run: ls -R 67 | 68 | - name: Add extensions to release 69 | uses: softprops/action-gh-release@v1 70 | with: 71 | token: ${{ secrets.GITHUB_TOKEN }} 72 | fail_on_unmatched_files: true 73 | files: | 74 | extensions-windows/*.vsix 75 | templates/*.nupkg 76 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | *.pidb 4 | *.userprefs 5 | packages 6 | .vs 7 | Thumbs.db 8 | artifacts 9 | *.user 10 | 11 | .DS_Store -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Rhino.VisualStudio.Mac.2019", 9 | "type": "mono", 10 | "request": "launch", 11 | "preLaunchTask": "build-2019", 12 | "program": ".", 13 | "runtimeExecutable": "/Applications/Visual Studio (2019).app/Contents/MacOS/VisualStudio", 14 | "passDebugOptionsViaEnvironmentVariable": true, 15 | "args": [ 16 | "--no-redirect" 17 | ], 18 | "env": { 19 | "MONODEVELOP_CONSOLE_LOG_LEVEL": "All", 20 | "MONODEVELOP_DEV_ADDINS": "${workspaceFolder}/artifacts/bin/Rhino.VisualStudio.Mac/2019/${config:var.configuration}/" 21 | } 22 | }, 23 | { 24 | "name": "Rhino.VisualStudio.Mac.2022", 25 | "type": "coreclr", 26 | "request": "launch", 27 | "preLaunchTask": "build-2022", 28 | "program": "/Applications/Visual Studio.app/Contents/MacOS/VisualStudio", 29 | "args": [ 30 | "--no-redirect" 31 | ], 32 | "env": { 33 | "MONODEVELOP_CONSOLE_LOG_LEVEL": "All", 34 | "MONODEVELOP_DEV_ADDINS": "${workspaceFolder}/artifacts/bin/Rhino.VisualStudio.Mac/2022/${config:var.configuration}/" 35 | }, 36 | "justMyCode": false 37 | }, 38 | { 39 | "name": "Rhino.VisualStudio.Windows.2019", 40 | "type": "clr", 41 | "request": "launch", 42 | "preLaunchTask": "build-2019", 43 | "program": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\IDE\\devenv.exe", 44 | // "targetArchitecture": "x86", 45 | "args": [ 46 | "/RootSuffix", 47 | "Exp" 48 | ], 49 | }, 50 | { 51 | "name": "Rhino.VisualStudio.Windows.2022", 52 | "type": "clr", 53 | "request": "launch", 54 | "preLaunchTask": "build-2022", 55 | "program": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\Common7\\IDE\\devenv.exe", 56 | // "targetArchitecture": "x86", 57 | "args": [ 58 | "/RootSuffix", 59 | "Exp" 60 | ], 61 | } 62 | ] 63 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "var": { 3 | "configuration" : "Debug", 4 | "buildProperties" : "/v:Minimal /p:GenerateFullPaths=True /consoleLoggerParameters:NoSummary" 5 | }, 6 | "dotnet.defaultSolution": "Rhino.VisualStudio.Mac.sln", 7 | } -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2022 5 | 6 | $(MSBuildThisFileDirectory) 7 | $(BasePath)artifacts\ 8 | $(ArtifactsDir)bin\$(MSBuildProjectName)\ 9 | $(ArtifactsDir)obj\$(OS)\$(MSBuildProjectName)\ 10 | 11 | 8.16.2 12 | $(Version) 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RhinoCommon Visual Studio Extensions 2 | 3 | Includes RhinoCommon, Grasshopper, Zoo, and Rhino C++ templates and wizards for Visual Studio on Windows and Mac. 4 | 5 | ## Manual Install Instructions (Visual Studio) 6 | 7 | 1. Download [the latest .vsix release](https://github.com/mcneel/RhinoVisualStudioExtensions/releases/latest). 8 | 2. Close any instances of Visual Studio. 9 | 3. Double click the .vsix in File Explorer. 10 | 4. Run through the wizard to install the extension. 11 | 5. Start Visual Studio and create a new RhinoCommon or Grasshopper project. 12 | 13 | ## Using dotnet new 14 | 15 | 1. Install the templates from nuget. This will show the list of all templates after a successful install. 16 | 17 | `dotnet new install Rhino.Templates` 18 | 19 | 2. Create a new folder for your project: 20 | 21 | ```bash 22 | mkdir MyNewRhinoPlugin 23 | cd MyNewRhinoPlugin 24 | ``` 25 | 26 | 3. Show options for the templates: 27 | 28 | ```bash 29 | dotnet new rhino --help 30 | dotnet new grasshopper --help 31 | ``` 32 | 33 | 4. Create the project 34 | 35 | `dotnet new rhino` 36 | 37 | 5. Build your project 38 | 39 | `dotnet build` 40 | 41 | ## Additional Resources 42 | 43 | See for guides on how to start with Rhino Plug-In development. 44 | -------------------------------------------------------------------------------- /Rhino.Templates/README.md: -------------------------------------------------------------------------------- 1 | # Rhino3D Templates 2 | 3 | RhinoCommon, Grasshopper and C++ SDK templates for [Rhino3D](https://rhino3d.com). 4 | 5 | To install the templates in this package, run `dotnet new install Rhino.Templates` from the command line. 6 | 7 | See [developer.rhino3d.com](https://developer.rhino3d.com) to get started with Rhino3D development. 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPCommand/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino" ], 5 | "name": "Rhino Command", 6 | "identity": "Rhino.Plugin.File.CPP", 7 | "groupIdentity": "Rhino.Plugin.File", 8 | "precedence": 0, 9 | "defaultName": "MyCommand", 10 | "shortName": "rhinocommand", 11 | "tags": { 12 | "language": "cpp", 13 | "type": "item" 14 | }, 15 | "sourceName": "MyCommand.1", 16 | "symbols": { 17 | "HostIdentifier": { 18 | "type": "bind", 19 | "binding": "HostIdentifier" 20 | } 21 | }, 22 | "primaryOutputs": [ 23 | { 24 | "path": "MyCommand.1.cpp" 25 | } 26 | ], 27 | "postActions": [ 28 | { 29 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 30 | "description": "Opens the command in the editor", 31 | "manualInstructions": [], 32 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 33 | "args": { 34 | "files": "0" 35 | }, 36 | "continueOnError": true 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPCommand/MyCommand.1.cpp: -------------------------------------------------------------------------------- 1 | // cmdMyCommand.1.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | 7 | //////////////////////////////////////////////////////////////// 8 | //////////////////////////////////////////////////////////////// 9 | // 10 | // BEGIN MyCommand__1 command 11 | // 12 | 13 | #pragma region MyCommand__1 command 14 | 15 | class CCommandMyCommand__1 : public CRhinoCommand 16 | { 17 | public: 18 | CCommandMyCommand__1() = default; 19 | UUID CommandUUID() override 20 | { 21 | // {8EE67436-E89F-4576-904A-6525C595B531} 22 | static const GUID MyCommand__1Command_UUID = 23 | {0x8ee67436,0xe89f,0x4576,{0x90,0x4a,0x65,0x25,0xc5,0x95,0xb5,0x31}}; 24 | return MyCommand__1Command_UUID; 25 | } 26 | const wchar_t* EnglishCommandName() override { return L"MyCommand__1"; } 27 | CRhinoCommand::result RunCommand(const CRhinoCommandContext& context) override; 28 | }; 29 | 30 | // The one and only CCommandMyCommand__1 object 31 | static class CCommandMyCommand__1 theMyCommand__1Command; 32 | 33 | CRhinoCommand::result CCommandMyCommand__1::RunCommand(const CRhinoCommandContext& context) 34 | { 35 | ON_wString str; 36 | str.Format( L"The \"%s\" command is under construction.\n", EnglishCommandName() ); 37 | if (context.IsInteractive()) 38 | RhinoMessageBox(str, EnglishCommandName(), MB_OK); 39 | else 40 | RhinoApp().Print(str); 41 | return CRhinoCommand::success; 42 | } 43 | 44 | #pragma endregion 45 | 46 | // 47 | // END MyCommand__1 command 48 | // 49 | //////////////////////////////////////////////////////////////// 50 | //////////////////////////////////////////////////////////////// 51 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "PluginType": { 5 | "longName": "pluginType", 6 | "shortName": "pt" 7 | }, 8 | "RhinoVersion": { 9 | "longName": "version", 10 | "shortName": "version" 11 | }, 12 | "CommandName": { 13 | "shortName": "command" 14 | }, 15 | "FileDescription": { 16 | "longName": "file-description", 17 | "shortName": "desc" 18 | }, 19 | "FileExtension": { 20 | "longName": "file-extension", 21 | "shortName": "ext" 22 | }, 23 | "Automation": { 24 | "longName": "automation" 25 | }, 26 | "Sockets": { 27 | "longName": "sockets" 28 | }, 29 | "SDL": { 30 | "longName": "sdl" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1.def: -------------------------------------------------------------------------------- 1 | ; MyRhino.1.def : Declares the module parameters for the DLL. 2 | 3 | LIBRARY 4 | 5 | EXPORTS 6 | ; Explicit exports can go here 7 | //#if Automation 8 | DllCanUnloadNow PRIVATE 9 | DllGetClassObject PRIVATE 10 | DllRegisterServer PRIVATE 11 | DllUnregisterServer PRIVATE 12 | //#endif -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1.idl: -------------------------------------------------------------------------------- 1 | // MyRhino.1.idl : type library source for MyRhino.1.dll 2 | // This file will be processed by the MIDL compiler to produce the 3 | // type library (MyRhino.1.tlb). 4 | 5 | [ uuid(C5E2B8AA-DBC9-4935-9FEF-4CE141D0DE4D), version(1.0) ] 6 | library MyRhino__1 7 | { 8 | importlib("stdole32.tlb"); 9 | importlib("stdole2.tlb"); 10 | }; 11 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1.vcxproj.user_file: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(RhinoExeDir)\Rhino.exe 5 | $(RhinoExeDir) 6 | 7 | 8 | $(RhinoExeDir)\Rhino.exe 9 | $(RhinoExeDir) 10 | 11 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1App.h: -------------------------------------------------------------------------------- 1 | // MyRhino.1.h : main header file for the MyRhino.1 DLL. 2 | // 3 | 4 | #pragma once 5 | 6 | //-:cnd:noEmit 7 | #ifndef __AFXWIN_H__ 8 | #error "include 'stdafx.h' before including this file for PCH" 9 | #endif 10 | //+:cnd:noEmit 11 | 12 | #include "resource.h" // main symbols 13 | 14 | // CMyRhino__1App 15 | // See MyRhino.1App.cpp for the implementation of this class 16 | // 17 | 18 | class CMyRhino__1App : public CWinApp 19 | { 20 | public: 21 | // CRITICAL: DO NOT CALL RHINO SDK FUNCTIONS HERE! 22 | // Only standard MFC DLL instance construction belongs here. 23 | // All other significant initialization should take place in 24 | // CMyRhino__1PlugIn::OnLoadPlugIn(). 25 | CMyRhino__1App() = default; 26 | 27 | // CRITICAL: DO NOT CALL RHINO SDK FUNCTIONS HERE! 28 | // Only standard MFC DLL instance initialization belongs here. 29 | // All other significant initialization should take place in 30 | // CMyRhino__1PlugIn::OnLoadPlugIn(). 31 | BOOL InitInstance() override; 32 | 33 | // CRITICAL: DO NOT CALL RHINO SDK FUNCTIONS HERE! 34 | // Only standard MFC DLL instance clean up belongs here. 35 | // All other significant cleanup should take place in either 36 | // CMyRhino__1PlugIn::OnSaveAllSettings() or 37 | // CMyRhino__1PlugIn::OnUnloadPlugIn(). 38 | int ExitInstance() override; 39 | 40 | DECLARE_MESSAGE_MAP() 41 | }; 42 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1Material.h: -------------------------------------------------------------------------------- 1 | // MyRhino.1Material.h 2 | // 3 | 4 | #pragma once 5 | 6 | // CMyRhino__1MaterialFactory 7 | // See MyRhino.1Material.cpp for the implementation of this class. 8 | // 9 | 10 | class CMyRhino__1MaterialFactory : public CRhRdkMaterialFactory 11 | { 12 | public: 13 | CMyRhino__1MaterialFactory() = default; 14 | 15 | protected: 16 | virtual CRhRdkMaterial* NewMaterial(void) const override; 17 | }; 18 | 19 | // CMyRhino__1Material 20 | // See MyRhino.1Material.cpp for the implementation of this class. 21 | // 22 | 23 | class CMyRhino__1Material : public CRhRdkMaterial 24 | { 25 | public: 26 | CMyRhino__1Material() = default; 27 | 28 | // CRhRdkContent overrides. 29 | virtual UUID TypeId(void) const override; 30 | virtual ON_wString TypeName(void) const override; 31 | virtual ON_wString TypeDescription(void) const override; 32 | virtual ON_wString InternalName(void) const override; 33 | virtual void AddUISections(IRhRdkExpandableContentUI& ui) override; 34 | virtual UUID RenderEngineId(void) const override; 35 | virtual UUID PlugInId(void) const override; 36 | virtual void* GetShader(const UUID& uuidRenderEngine, void* pvData) const override; 37 | virtual bool IsFactoryProductAcceptableAsChild(const CRhRdkContentFactory& factory, const wchar_t* wszChildSlotName) const override; 38 | virtual unsigned int BitFlags(void) const override; 39 | 40 | // CRhRdkMaterial overrides. 41 | virtual void SimulateMaterial(ON_Material& matOut, CRhRdkTexture::TextureGeneration tg = CRhRdkTexture::TextureGeneration::Allow, 42 | int iSimulatedTextureSize = -1, const CRhinoObject* pObject = nullptr) const override; 43 | }; 44 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1MaterialSection.cpp: -------------------------------------------------------------------------------- 1 | // MyRhino.1MaterialSection.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "MyRhino.1MaterialSection.h" 6 | #include "MyRhino.1Material.h" 7 | 8 | //-:cnd:noEmit 9 | #if defined (RHINO_SDK_MFC) 10 | CMyRhino__1MaterialSection::CMyRhino__1MaterialSection() 11 | : 12 | CRhRdkMaterialUISection_MFC(IDD) 13 | { 14 | } 15 | 16 | UUID CMyRhino__1MaterialSection::Uuid() const 17 | { 18 | // {C9B426F6-A09A-410E-842E-296D084AE6A7} 19 | static const GUID uuid = 20 | {0xc9b426f6,0xa09a,0x410e,{0x84,0x2e,0x29,0x6d,0x08,0x4a,0xe6,0xa7}}; 21 | return uuid; 22 | } 23 | 24 | void CMyRhino__1MaterialSection::DoDataExchange(CDataExchange* pDX) 25 | { 26 | __super::DoDataExchange(pDX); 27 | 28 | // TODO: Add your controls here. 29 | 30 | // DDX_Control(pDX, IDC_XXXX, m_xxxx); 31 | } 32 | 33 | BEGIN_MESSAGE_MAP(CMyRhino__1MaterialSection, CRhRdkMaterialUISection_MFC) 34 | END_MESSAGE_MAP() 35 | 36 | BOOL CMyRhino__1MaterialSection::OnInitDialog() 37 | { 38 | __super::OnInitDialog(); 39 | 40 | DisplayData(); 41 | EnableDisableControls(); 42 | 43 | return FALSE; 44 | } 45 | 46 | const wchar_t* CMyRhino__1MaterialSection::Caption(bool bAlwaysEnglish) const 47 | { 48 | UNREFERENCED_PARAMETER(bAlwaysEnglish); 49 | 50 | return L"MyRhino.1 Material"; 51 | } 52 | 53 | void CMyRhino__1MaterialSection::DisplayData() 54 | { 55 | CRhRdkMaterialArray a; 56 | GetMaterialList(a); 57 | 58 | if (0 == a.Count()) 59 | { 60 | return; 61 | } 62 | 63 | // TODO: transfer editable material state to UI controls. 64 | } 65 | 66 | void CMyRhino__1MaterialSection::EnableDisableControls() 67 | { 68 | // TODO: enable and disable controls based on material state. 69 | } 70 | #endif 71 | //+:cnd:noEmit 72 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1MaterialSection.h: -------------------------------------------------------------------------------- 1 | // MyRhino.1MaterialSection.h 2 | // 3 | 4 | #pragma once 5 | 6 | #include "MyRhino.1Material.h" 7 | #include "Resource.h" 8 | 9 | // CMyRhino__1MaterialSection 10 | // See MyRhino.1MaterialSection.cpp for the implementation of this class. 11 | // 12 | 13 | //-:cnd:noEmit 14 | #if defined (RHINO_SDK_MFC) 15 | class CMyRhino__1MaterialSection : public CRhRdkMaterialUISection_MFC 16 | { 17 | public: 18 | CMyRhino__1MaterialSection(); 19 | 20 | private: 21 | enum { IDD = IDD_MATERIAL_SECTION }; 22 | 23 | protected: 24 | virtual BOOL OnInitDialog() override; 25 | virtual void DoDataExchange(CDataExchange* pDX) override; 26 | 27 | protected: // CRhRdkMaterialUISection_MFC overrides. 28 | virtual void DisplayData(void) override; 29 | virtual void EnableDisableControls(void) override; 30 | virtual const wchar_t* Caption(bool bAlwaysEnglish = false) const override; 31 | virtual UUID Uuid(void) const override; 32 | virtual AFX_MODULE_STATE* GetModuleState(void) const override { return AfxGetStaticModuleState(); } 33 | virtual unsigned int GetIDD(void) const override { return IDD; } 34 | 35 | protected: 36 | DECLARE_MESSAGE_MAP() 37 | }; 38 | #endif 39 | //+:cnd:noEmit 40 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1RdkPlugIn.h: -------------------------------------------------------------------------------- 1 | // MyRhino.1RdkPlugIn.h 2 | // 3 | 4 | #pragma once 5 | 6 | #if TypeRender 7 | // CMyRhino__1RdkRenderPlugIn 8 | // See MyRhino.1RdkPlugIn.cpp for the implementation of this class. 9 | // 10 | 11 | class CMyRhino__1RdkPlugIn : public CRhRdkRenderPlugIn 12 | #else 13 | // CMyRhino__1CRhRdkPlugIn 14 | // See MyRhino__1RdkPlugIn.cpp for the implementation of this class. 15 | // 16 | 17 | class CMyRhino__1RdkPlugIn : public CRhRdkPlugIn 18 | #endif 19 | { 20 | public: 21 | CMyRhino__1RdkPlugIn() = default; 22 | 23 | virtual bool Initialize() override; 24 | virtual void Uninitialize() override; 25 | 26 | virtual UUID PlugInId() const override; 27 | 28 | #if TypeRender 29 | virtual void AbortRender() override; 30 | #endif 31 | 32 | CRhinoPlugIn& RhinoPlugIn() const override; 33 | 34 | protected: 35 | #if TypeRender 36 | virtual void RegisterExtensions() const override; 37 | 38 | // Preview renderers 39 | virtual bool CreatePreview(const ON_2iSize& sizeImage, RhRdkPreviewQuality quality, const IRhRdkPreviewSceneServer* pSceneServer, IRhRdkPreviewCallbacks* pNotify, CRhinoDib& dibOut) override; 40 | virtual bool CreatePreview(const ON_2iSize& sizeImage, const CRhRdkTexture& texture, CRhinoDib& dibOut) override; 41 | 42 | #endif 43 | virtual bool SupportsFeature(const UUID& uuidFeature) const override; 44 | }; 45 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/MyRhino.1SdkRender.h: -------------------------------------------------------------------------------- 1 | // MyRhino.1SdkRender.h 2 | // 3 | 4 | #pragma once 5 | 6 | // CMyRhino__1SdkRender 7 | // See MyRhino.1SdkRender.cpp for the implementation of this class. 8 | // 9 | 10 | class CMyRhino__1SdkRender : public CRhRdkSdkRender 11 | { 12 | public: 13 | CMyRhino__1SdkRender( 14 | const CRhinoCommandContext& context, 15 | CRhinoRenderPlugIn& pPlugin, 16 | const ON_wString& sCaption, 17 | UINT idIcon, 18 | bool bPreview 19 | ); 20 | 21 | virtual ~CMyRhino__1SdkRender(); 22 | 23 | int ThreadedRender(void); 24 | void SetContinueModal(bool b); 25 | 26 | CRhinoSdkRender::RenderReturnCodes Render(const ON_2iSize& sizeRender) override; 27 | CRhinoSdkRender::RenderReturnCodes RenderWindow(CRhinoView* pView, const LPRECT pRect, bool bInPopupWindow) override; 28 | 29 | // CRhRdkSdkRender overrides. 30 | virtual BOOL RenderSceneWithNoMeshes() override { return TRUE; } 31 | virtual BOOL IgnoreRhinoObject(const CRhinoObject*) override { return FALSE; } 32 | virtual BOOL RenderPreCreateWindow() override; 33 | virtual BOOL RenderEnterModalLoop() override { return TRUE; } 34 | virtual BOOL RenderContinueModal() override; 35 | virtual BOOL RenderExitModalLoop() override { return TRUE; } 36 | virtual bool ReuseRenderWindow(void) const override { return true; } 37 | virtual BOOL NeedToProcessGeometryTable() override; 38 | virtual BOOL NeedToProcessLightTable() override; 39 | virtual BOOL StartRenderingInWindow(CRhinoView* pView, const LPCRECT pRect) override; 40 | virtual void StopRendering() override; 41 | virtual void StartRendering() override; 42 | 43 | protected: 44 | static void RenderThread(void* pv); 45 | 46 | private: 47 | HANDLE m_hRenderThread; 48 | bool m_bContinueModal; 49 | bool m_bRenderQuick; 50 | bool m_bCancel; 51 | }; 52 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MyRhino.1.rc 4 | // 5 | #define IDI_ICON 100 6 | #if Sockets 7 | #define IDP_SOCKETS_INIT_FAILED 101 8 | #endif 9 | #if TypeRender 10 | #define IDM_APP_FILE_SAVE_AS 101 11 | #define IDM_APP_EDIT_COPY 102 12 | #define IDM_APP_FILE_PRINT 103 13 | #define IDM_APP_FILE_EXIT 104 14 | #define IDM_APP_HELP_DISPLAY_HELP 105 15 | #define IDD_MATERIAL_SECTION 1000 16 | #define IDI_RENDER 1001 17 | #define IDR_RENDER 12006 18 | #define ID_APP_VIEW_NORMALVIEW 32777 19 | #define ID_APP_VIEW_IN2X 32779 20 | #define ID_APP_VIEW_IN3X 32780 21 | #define ID_APP_VIEW_IN4X 32781 22 | #define ID_APP_VIEW_IN5X 32782 23 | #define ID_APP_VIEW_OUT2X 32783 24 | #define ID_APP_VIEW_OUT3X 32784 25 | #define ID_APP_VIEW_OUT4X 32785 26 | #define ID_APP_VIEW_OUT5X 32786 27 | #define ID_APP_VIEW_OUT6X 32787 28 | #define ID_APP_VIEW_IN6X 32788 29 | #define ID_APP_VIEW_OUT7X 32789 30 | #define ID_APP_VIEW_OUT8X 32790 31 | #define ID_APP_VIEW_OUT9X 32791 32 | #define ID_APP_VIEW_OUT10X 32792 33 | #define ID_APP_VIEW_IN7X 32793 34 | #define ID_APP_VIEW_IN8X 32794 35 | #define ID_APP_VIEW_IN9X 32795 36 | #define ID_APP_VIEW_IN10X 32796 37 | #endif 38 | 39 | // Next default values for new objects 40 | // 41 | //-:cnd:noEmit 42 | #ifdef APSTUDIO_INVOKED 43 | #ifndef APSTUDIO_READONLY_SYMBOLS 44 | 45 | #define _APS_NEXT_RESOURCE_VALUE [!output START_RES] 46 | #define _APS_NEXT_CONTROL_VALUE [!output START_RES] 47 | #define _APS_NEXT_SYMED_VALUE [!output START_RES] 48 | #define _APS_NEXT_COMMAND_VALUE 32771 49 | #endif 50 | #endif 51 | //+:cnd:noEmit 52 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/Digitizer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPRhino/res/Digitizer.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/Export.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPRhino/res/Export.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/Import.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPRhino/res/Import.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/MyRhino.1.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // MyRhino.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/Render.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPRhino/res/Render.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/res/Utility.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPRhino/res/Utility.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MyRhino.1.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPRhino/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 5 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 6 | #include "rhinoSdkWindowsVersion.h" 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "RhinoVersion": { 5 | "longName": "version", 6 | "shortName": "version" 7 | }, 8 | "CustomMenus": { 9 | "longName": "menus" 10 | }, 11 | "SDL": { 12 | "longName": "sdl" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino" ], 5 | "name": "Rhino3D Skin", 6 | "description": "Build skin DLLs for Rhino3D using the C++ SDK", 7 | "identity": "Rhino.Skin.CPP", 8 | "groupIdentity": "Rhino.Skin", 9 | "precedence": 0, 10 | "defaultName": "MyRhinoSkin", 11 | "shortName": "rhinoskin", 12 | "tags": { 13 | "language": "cpp", 14 | "type": "project" 15 | }, 16 | "sourceName": "MySkin.1", 17 | "preferNameDirectory": true, 18 | "symbols": { 19 | "RhinoVersion": { 20 | "type": "parameter", 21 | "description": "Version of Rhino", 22 | "datatype": "choice", 23 | "defaultValue": "8", 24 | "choices": [ 25 | { 26 | "choice": "7", 27 | "description": "Version 7" 28 | }, 29 | { 30 | "choice": "8", 31 | "description": "Version 8" 32 | } 33 | ] 34 | }, 35 | "CustomMenus": { 36 | "type": "parameter", 37 | "description": "Enables support for custom menus.", 38 | "datatype": "bool", 39 | "defaultValue": "true" 40 | }, 41 | "SDL": { 42 | "type": "parameter", 43 | "description": "Enable additional Security Development Lifecycle (SDL) checks.", 44 | "datatype": "bool", 45 | "defaultValue": "true" 46 | }, 47 | "HostIdentifier": { 48 | "type": "bind", 49 | "binding": "HostIdentifier" 50 | }, 51 | "copyrightYear": { 52 | "type": "generated", 53 | "generator": "now", 54 | "replaces": "2023", 55 | "parameters": { 56 | "format": "yyyy" 57 | } 58 | } 59 | }, 60 | "sources": [ 61 | { 62 | "modifiers": [ 63 | { 64 | "rename": { 65 | "MySkin.1.vcxproj.user_file": "MySkin.1.vcxproj.user" 66 | } 67 | } 68 | ] 69 | } 70 | ], 71 | "primaryOutputs": [ 72 | { "path": "MySkin.1App.cpp" }, 73 | { "path": "MySkin.1.vcxproj" } 74 | ], 75 | "guids": [ 76 | "991D78A0-49C9-47D6-B7AD-C7B10433ECF6" 77 | ], 78 | "postActions": [ 79 | { 80 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 81 | "description": "Opens the command in the editor", 82 | "manualInstructions": [], 83 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 84 | "args": { 85 | "files": "0" 86 | }, 87 | "continueOnError": true 88 | } 89 | ] 90 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/MySkin.1.def: -------------------------------------------------------------------------------- 1 | ; MySkin.1.def : Declares the module parameters for the DLL. 2 | 3 | LIBRARY 4 | 5 | EXPORTS 6 | ; Explicit exports can go here 7 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/MySkin.1.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | 40 | 41 | Source Files 42 | 43 | 44 | Resource Files 45 | 46 | 47 | 48 | 49 | Resource Files 50 | 51 | 52 | 53 | 54 | Resource Files 55 | 56 | 57 | Resource Files 58 | 59 | 60 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/MySkin.1.vcxproj.user_file: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(RhinoExeDir)\Rhino.exe 5 | $(RhinoExeDir) 6 | 7 | 8 | $(RhinoExeDir)\Rhino.exe 9 | $(RhinoExeDir) 10 | 11 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/MySkin.1App.h: -------------------------------------------------------------------------------- 1 | // MySkin.1.h : main header file for the MySkin.1 DLL. 2 | // 3 | 4 | #pragma once 5 | 6 | //-:cnd:noEmit 7 | #ifndef __AFXWIN_H__ 8 | #error "include 'stdafx.h' before including this file for PCH" 9 | #endif 10 | //+:cnd:noEmit 11 | 12 | #include "resource.h" // main symbols 13 | 14 | // CMySkin__1App 15 | // See MySkin.1App.cpp for the implementation of this class 16 | // 17 | 18 | class CMySkin__1App : public CWinApp 19 | { 20 | public: 21 | CMySkin__1App() = default; 22 | 23 | // Overrides 24 | public: 25 | BOOL InitInstance() override; 26 | int ExitInstance() override; 27 | DECLARE_MESSAGE_MAP() 28 | }; 29 | 30 | // CSplashWnd 31 | // See MySkin.1App.cpp for the implementation of this class 32 | // 33 | 34 | class CSplashWnd : public CWnd 35 | { 36 | DECLARE_DYNAMIC(CSplashWnd) 37 | 38 | public: 39 | CSplashWnd(); 40 | virtual ~CSplashWnd(); 41 | 42 | protected: 43 | CBitmap m_splash_bitmap; 44 | 45 | protected: 46 | DECLARE_MESSAGE_MAP() 47 | 48 | public: 49 | afx_msg void OnPaint(); 50 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 51 | }; 52 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MySkin.1.rc 4 | // 5 | #define IDI_ICON 101 6 | #define IDB_SPLASH 102 7 | 8 | // Next default values for new objects 9 | // 10 | //-:cnd:noEmit 11 | #ifdef APSTUDIO_INVOKED 12 | #ifndef APSTUDIO_READONLY_SYMBOLS 13 | 14 | #define _APS_NEXT_RESOURCE_VALUE 6000 15 | #define _APS_NEXT_CONTROL_VALUE 6000 16 | #define _APS_NEXT_SYMED_VALUE 6000 17 | #define _APS_NEXT_COMMAND_VALUE 32771 18 | #endif 19 | #endif 20 | //+:cnd:noEmit 21 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/res/MySkin.1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPSkin/res/MySkin.1.bmp -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/res/MySkin.1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CPPSkin/res/MySkin.1.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/res/MySkin.1.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // MySkin.1.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // MySkin.1.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CPPSkin/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 5 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 6 | #include "rhinoSdkWindowsVersion.h" 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSCommand/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino", "RhinoCommon" ], 5 | "name": "Rhino Command", 6 | "identity": "Rhino.Plugin.File.CS", 7 | "groupIdentity": "Rhino.Plugin.File", 8 | "precedence": 100, 9 | "defaultName": "MyCommand", 10 | "shortName": "rhinocommand", 11 | "tags": { 12 | "language": "C#", 13 | "type": "item" 14 | }, 15 | "sourceName": "MyCommand.1", 16 | "symbols": { 17 | "Namespace": { 18 | "description": "Namespace for the generated files", 19 | "replaces": "MyNamespace", 20 | "type": "parameter" 21 | }, 22 | 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "primaryOutputs": [ 29 | { 30 | "path": "MyCommand.1.cs" 31 | } 32 | ], 33 | "postActions": [ 34 | { 35 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 36 | "description": "Opens the command in the editor", 37 | "manualInstructions": [], 38 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 39 | "args": { 40 | "files": "0" 41 | }, 42 | "continueOnError": true 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSCommand/MyCommand.1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rhino; 3 | using Rhino.Commands; 4 | 5 | namespace MyNamespace 6 | { 7 | public class MyCommand__1 : Command 8 | { 9 | public MyCommand__1() 10 | { 11 | Instance = this; 12 | } 13 | 14 | ///The only instance of this command. 15 | public static MyCommand__1 Instance { get; private set; } 16 | 17 | public override string EnglishName => "MyCommand.1"; 18 | 19 | protected override Result RunCommand(RhinoDoc doc, RunMode mode) 20 | { 21 | // TODO: complete command. 22 | return Result.Success; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSComponent/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino", "Grasshopper" ], 5 | "name": "Grasshopper Component", 6 | "identity": "Grasshopper.Component.File.CS", 7 | "groupIdentity": "Grasshopper.Component.File", 8 | "precedence": 100, 9 | "defaultName": "MyComponent", 10 | "shortName": "ghcomponent", 11 | "tags": { 12 | "language": "C#", 13 | "type": "item" 14 | }, 15 | "sourceName": "MyComponent.1", 16 | "symbols": { 17 | "Namespace": { 18 | "description": "Namespace for the generated files", 19 | "replaces": "MyNamespace", 20 | "type": "parameter" 21 | }, 22 | 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "primaryOutputs": [ 29 | { 30 | "path": "MyComponent.1.cs" 31 | } 32 | ], 33 | "guids": [ 34 | "FDC62C6D-7C03-412D-8FF8-B76439197730" 35 | ], 36 | "postActions": [ 37 | { 38 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 39 | "description": "Opens the command in the editor", 40 | "manualInstructions": [], 41 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 42 | "args": { 43 | "files": "0" 44 | }, 45 | "continueOnError": true 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSComponent/MyComponent.1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using Grasshopper.Kernel; 5 | using Rhino.Geometry; 6 | 7 | namespace MyNamespace 8 | { 9 | public class MyComponent__1 : GH_Component 10 | { 11 | /// 12 | /// Initializes a new instance of the MyComponent__1 class. 13 | /// 14 | public MyComponent__1() 15 | : base("MyComponent.1", "Nickname", 16 | "Description", 17 | "Category", "Subcategory") 18 | { 19 | } 20 | 21 | /// 22 | /// Registers all the input parameters for this component. 23 | /// 24 | protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) 25 | { 26 | } 27 | 28 | /// 29 | /// Registers all the output parameters for this component. 30 | /// 31 | protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) 32 | { 33 | } 34 | 35 | /// 36 | /// This is the method that actually does the work. 37 | /// 38 | /// The DA object is used to retrieve from inputs and store in outputs. 39 | protected override void SolveInstance(IGH_DataAccess DA) 40 | { 41 | } 42 | 43 | /// 44 | /// Provides an Icon for the component. 45 | /// 46 | protected override System.Drawing.Bitmap Icon 47 | { 48 | get 49 | { 50 | //You can add image files to your project resources and access them like this: 51 | // return Resources.IconForThisComponent; 52 | return null; 53 | } 54 | } 55 | 56 | /// 57 | /// Gets the unique ID for this component. Do not change this ID after release. 58 | /// 59 | public override Guid ComponentGuid 60 | { 61 | get { return new Guid("FDC62C6D-7C03-412D-8FF8-B76439197730"); } 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "IncludeSample": { 5 | "longName": "include-sample", 6 | "shortName": "sample" 7 | }, 8 | "RhinoVersion": { 9 | "longName": "version", 10 | "shortName": "v" 11 | }, 12 | "AddonDisplayName": { 13 | "longName": "addon-display-name", 14 | "shortName": "addon-name" 15 | }, 16 | "ComponentClassName": { 17 | "longName": "component-class", 18 | "shortName": "component" 19 | }, 20 | "ComponentName": { 21 | "longName": "component-name", 22 | "shortName": "cname" 23 | }, 24 | "ComponentNickname": { 25 | "longName": "nickname", 26 | "shortName": "nick" 27 | }, 28 | "ComponentDescription": { 29 | "longName": "description", 30 | "shortName": "desc" 31 | }, 32 | "ComponentCategory": { 33 | "longName": "category", 34 | "shortName": "cat" 35 | }, 36 | "ComponentSubcategory": { 37 | "longName": "subcategory", 38 | "shortName": "sub" 39 | }, 40 | "UseWpf": { 41 | "longName": "include-wpf", 42 | "shortName": "wpf" 43 | }, 44 | "UseWinForms": { 45 | "longName": "include-winforms", 46 | "shortName": "wf" 47 | }, 48 | "BuildYak": { 49 | "longName": "build-yak", 50 | "shortName": "yak" 51 | }, 52 | "IncludeVSCode": { 53 | "longName": "include-vscode-launch", 54 | "shortName": "vscode" 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyGrasshopper.1.csproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper/MyGrasshopper.1Info.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using Grasshopper; 4 | using Grasshopper.Kernel; 5 | 6 | namespace MyGrasshopper._1 7 | { 8 | public class MyGrasshopper__1Info : GH_AssemblyInfo 9 | { 10 | public override string Name => "MyGrasshopper.1 Info"; 11 | 12 | //Return a 24x24 pixel bitmap to represent this GHA library. 13 | public override Bitmap Icon => null; 14 | 15 | //Return a short string describing the purpose of this GHA library. 16 | public override string Description => ""; 17 | 18 | public override Guid Id => new Guid("cd826b9b-8dbe-4c31-aac1-6fc7ea2bcfb7"); 19 | 20 | //Return a string identifying you or your company. 21 | public override string AuthorName => ""; 22 | 23 | //Return a string representing your preferred contact details. 24 | public override string AuthorContact => ""; 25 | 26 | //Return a string representing the version. This returns the same version as the assembly. 27 | public override string AssemblyVersion => GetType().Assembly.GetName().Version.ToString(); 28 | } 29 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | //#if (RhinoVersion <= '8') 4 | "Rhino 8 - netcore": { 5 | "commandName": "Executable", 6 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 7 | "commandLineArgs": "/netcore /runscript=\"_Grasshopper\"", 8 | "environmentVariables": { 9 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 10 | } 11 | }, 12 | "Rhino 8 - netfx": { 13 | "commandName": "Executable", 14 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 15 | "commandLineArgs": "/netfx /runscript=\"_Grasshopper\"", 16 | "environmentVariables": { 17 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 18 | } 19 | }, 20 | //#endif 21 | //#if (RhinoVersion <= '7') 22 | "Rhino 7": { 23 | "commandName": "Executable", 24 | "executablePath": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe", 25 | "commandLineArgs": "/runscript=\"_Grasshopper\"", 26 | }, 27 | //#endif 28 | //#if (RhinoVersion <= '6') 29 | "Rhino 6": { 30 | "commandName": "Executable", 31 | "executablePath": "C:\\Program Files\\Rhino 6\\System\\Rhino.exe", 32 | "commandLineArgs": "/runscript=\"_Grasshopper\"", 33 | } 34 | //#endif 35 | } 36 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "IncludeSample": { 5 | "longName": "include-sample", 6 | "shortName": "sample" 7 | }, 8 | "RhinoVersion": { 9 | "longName": "version", 10 | "shortName": "v" 11 | }, 12 | "PlugInDisplayName": { 13 | "longName": "plugin-display-name", 14 | "shortName": "plugin-name" 15 | }, 16 | "ComponentClassName": { 17 | "longName": "component-class", 18 | "shortName": "component" 19 | }, 20 | "ComponentName": { 21 | "longName": "component-name", 22 | "shortName": "cname" 23 | }, 24 | "ComponentInfo": { 25 | "shortName": "info" 26 | }, 27 | "ComponentChapter": { 28 | "longName": "chapter", 29 | "shortName": "ch" 30 | }, 31 | "ComponentSection": { 32 | "longName": "section", 33 | "shortName": "sec" 34 | }, 35 | "UseWpf": { 36 | "longName": "include-wpf", 37 | "shortName": "wpf" 38 | }, 39 | "UseWinForms": { 40 | "longName": "include-winforms", 41 | "shortName": "wf" 42 | }, 43 | "BuildYak": { 44 | "longName": "build-yak", 45 | "shortName": "yak" 46 | }, 47 | "IncludeVSCode": { 48 | "longName": "include-vscode-launch", 49 | "shortName": "vscode" 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Rhino 8 - netcore", 6 | "type": "coreclr", 7 | "request": "launch", 8 | "preLaunchTask": "build", 9 | "program": "", 10 | "osx": { 11 | "program": "/Applications/Rhino 8.app/Contents/MacOS/Rhinoceros", 12 | "args": [ 13 | "-runscript=_G2" 14 | ] 15 | }, 16 | "windows": { 17 | "program": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 18 | "targetArchitecture": "x86_64", 19 | "args": "/netcore /runscript=\"_G2\"" 20 | }, 21 | "env": { 22 | "RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug" 23 | }, 24 | "cwd": "${workspaceFolder}", 25 | "stopAtEntry": false, 26 | "console": "internalConsole" 27 | }, 28 | { 29 | "name": "Rhino 8 Windows - netfx", 30 | "type": "clr", 31 | "request": "launch", 32 | "preLaunchTask": "build", 33 | "windows": { 34 | "program": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 35 | "targetArchitecture": "x86_64", 36 | "args": "/netfx /runscript=\"_G2\"" 37 | }, 38 | "env": { 39 | "RHINO_PACKAGE_DIRS": "${workspaceFolder}/bin/Debug" 40 | }, 41 | "cwd": "${workspaceFolder}", 42 | "stopAtEntry": false, 43 | "console": "internalConsole" 44 | }, 45 | ], 46 | "compounds": [] 47 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyGrasshopper.1.csproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper.1Plugin.3dm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper.1Plugin.3dm -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper.1Plugin.ghicon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper.1Plugin.ghicon -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper__1Component.3dm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper__1Component.3dm -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper__1Component.ghicon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSGrasshopper2/Icons/MyGrasshopper__1Component.ghicon -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Icons/plugin.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSGrasshopper2/Icons/plugin.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/MyGrasshopper.1Plugin.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rhino; 3 | 4 | namespace MyGrasshopper._1 5 | { 6 | /// 7 | /// Every RhinoCommon .rhp assembly must have one and only one PlugIn-derived 8 | /// class. DO NOT create instances of this class yourself. It is the 9 | /// responsibility of Rhino to create an instance of this class. 10 | /// To complete plug-in information, please also see all PlugInDescription 11 | /// attributes in AssemblyInfo.cs (you might need to click "Project" -> 12 | /// "Show All Files" to see it in the "Solution Explorer" window). 13 | /// 14 | public class MyGrasshopper__1Plugin : Rhino.PlugIns.PlugIn 15 | { 16 | public MyGrasshopper__1Plugin() 17 | { 18 | Instance = this; 19 | } 20 | 21 | ///Gets the only instance of the MyRhino__1Plugin plug-in. 22 | public static MyGrasshopper__1Plugin Instance { get; private set; } 23 | 24 | // You can override methods here to change the plug-in behavior on 25 | // loading and shut down, add options pages to the Rhino _Option command 26 | // and maintain plug-in wide options in a document. 27 | } 28 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/MyGrasshopper.1PluginInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using Grasshopper2.UI; 4 | using Grasshopper2.UI.Icon; 5 | 6 | namespace MyGrasshopper._1 7 | { 8 | public sealed class MyGrasshopper__1PluginInfo : Grasshopper2.Framework.Plugin 9 | { 10 | static T GetAttribute() where T : Attribute => typeof(MyGrasshopper__1PluginInfo).Assembly.GetCustomAttribute(); 11 | 12 | public MyGrasshopper__1PluginInfo() 13 | : base(new Guid("cd826b9b-8dbe-4c31-aac1-6fc7ea2bcfb7"), 14 | new Nomen( 15 | GetAttribute()?.Title, 16 | GetAttribute()?.Description), 17 | typeof(MyGrasshopper__1PluginInfo).Assembly.GetName().Version) 18 | { 19 | Icon = AbstractIcon.FromResource("MyGrasshopper.1Plugin", typeof(MyGrasshopper__1PluginInfo)); 20 | } 21 | 22 | public override string Author => GetAttribute()?.Company; 23 | 24 | public override sealed IIcon Icon { get; } 25 | 26 | public override sealed string Copyright => GetAttribute()?.Copyright ?? base.Copyright; 27 | 28 | // public override sealed string Website => "https://mywebsite.example.com"; 29 | 30 | // public override sealed string Contact => "myemail@example.com"; 31 | 32 | // public override sealed string LicenceAgreement => "license or URL"; 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Rhino.PlugIns; 5 | 6 | // Plug-in Description Attributes - all of these are optional. 7 | // These will show in Rhino's option dialog, in the tab Plug-ins. 8 | [assembly: PlugInDescription(DescriptionType.Address, "")] 9 | [assembly: PlugInDescription(DescriptionType.Country, "")] 10 | [assembly: PlugInDescription(DescriptionType.Email, "")] 11 | [assembly: PlugInDescription(DescriptionType.Phone, "")] 12 | [assembly: PlugInDescription(DescriptionType.Fax, "")] 13 | [assembly: PlugInDescription(DescriptionType.Organization, "")] 14 | [assembly: PlugInDescription(DescriptionType.UpdateUrl, "")] 15 | [assembly: PlugInDescription(DescriptionType.WebSite, "")] 16 | 17 | // Icons should be Windows .ico files and contain 32-bit images in the following sizes: 16, 24, 32, 48, and 256. 18 | [assembly: PlugInDescription(DescriptionType.Icon, "MyGrasshopper._1.Icons.plugin.ico")] 19 | 20 | // The following GUID is for the ID of the typelib if this project is exposed to COM 21 | // This will also be the Guid of the Rhino plug-in 22 | [assembly: Guid("ee4e2b39-d96b-4e4c-8f9d-9b6561e61b64")] 23 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSGrasshopper2/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Rhino 8 - netcore": { 4 | "commandName": "Executable", 5 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 6 | "commandLineArgs": "/netcore /runscript=\"_G2\"", 7 | "environmentVariables": { 8 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 9 | } 10 | }, 11 | "Rhino 8 - netfx": { 12 | "commandName": "Executable", 13 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 14 | "commandLineArgs": "/netfx /runscript=\"_G2\"", 15 | "environmentVariables": { 16 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 17 | } 18 | }, 19 | } 20 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "PluginType": { 5 | "longName": "pluginType", 6 | "shortName": "pt" 7 | }, 8 | "IncludeSample": { 9 | "longName": "include-sample", 10 | "shortName": "sample" 11 | }, 12 | "RhinoVersion": { 13 | "longName": "version", 14 | "shortName": "v" 15 | }, 16 | "CommandClassName": { 17 | "shortName": "command" 18 | }, 19 | "PluginClassName": { 20 | "shortName": "plugin" 21 | }, 22 | "FileDescription": { 23 | "longName": "file-description", 24 | "shortName": "desc" 25 | }, 26 | "FileExtension": { 27 | "longName": "file-extension", 28 | "shortName": "ext" 29 | }, 30 | "UseWpf": { 31 | "longName": "include-wpf", 32 | "shortName": "wpf" 33 | }, 34 | "UseWinForms": { 35 | "longName": "include-winforms", 36 | "shortName": "wf" 37 | }, 38 | "BuildYak": { 39 | "longName": "build-yak", 40 | "shortName": "yak" 41 | }, 42 | "IncludeVSCode": { 43 | "longName": "include-vscode-launch", 44 | "shortName": "vscode" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyRhino.1.csproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | }, 20 | { 21 | "label": "build release", 22 | "command": "dotnet", 23 | "type": "shell", 24 | "args": [ 25 | "build", 26 | "-c:Release", 27 | "-clp:NoSummary", 28 | "${workspaceFolder}/MyRhino.1.csproj" 29 | ], 30 | "problemMatcher": "$msCompile", 31 | "presentation": { 32 | "reveal": "always", 33 | "clear": true 34 | }, 35 | "group": "build" 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-digitize.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-digitize.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-export.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-export.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-import.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-import.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-render.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-render.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-utility.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/CSRhino/EmbeddedResources/plugin-utility.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Rhino.PlugIns; 5 | 6 | // Plug-in Description Attributes - all of these are optional. 7 | // These will show in Rhino's option dialog, in the tab Plug-ins. 8 | [assembly: PlugInDescription(DescriptionType.Address, "")] 9 | [assembly: PlugInDescription(DescriptionType.Country, "")] 10 | [assembly: PlugInDescription(DescriptionType.Email, "")] 11 | [assembly: PlugInDescription(DescriptionType.Phone, "")] 12 | [assembly: PlugInDescription(DescriptionType.Fax, "")] 13 | [assembly: PlugInDescription(DescriptionType.Organization, "")] // Sets the Yak url Attribute (Overrides in .csproj) 14 | [assembly: PlugInDescription(DescriptionType.UpdateUrl, "")] 15 | [assembly: PlugInDescription(DescriptionType.WebSite, "")] // Sets the Yak url Attribute 16 | 17 | // Icons should be Windows .ico files and contain 32-bit images in the following sizes: 16, 24, 32, 48, and 256. 18 | [assembly: PlugInDescription(DescriptionType.Icon, "MyRhino._1.EmbeddedResources.plugin-utility.ico")] 19 | 20 | // The following GUID is for the ID of the typelib if this project is exposed to COM 21 | // This will also be the Guid of the Rhino plug-in 22 | [assembly: Guid("ee4e2b39-d96b-4e4c-8f9d-9b6561e61b64")] 23 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhino/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | //#if (RhinoVersion <= '8') 4 | "Rhino 8 - netcore": { 5 | "commandName": "Executable", 6 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 7 | "commandLineArgs": "/netcore", 8 | "environmentVariables": { 9 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 10 | } 11 | }, 12 | "Rhino 8 - netfx": { 13 | "commandName": "Executable", 14 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 15 | "commandLineArgs": "/netfx", 16 | "environmentVariables": { 17 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 18 | } 19 | }, 20 | //#endif 21 | //#if (RhinoVersion <= '7') 22 | "Rhino 7": { 23 | "commandName": "Executable", 24 | "executablePath": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe", 25 | "commandLineArgs": "$(TargetPath)" 26 | }, 27 | //#endif 28 | //#if (RhinoVersion <= '6') 29 | "Rhino 6": { 30 | "commandName": "Executable", 31 | "executablePath": "C:\\Program Files\\Rhino 6\\System\\Rhino.exe", 32 | "commandLineArgs": "$(TargetPath)" 33 | } 34 | //#endif 35 | } 36 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "IncludeSample": { 5 | "longName": "include-sample", 6 | "shortName": "sample" 7 | }, 8 | "RhinoVersion": { 9 | "longName": "version", 10 | "shortName": "v" 11 | }, 12 | "TestClassName": { 13 | "shortName": "test" 14 | }, 15 | "IncludeVSCode": { 16 | "longName": "include-vscode-launch", 17 | "shortName": "vscode" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino", "RhinoCommon" ], 5 | "name": "Rhino3D Test", 6 | "description": "Build tests for Rhino3D Plug Ins with RhinoCommon in C#", 7 | "identity": "Rhino.Tests.CS", 8 | "groupIdentity": "Rhino.Tests", 9 | "precedence": 100, 10 | "defaultName": "MyRhinoTests", 11 | "shortName": "rhinotest", 12 | "tags": { 13 | "language": "C#", 14 | "type": "project" 15 | }, 16 | "sourceName": "MyRhino.1Tests", 17 | "preferNameDirectory": true, 18 | "symbols": { 19 | "IncludeSample": { 20 | "type": "parameter", 21 | "description": "Include a test code sample", 22 | "dataType": "bool", 23 | "defaultValue": "false" 24 | }, 25 | "RhinoVersion": { 26 | "type": "parameter", 27 | "description": "Version of Rhino", 28 | "datatype": "choice", 29 | "defaultValue": "8", 30 | "choices": [ 31 | { 32 | "choice": "8", 33 | "description": "Version 8" 34 | } 35 | ], 36 | "replaces": "MyRhinoTestVersion" 37 | }, 38 | "IncludeVSCode": { 39 | "type": "parameter", 40 | "description": "Include tasks.json and launch.json to build/debug in VS Code", 41 | "datatype": "bool", 42 | "defaultValue": "true" 43 | }, 44 | "TestClassName": { 45 | "type": "parameter", 46 | "description": "Name of the test class.", 47 | "datatype": "text", 48 | "replaces": "UnitTest1", 49 | "fileRename": "UnitTest1" 50 | } 51 | }, 52 | "forms": { 53 | "JsonStringEncode": { 54 | "identifier": "replace", 55 | "pattern": "\\\\", 56 | "replacement": "\\\\" 57 | } 58 | }, 59 | "sources": [ 60 | { 61 | "modifiers": [ 62 | { 63 | "condition": "!IncludeVSCode", 64 | "exclude": [ ".vscode/*.*" ] 65 | } 66 | ] 67 | } 68 | ], 69 | "primaryOutputs": [ 70 | { "path": "MyRhino.1Tests.csproj" }, 71 | { "path": "UnitTest1.cs" } 72 | ], 73 | "guids": [ 74 | "2529cd5e-54f8-4556-a013-bc1ac315a247" 75 | ] 76 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [], 4 | "compounds": [] 5 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyRhino.1Tests.csproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | }, 20 | { 21 | "label": "test", 22 | "command": "dotnet", 23 | "type": "shell", 24 | "args": [ 25 | "test", 26 | "-c:Release", 27 | "-clp:NoSummary", 28 | "${workspaceFolder}/MyRhino.1Tests.csproj" 29 | ], 30 | "problemMatcher": "$msCompile", 31 | "presentation": { 32 | "reveal": "always", 33 | "clear": true 34 | }, 35 | "group": "build" 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/MyRhino.1Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 7 | net7.0-windows;net48 8 | 11 9 | 10 | 11 | 12 | 1.0 13 | MyRhino.1Tests 14 | MyRhino.1Tests Authors 15 | Description of MyRhino.1Tests 16 | 17 | NU1701;MSB3277 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/Rhino.Testing.Configs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | C:\Program Files\Rhino 8\System 7 | 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSRhinoTest/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using NUnit.Framework; 5 | 6 | using Rhino; 7 | using Rhino.Geometry; 8 | 9 | using Rhino.Testing; 10 | using Rhino.Testing.Fixtures; 11 | 12 | namespace MyRhino._1Tests; 13 | 14 | [RhinoTestFixture] 15 | public class UnitTest1 16 | { 17 | 18 | [Test] 19 | [TestCaseSource(nameof(PointList))] 20 | public void Test(Point3d point) 21 | { 22 | Assert.That(point.X, Is.GreaterThan(0)); 23 | Assert.That(point.Y, Is.GreaterThan(0)); 24 | Assert.That(point.Z, Is.GreaterThan(0)); 25 | } 26 | 27 | public static IEnumerable PointList() 28 | { 29 | yield return new TestCaseData(new Point3d(1, 2, 3)); 30 | yield return new TestCaseData(new Point3d(4, 5, 6)); 31 | yield return new TestCaseData(new Point3d(7, 8, 9)); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSZooPlugIn/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "ZooPluginPath": { 5 | "longName": "zoopluginpath", 6 | "shortName": "zoo" 7 | }, 8 | "RhinoPluginId": { 9 | "longName": "rhinopluginid", 10 | "shortName": "id" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSZooPlugIn/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/CSZooPlugIn/MyZooPlugin.1.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net48 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/CSZooPlugIn/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // The following GUID is for the ID of the typelib if this project is exposed to COM 6 | [assembly: Guid("fb15f2ec-86d8-472f-b303-9d846c512ff0")] -------------------------------------------------------------------------------- /Rhino.Templates/content/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Rhino.Templates/content/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Rhino.Templates/content/VBCommand/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino", "RhinoCommon" ], 5 | "name": "Rhino Command", 6 | "identity": "Rhino.Plugin.File.VB", 7 | "groupIdentity": "Rhino.Plugin.File", 8 | "precedence": 0, 9 | "defaultName": "MyCommand", 10 | "shortName": "rhinocommand", 11 | "tags": { 12 | "language": "VB", 13 | "type": "item" 14 | }, 15 | "sourceName": "MyCommand.1", 16 | "symbols": { 17 | "Namespace": { 18 | "description": "Namespace for the generated files", 19 | "replaces": "MyNamespace", 20 | "type": "parameter" 21 | }, 22 | 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "primaryOutputs": [ 29 | { 30 | "path": "MyCommand.1.vb" 31 | } 32 | ], 33 | "postActions": [ 34 | { 35 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 36 | "description": "Opens the command in the editor", 37 | "manualInstructions": [], 38 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 39 | "args": { 40 | "files": "0" 41 | }, 42 | "continueOnError": true 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBCommand/MyCommand.1.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports Rhino 3 | Imports Rhino.Commands 4 | 5 | Public Class MyCommand__1 6 | Inherits Command 7 | 8 | Shared _instance As MyCommand__1 9 | 10 | Public Sub New() 11 | ' Rhino only creates one instance of each command class defined in a 12 | ' plug-in, so it is safe to store a refence in a static field. 13 | _instance = Me 14 | End Sub 15 | 16 | '''The only instance of this command. 17 | Public Shared ReadOnly Property Instance() As MyCommand__1 18 | Get 19 | Return _instance 20 | End Get 21 | End Property 22 | 23 | '''The command name as it appears on the Rhino command line. 24 | Public Overrides ReadOnly Property EnglishName() As String 25 | Get 26 | Return "MyCommand.1" 27 | End Get 28 | End Property 29 | 30 | Protected Overrides Function RunCommand(ByVal doc As RhinoDoc, ByVal mode As RunMode) As Result 31 | 32 | ' TODO: complete command. 33 | Return Result.Success 34 | 35 | End Function 36 | End Class 37 | -------------------------------------------------------------------------------- /Rhino.Templates/content/VBComponent/.template.config/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/template", 3 | "author": "McNeel", 4 | "classifications": [ "Rhino", "Grasshopper" ], 5 | "name": "Grasshopper Component", 6 | "identity": "Grasshopper.Component.File.VB", 7 | "groupIdentity": "Grasshopper.Component.File", 8 | "precedence": 0, 9 | "defaultName": "MyComponent", 10 | "shortName": "ghcomponent", 11 | "tags": { 12 | "language": "VB", 13 | "type": "item" 14 | }, 15 | "sourceName": "MyComponent.1", 16 | "symbols": { 17 | "Namespace": { 18 | "description": "Namespace for the generated files", 19 | "replaces": "MyNamespace", 20 | "type": "parameter" 21 | }, 22 | 23 | "HostIdentifier": { 24 | "type": "bind", 25 | "binding": "HostIdentifier" 26 | } 27 | }, 28 | "primaryOutputs": [ 29 | { 30 | "path": "MyComponent1.vb" 31 | } 32 | ], 33 | "guids": [ 34 | "FDC62C6D-7C03-412D-8FF8-B76439197730" 35 | ], 36 | "postActions": [ 37 | { 38 | "condition": "(HostIdentifier != \"dotnetcli\" && HostIdentifier != \"dotnetcli-preview\")", 39 | "description": "Opens the command in the editor", 40 | "manualInstructions": [], 41 | "actionId": "84C0DA21-51C8-4541-9940-6CA19AF04EE6", 42 | "args": { 43 | "files": "0" 44 | }, 45 | "continueOnError": true 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBComponent/MyComponent.1.vb: -------------------------------------------------------------------------------- 1 | Imports System.Collections.Generic 2 | 3 | Imports Grasshopper.Kernel 4 | Imports Rhino.Geometry 5 | 6 | 7 | Public Class MyComponent__1 8 | Inherits GH_Component 9 | ''' 10 | ''' Each implementation of GH_Component must provide a public 11 | ''' constructor without any arguments. 12 | ''' Category represents the Tab in which the component will appear, 13 | ''' Subcategory the panel. If you use non-existing tab or panel names, 14 | ''' new tabs/panels will automatically be created. 15 | ''' 16 | Public Sub New() 17 | MyBase.New("MyComponent__1", "MyComponent__1", 18 | "MyComponent__1 description", 19 | "MyComponent__1 category", "MyComponent__1 subcategory") 20 | End Sub 21 | 22 | ''' 23 | ''' Registers all the input parameters for this component. 24 | ''' 25 | Protected Overrides Sub RegisterInputParams(pManager As GH_Component.GH_InputParamManager) 26 | End Sub 27 | 28 | ''' 29 | ''' Registers all the output parameters for this component. 30 | ''' 31 | Protected Overrides Sub RegisterOutputParams(pManager As GH_Component.GH_OutputParamManager) 32 | End Sub 33 | 34 | ''' 35 | ''' This is the method that actually does the work. 36 | ''' 37 | ''' The DA object can be used to retrieve data from input parameters and 38 | ''' to store data in output parameters. 39 | Protected Overrides Sub SolveInstance(DA As IGH_DataAccess) 40 | End Sub 41 | 42 | 43 | ''' 44 | ''' Provides an Icon for every component that will be visible in the User Interface. 45 | ''' Icons need to be 24x24 pixels. 46 | ''' 47 | Protected Overrides ReadOnly Property Icon() As System.Drawing.Bitmap 48 | Get 49 | 'You can add image files to your project resources and access them like this: 50 | ' return Resources.IconForThisComponent; 51 | Return Nothing 52 | End Get 53 | End Property 54 | 55 | ''' 56 | ''' Each component must have a unique Guid to identify it. 57 | ''' It is vital this Guid doesn't change otherwise old ghx files 58 | ''' that use the old ID will partially fail during loading. 59 | ''' 60 | Public Overrides ReadOnly Property ComponentGuid() As Guid 61 | Get 62 | Return New Guid("FDC62C6D-7C03-412D-8FF8-B76439197730") 63 | End Get 64 | End Property 65 | End Class -------------------------------------------------------------------------------- /Rhino.Templates/content/VBGrasshopper/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "IncludeSample": { 5 | "longName": "include-sample", 6 | "shortName": "sample" 7 | }, 8 | "RhinoVersion": { 9 | "longName": "version", 10 | "shortName": "v" 11 | }, 12 | "AddonDisplayName": { 13 | "longName": "addon-display-name", 14 | "shortName": "addon-name" 15 | }, 16 | "ComponentClassName": { 17 | "longName": "component-class", 18 | "shortName": "component" 19 | }, 20 | "ComponentName": { 21 | "longName": "component-name", 22 | "shortName": "cname" 23 | }, 24 | "ComponentNickname": { 25 | "longName": "nickname", 26 | "shortName": "nick" 27 | }, 28 | "ComponentDescription": { 29 | "longName": "description", 30 | "shortName": "desc" 31 | }, 32 | "ComponentCategory": { 33 | "longName": "category", 34 | "shortName": "cat" 35 | }, 36 | "ComponentSubcategory": { 37 | "longName": "subcategory", 38 | "shortName": "sub" 39 | }, 40 | "UseWpf": { 41 | "longName": "include-wpf", 42 | "shortName": "wpf" 43 | }, 44 | "UseWinForms": { 45 | "longName": "include-winforms", 46 | "shortName": "wf" 47 | }, 48 | "BuildYak": { 49 | "longName": "build-yak", 50 | "shortName": "yak" 51 | }, 52 | "IncludeVSCode": { 53 | "longName": "include-vscode-launch", 54 | "shortName": "vscode" 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBGrasshopper/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBGrasshopper/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyGrasshopper.1.vbproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBGrasshopper/MyGrasshopper.1Info.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports Grasshopper.Kernel 3 | 4 | Public Class MyGrasshopper__1Info 5 | Inherits GH_AssemblyInfo 6 | 7 | Public Overrides ReadOnly Property Name() As String 8 | Get 9 | Return "MyGrasshopper.1 Info" 10 | End Get 11 | End Property 12 | Public Overrides ReadOnly Property Icon As System.Drawing.Bitmap 13 | Get 14 | 'Return a 24x24 pixel bitmap to represent this GHA library. 15 | Return Nothing 16 | End Get 17 | End Property 18 | Public Overrides ReadOnly Property Description As String 19 | Get 20 | 'Return a short string describing the purpose of this GHA library. 21 | Return "" 22 | End Get 23 | End Property 24 | Public Overrides ReadOnly Property Id As System.Guid 25 | Get 26 | Return New System.Guid("cd826b9b-8dbe-4c31-aac1-6fc7ea2bcfb7") 27 | End Get 28 | End Property 29 | 30 | Public Overrides ReadOnly Property AuthorName As String 31 | Get 32 | 'Return a string identifying you or your company. 33 | Return "" 34 | End Get 35 | End Property 36 | Public Overrides ReadOnly Property AuthorContact As String 37 | Get 38 | 'Return a string representing your preferred contact details. 39 | Return "" 40 | End Get 41 | End Property 42 | Public Overrides ReadOnly Property AssemblyVersion As String 43 | Get 44 | 'Return a string representing the version. This returns the same version as the assembly. 45 | Return [GetType]().Assembly.GetName().Version.ToString() 46 | End Get 47 | End Property 48 | End Class 49 | 50 | -------------------------------------------------------------------------------- /Rhino.Templates/content/VBGrasshopper/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | //#if (RhinoVersion <= '8') 4 | "Rhino 8 - netcore": { 5 | "commandName": "Executable", 6 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 7 | "commandLineArgs": "/netcore /runscript=\"_Grasshopper\"", 8 | "environmentVariables": { 9 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 10 | } 11 | }, 12 | "Rhino 8 - netfx": { 13 | "commandName": "Executable", 14 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 15 | "commandLineArgs": "/netfx /runscript=\"_Grasshopper\"", 16 | "environmentVariables": { 17 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 18 | } 19 | }, 20 | //#endif 21 | //#if (RhinoVersion <= '7') 22 | "Rhino 7": { 23 | "commandName": "Executable", 24 | "executablePath": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe", 25 | "commandLineArgs": "/runscript=\"_Grasshopper\"", 26 | }, 27 | //#endif 28 | //#if (RhinoVersion <= '6') 29 | "Rhino 6": { 30 | "commandName": "Executable", 31 | "executablePath": "C:\\Program Files\\Rhino 6\\System\\Rhino.exe", 32 | "commandLineArgs": "/runscript=\"_Grasshopper\"", 33 | } 34 | //#endif 35 | } 36 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "PluginType": { 5 | "longName": "pluginType", 6 | "shortName": "pt" 7 | }, 8 | "IncludeSample": { 9 | "longName": "include-sample", 10 | "shortName": "sample" 11 | }, 12 | "RhinoVersion": { 13 | "longName": "version", 14 | "shortName": "v" 15 | }, 16 | "CommandClassName": { 17 | "shortName": "command" 18 | }, 19 | "PluginClassName": { 20 | "shortName": "plugin" 21 | }, 22 | "FileDescription": { 23 | "longName": "file-description", 24 | "shortName": "desc" 25 | }, 26 | "FileExtension": { 27 | "longName": "file-extension", 28 | "shortName": "ext" 29 | }, 30 | "UseWpf": { 31 | "longName": "include-wpf", 32 | "shortName": "wpf" 33 | }, 34 | "UseWinForms": { 35 | "longName": "include-winforms", 36 | "shortName": "wf" 37 | }, 38 | "BuildYak": { 39 | "longName": "build-yak", 40 | "shortName": "yak" 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "build", 6 | "command": "dotnet", 7 | "type": "shell", 8 | "args": [ 9 | "build", 10 | "-clp:NoSummary", 11 | "${workspaceFolder}/MyRhino.1.vbproj" 12 | ], 13 | "problemMatcher": "$msCompile", 14 | "presentation": { 15 | "reveal": "always", 16 | "clear": true 17 | }, 18 | "group": "build" 19 | } 20 | ] 21 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-digitize.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-digitize.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-export.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-export.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-import.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-import.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-render.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-render.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-utility.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/content/VBRhino/EmbeddedResources/plugin-utility.ico -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/Properties/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | Imports Rhino.PlugIns 5 | 6 | ' Plug-in Description Attributes - all of these are optional. 7 | ' These will show in Rhino's option dialog, in the tab Plug-ins. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ' Icons should be Windows .ico files And contain 32-bit images in the following sizes 16, 24, 32, 48, And 256. 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | ' This will also be the Guid of the Rhino plug-in -------------------------------------------------------------------------------- /Rhino.Templates/content/VBRhino/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | //#if (RhinoVersion <= '8') 4 | "Rhino 8 - netcore": { 5 | "commandName": "Executable", 6 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 7 | "commandLineArgs": "/netcore", 8 | "environmentVariables": { 9 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 10 | } 11 | }, 12 | "Rhino 8 - netfx": { 13 | "commandName": "Executable", 14 | "executablePath": "C:\\Program Files\\Rhino 8\\System\\Rhino.exe", 15 | "commandLineArgs": "/netfx", 16 | "environmentVariables": { 17 | "RHINO_PACKAGE_DIRS": "$(ProjectDir)$(OutputPath)\\" 18 | } 19 | }, 20 | //#endif 21 | //#if (RhinoVersion <= '7') 22 | "Rhino 7": { 23 | "commandName": "Executable", 24 | "executablePath": "C:\\Program Files\\Rhino 7\\System\\Rhino.exe", 25 | "commandLineArgs": "$(TargetPath)" 26 | }, 27 | //#endif 28 | //#if (RhinoVersion <= '6') 29 | "Rhino 6": { 30 | "commandName": "Executable", 31 | "executablePath": "C:\\Program Files\\Rhino 6\\System\\Rhino.exe", 32 | "commandLineArgs": "$(TargetPath)" 33 | } 34 | //#endif 35 | } 36 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBZooPlugIn/.template.config/dotnetcli.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/dotnetcli.host", 3 | "symbolInfo": { 4 | "ZooPluginPath": { 5 | "longName": "zoopluginpath", 6 | "shortName": "zoo" 7 | }, 8 | "RhinoPluginId": { 9 | "longName": "rhinopluginid", 10 | "shortName": "id" 11 | }, 12 | "PluginClassName": { 13 | "shortName": "plugin" 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBZooPlugIn/.template.config/ide.host.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/vs-2017.3.host", 3 | "unsupportedHosts": [ 4 | { 5 | "id": "vs" 6 | } 7 | ] 8 | } -------------------------------------------------------------------------------- /Rhino.Templates/content/VBZooPlugIn/MyZooPlugin.1.vbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net48 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Rhino.Templates/content/VBZooPlugIn/Properties/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 6 | 7 | -------------------------------------------------------------------------------- /Rhino.Templates/rhinocommon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.Templates/rhinocommon.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.VisualStudio.Mac", "Rhino.VisualStudio.Mac\Rhino.VisualStudio.Mac.csproj", "{E11789C7-BD3D-4BBE-86A1-8B5CEC452134}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Templates", "Rhino.Templates\Rhino.Templates.csproj", "{6DD45915-556A-4BA7-80FA-323B70A7B352}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.VisualStudio", "Rhino.VisualStudio\Rhino.VisualStudio.csproj", "{FEFB6FBB-0A9A-4A0A-B4FA-30AF8D96AEBF}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {E11789C7-BD3D-4BBE-86A1-8B5CEC452134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {E11789C7-BD3D-4BBE-86A1-8B5CEC452134}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {E11789C7-BD3D-4BBE-86A1-8B5CEC452134}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {E11789C7-BD3D-4BBE-86A1-8B5CEC452134}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {6DD45915-556A-4BA7-80FA-323B70A7B352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {6DD45915-556A-4BA7-80FA-323B70A7B352}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {6DD45915-556A-4BA7-80FA-323B70A7B352}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {6DD45915-556A-4BA7-80FA-323B70A7B352}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {FEFB6FBB-0A9A-4A0A-B4FA-30AF8D96AEBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {FEFB6FBB-0A9A-4A0A-B4FA-30AF8D96AEBF}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {FEFB6FBB-0A9A-4A0A-B4FA-30AF8D96AEBF}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {FEFB6FBB-0A9A-4A0A-B4FA-30AF8D96AEBF}.Release|Any CPU.Build.0 = Release|Any CPU 28 | EndGlobalSection 29 | GlobalSection(MonoDevelopProperties) = preSolution 30 | StartupItem = Rhino.VisualStudio.Mac.csproj 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/EtoInitializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using Eto; 4 | using Eto.Forms; 5 | 6 | namespace Rhino.VisualStudio.Mac 7 | { 8 | public static class EtoInitializer 9 | { 10 | static readonly object Cell_Key = new object(); 11 | static bool initialized; 12 | public static void Initialize() 13 | { 14 | if (initialized) 15 | return; 16 | 17 | initialized = true; 18 | 19 | #if VS2019 20 | // VS 2019 for Mac is dumb and GC's things even though they're still in use. 21 | Style.Add(null, h => 22 | { 23 | h.Widget.Properties[Cell_Key] = h.Control.Cell; 24 | }); 25 | Style.Add(null, h => 26 | { 27 | h.Widget.Properties[Cell_Key] = h.Control.ContentView; 28 | }); 29 | #endif 30 | 31 | try 32 | { 33 | var platform = Platform.Instance; 34 | if (platform == null) 35 | { 36 | platform = new Eto.Mac.Platform(); 37 | Platform.Initialize(platform); 38 | } 39 | 40 | platform.LoadAssembly(typeof(EtoInitializer).Assembly); 41 | 42 | if (Application.Instance == null) 43 | new Application().Attach(); 44 | 45 | } 46 | catch (Exception ex) 47 | { 48 | Debug.WriteLine($"{ex}"); 49 | } 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Drawing; 3 | 4 | namespace Rhino.VisualStudio.Mac 5 | { 6 | public static class Extensions 7 | { 8 | #if VS2022 9 | public static Color ToEto(this MonoDevelop.Ide.Gui.Styles.IdeColor color) 10 | { 11 | return new Color((AppKit.NSColor)color, (float)color.Red, (float)color.Green, (float)color.Blue, (float)color.Alpha); 12 | } 13 | #endif 14 | public static Color ToEto(this Xwt.Drawing.Color color) 15 | { 16 | return new Color((float)color.Red, (float)color.Green, (float)color.Blue, (float)color.Alpha); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/PlatformHelpersHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Eto; 4 | using Eto.Drawing; 5 | using MonoDevelop.Ide.Gui; 6 | using Rhino.VisualStudio; 7 | using Rhino.VisualStudio.Mac; 8 | 9 | [assembly: ExportHandler(typeof(IPlatformHelpers), typeof(PlatformHelpersHandler))] 10 | 11 | namespace Rhino.VisualStudio.Mac 12 | { 13 | public class PlatformHelpersHandler : IPlatformHelpers 14 | { 15 | public string FindRhino(int version) 16 | { 17 | return Helpers.FindRhinoWithVersion(version); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/PlatformThemeHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Eto; 4 | using Eto.Drawing; 5 | using MonoDevelop.Ide.Gui; 6 | using Rhino.VisualStudio; 7 | using Rhino.VisualStudio.Mac; 8 | 9 | [assembly: ExportHandler(typeof(IPlatformTheme), typeof(PlatformThemeHandler))] 10 | 11 | namespace Rhino.VisualStudio.Mac 12 | { 13 | public class PlatformThemeHandler : IPlatformTheme 14 | { 15 | public Color ProjectBackground => Styles.NewProjectDialog.ProjectConfigurationLeftHandBackgroundColor.ToEto(); 16 | 17 | public Color ProjectForeground => Styles.BaseForegroundColor.ToEto(); 18 | 19 | public Color ProjectDialogBackground => ProjectBackground; // not used on mac anyway.. 20 | 21 | public Color ErrorForeground => Styles.ErrorForegroundColor.ToEto(); 22 | 23 | public Color SummaryBackground => Styles.NewProjectDialog.ProjectConfigurationRightHandBackgroundColor.ToEto(); 24 | 25 | public Color SummaryForeground => Styles.NewProjectDialog.ProjectConfigurationPreviewLabelColor.ToEto(); 26 | 27 | public Color DesignerBackground => Styles.BaseBackgroundColor.ToEto(); 28 | 29 | public Color DesignerPanel => Styles.BackgroundColor.ToEto(); 30 | } 31 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Properties/AddinInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Mono.Addins; 3 | 4 | [assembly: Addin( 5 | "Mac", 6 | Namespace = "Rhino.VisualStudio", 7 | Version = "8.16.2.0" 8 | )] 9 | 10 | // This controls the displayed name in the Xamarin Studio Add-In Manager... 11 | [assembly: AddinName("RhinoCommon Plugin Support")] 12 | 13 | // This entry controls which of the Add-In categories this get filed under in Xamarin Studio's Add-In Manager... 14 | [assembly: AddinCategory("Debugging")] 15 | 16 | // This is the sub-description displayed under the AddinName in the XS Add-In Manager... 17 | [assembly: AddinDescription("Rhino plugin templates and debugger")] 18 | 19 | // Not displayed, AFAIK... 20 | [assembly: AddinAuthor("Robert McNeel and Associates")] 21 | 22 | // The link used by the More Info button in the Xamarin Studio Add-In Manager... 23 | [assembly: AddinUrl("https://github.com/mcneel/RhinoVisualStudioExtensions")] 24 | 25 | #if VS2022 26 | [assembly: ImportAddinAssembly("Eto.macOS.dll")] 27 | #elif VS2019 28 | [assembly: ImportAddinAssembly("Eto.XamMac2.dll")] 29 | #endif 30 | [assembly: ImportAddinAssembly("Eto.dll")] 31 | [assembly: ImportAddinAssembly("Rhino.VisualStudio.dll")] 32 | [assembly: ImportAddinAssembly("Rhino.VisualStudio.Mac.dll")] 33 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoDebuggerStartInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Linq; 4 | using MonoDevelop.Projects; 5 | using System.Collections.Generic; 6 | 7 | namespace Rhino.VisualStudio.Mac 8 | { 9 | class RhinoDebuggerStartInfo : Mono.Debugging.Soft.SoftDebuggerStartInfo 10 | { 11 | public RhinoDebuggerStartInfo(RhinoExecutionCommand cmd) 12 | : base(new Mono.Debugging.Soft.SoftDebuggerListenArgs("Rhino", System.Net.IPAddress.Loopback, 0)) 13 | { 14 | Command = cmd.Command; 15 | Arguments = cmd.Arguments; 16 | RhinoVersion = cmd.RhinoVersion; 17 | foreach (var env in cmd.EnvironmentVariables) 18 | { 19 | EnvironmentVariables.Add(env.Key, env.Value); 20 | } 21 | ApplicationPath = cmd.ApplicationPath; 22 | ExecutablePath = cmd.ExecutablePath; 23 | WorkingDirectory = cmd.WorkingDirectory; 24 | } 25 | 26 | public string ApplicationPath { get; private set; } 27 | public string ExecutablePath { get; private set; } 28 | public int RhinoVersion { get; set; } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoExecutionHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using MonoDevelop.Core; 4 | using MonoDevelop.Core.Execution; 5 | 6 | namespace Rhino.VisualStudio.Mac 7 | { 8 | public class RhinoExecutionHandler : NativePlatformExecutionHandler 9 | { 10 | public override bool CanExecute(ExecutionCommand command) 11 | { 12 | return command is RhinoExecutionCommand; 13 | } 14 | 15 | public override ProcessAsyncOperation Execute(ExecutionCommand command, OperationConsole console) 16 | { 17 | // run without debugger 18 | var cmd = (RhinoExecutionCommand)command; 19 | 20 | var nativeCmd = new NativeExecutionCommand(cmd.ExecutablePath, cmd.Arguments, cmd.WorkingDirectory, cmd.EnvironmentVariables); 21 | return base.Execute(nativeCmd, console); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoFileTemplate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using MonoDevelop.Ide.Templates; 4 | using MonoDevelop.Projects; 5 | using System.Text.RegularExpressions; 6 | 7 | namespace Rhino.VisualStudio.Mac 8 | { 9 | public class RhinoFileTemplate : TextFileDescriptionTemplate 10 | { 11 | public override string CreateContent(Project project, Dictionary tags, string language) 12 | { 13 | var content = base.CreateContent(project, tags, language); 14 | var keys = new Dictionary(StringComparer.OrdinalIgnoreCase); 15 | return Regex.Replace(content, @"\$\{Guid\d+\}", match => 16 | { 17 | if (!keys.TryGetValue(match.Value, out var key)) 18 | { 19 | key = Guid.NewGuid(); 20 | keys.Add(match.Value, key); 21 | } 22 | return key.ToString(); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoGlobalProperties.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Mono.Addins; 4 | using MonoDevelop.Core; 5 | using MonoDevelop.Projects.MSBuild; 6 | 7 | namespace Rhino.VisualStudio.Mac 8 | { 9 | [Extension("/MonoDevelop/ProjectModel/MSBuildGlobalPropertyProviders")] 10 | public class RhinoGlobalProperties : IMSBuildGlobalPropertyProvider 11 | { 12 | Dictionary properties; 13 | 14 | static Dictionary s_emptyDictionary = new Dictionary(); 15 | 16 | #pragma warning disable 67 17 | public event EventHandler GlobalPropertiesChanged; 18 | #pragma warning restore 67 19 | 20 | static RhinoGlobalProperties instance; 21 | 22 | static bool s_requiresMdb; 23 | public static bool RequiresMdb 24 | { 25 | get { return s_requiresMdb; } 26 | set 27 | { 28 | if (s_requiresMdb != value) 29 | { 30 | s_requiresMdb = value; 31 | Runtime.RunInMainThread(() => instance.GlobalPropertiesChanged?.Invoke(instance, EventArgs.Empty)); 32 | } 33 | } 34 | } 35 | 36 | public RhinoGlobalProperties() 37 | { 38 | instance = this; 39 | } 40 | 41 | public IDictionary GetGlobalProperties() 42 | { 43 | if (!RequiresMdb) 44 | return s_emptyDictionary; 45 | 46 | // in mono 5.0, it only generates mdb's if using mcs so switch to that compiler 47 | return properties ?? (properties = new Dictionary { 48 | { "LangVersion" , "7.2" }, // mcs only supports up to C# v7.2 currently.. 49 | { "CscToolExe" , "mcs.exe" }, 50 | { "_DebugFileExt" , ".mdb" } 51 | }); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoRunConfiguration.cs: -------------------------------------------------------------------------------- 1 | using MonoDevelop.Components; 2 | using MonoDevelop.Ide.Gui.Dialogs; 3 | using MonoDevelop.Projects; 4 | 5 | 6 | namespace Rhino.VisualStudio.Mac 7 | { 8 | internal class RhinoRunConfigurationEditor : MonoDevelop.Ide.Projects.OptionPanels.RunConfigurationPanel 9 | { 10 | public override Control CreatePanelWidget() 11 | { 12 | return base.CreatePanelWidget(); 13 | } 14 | } 15 | 16 | internal class RhinoRunConfiguration : AssemblyRunConfiguration 17 | { 18 | public override bool CanRunLibrary => true; 19 | 20 | public RhinoRunConfiguration(string name) : base(name) 21 | { 22 | } 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/RhinoSoftDebuggerEngine.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Core.Execution; 3 | using MonoDevelop.Debugger.Soft; 4 | 5 | namespace Rhino.VisualStudio.Mac 6 | { 7 | public class RhinoSoftDebuggerEngine : SoftDebuggerEngine 8 | { 9 | public string Id => "Mono.Debugger.Soft.Rhino"; 10 | 11 | public const string DebuggerName = "RhinoCommon Plug-In Debugger"; 12 | 13 | public string Name => DebuggerName; 14 | 15 | public override bool CanDebugCommand(ExecutionCommand cmd) 16 | { 17 | return cmd is RhinoExecutionCommand rhinocmd && rhinocmd.RhinoVersion <= 7; 18 | } 19 | 20 | public override Mono.Debugging.Client.DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand c) 21 | { 22 | return new RhinoDebuggerStartInfo((RhinoExecutionCommand)c); 23 | } 24 | 25 | public override Mono.Debugging.Client.DebuggerSession CreateSession() 26 | { 27 | return new RhinoSoftDebuggerSession(); 28 | } 29 | 30 | public override Mono.Debugging.Client.ProcessInfo[] GetAttachableProcesses() 31 | { 32 | return new Mono.Debugging.Client.ProcessInfo[0]; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Grasshopper/EmptyComponent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using Grasshopper; 5 | using Grasshopper.Kernel; 6 | using Rhino.Geometry; 7 | 8 | namespace ${Namespace} 9 | { 10 | public class ${EscapedIdentifier} : GH_Component 11 | { 12 | /// 13 | /// Each implementation of GH_Component must provide a public 14 | /// constructor without any arguments. 15 | /// Category represents the Tab in which the component will appear, 16 | /// Subcategory the panel. If you use non-existing tab or panel names, 17 | /// new tabs/panels will automatically be created. 18 | /// 19 | public ${EscapedIdentifier}() 20 | : base("${EscapedIdentifier}", "Nickname", 21 | "${EscapedIdentifier} description", 22 | "Category", "Subcategory") 23 | { 24 | } 25 | 26 | /// 27 | /// Registers all the input parameters for this component. 28 | /// 29 | protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) 30 | { 31 | } 32 | 33 | /// 34 | /// Registers all the output parameters for this component. 35 | /// 36 | protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) 37 | { 38 | } 39 | 40 | /// 41 | /// This is the method that actually does the work. 42 | /// 43 | /// The DA object can be used to retrieve data from input parameters and 44 | /// to store data in output parameters. 45 | protected override void SolveInstance(IGH_DataAccess DA) 46 | { 47 | } 48 | 49 | /// 50 | /// Provides an Icon for every component that will be visible in the User Interface. 51 | /// Icons need to be 24x24 pixels. 52 | /// 53 | protected override System.Drawing.Bitmap Icon 54 | { 55 | get 56 | { 57 | // You can add image files to your project resources and access them like this: 58 | //return Resources.IconForThisComponent; 59 | return null; 60 | } 61 | } 62 | 63 | /// 64 | /// Each component must have a unique Guid to identify it. 65 | /// It is vital this Guid doesn't change otherwise old ghx files 66 | /// that use the old ID will partially fail during loading. 67 | /// 68 | public override Guid ComponentGuid 69 | { 70 | get { return new Guid("${Guid3}"); } 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Grasshopper/EmptyComponent.xft.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Grasshopper/grasshopper-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/Templates/Grasshopper/grasshopper-project.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Grasshopper/grasshopper-project@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/Templates/Grasshopper/grasshopper-project@2x.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Rhino/EmptyCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Rhino; 3 | using Rhino.Commands; 4 | using Rhino.Geometry; 5 | using Rhino.Input; 6 | using Rhino.Input.Custom; 7 | using Rhino.UI; 8 | 9 | namespace ${Namespace} 10 | { 11 | [System.Runtime.InteropServices.Guid("${Guid2}")] 12 | public class ${EscapedIdentifier} : Rhino.Commands.Command 13 | { 14 | public ${EscapedIdentifier}() 15 | { 16 | // Rhino only creates one instance of each command class defined in a 17 | // plug-in, so it is safe to store a refence in a static property. 18 | Instance = this; 19 | } 20 | 21 | ///The only instance of this command. 22 | public static ${EscapedIdentifier} Instance { get; private set; } 23 | 24 | public override string EnglishName => "${EscapedIdentifier}"; 25 | 26 | protected override Result RunCommand(Rhino.RhinoDoc doc, RunMode mode) 27 | { 28 | // TODO: start here modifying the behaviour of your command. 29 | 30 | return Result.Success; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Rhino/EmptyCommand.xft.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Rhino/rhinocommon-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/Templates/Rhino/rhinocommon-project.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Templates/Rhino/rhinocommon-project@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/Templates/Rhino/rhinocommon-project@2x.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Wizard/BaseTemplateWizard.cs: -------------------------------------------------------------------------------- 1 | using MonoDevelop.Ide.Templates; 2 | using Eto.Forms; 3 | 4 | namespace Rhino.VisualStudio.Mac.Wizard 5 | { 6 | public abstract class BaseTemplateWizard : TemplateWizard 7 | { 8 | static BaseTemplateWizard() 9 | { 10 | EtoInitializer.Initialize(); 11 | } 12 | 13 | BaseWizardViewModel _model; 14 | DualBinding _isValidBinding; 15 | 16 | protected BaseWizardViewModel Model => _model; 17 | 18 | protected abstract BaseWizardViewModel CreateModel(); 19 | 20 | protected abstract Control CreatePanel(); 21 | 22 | public abstract string PageTitle { get; } 23 | 24 | public override void OnFinish() 25 | { 26 | base.OnFinish(); 27 | var model = Model; 28 | if (model != null) 29 | { 30 | model.Finish(); 31 | 32 | if (!string.IsNullOrWhiteSpace(model.ProjectName)) 33 | { 34 | Parameters["ProjectName"] = model.ProjectName; 35 | } 36 | } 37 | } 38 | 39 | public override int TotalPages => 1; 40 | 41 | public override WizardPage GetPage(int pageNumber) 42 | { 43 | var panel = CreatePanel(); 44 | 45 | var page = new EtoWizardPage(this, panel, PageTitle); 46 | 47 | _model = CreateModel(); 48 | _model.Host = page; 49 | 50 | panel.DataContext = _model; 51 | 52 | // bind IsValid to CanMoveToNextPage 53 | _isValidBinding = new DualBinding( 54 | Binding.Property(_model, (BaseWizardViewModel m) => m.IsValid), 55 | Binding.Property(page, (EtoWizardPage p) => p.CanMoveToNextPage) 56 | ); 57 | return page; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Wizard/EtoWizardPage.cs: -------------------------------------------------------------------------------- 1 | using MonoDevelop.Ide.Templates; 2 | using Eto.Forms; 3 | 4 | namespace Rhino.VisualStudio.Mac.Wizard 5 | { 6 | class EtoWizardPage : WizardPage, IWizardHost 7 | { 8 | Control _control; 9 | string _title; 10 | BaseTemplateWizard _wizard; 11 | public EtoWizardPage(BaseTemplateWizard wizard, Control control, string title) 12 | { 13 | _control = control; 14 | _title = title; 15 | _wizard = wizard; 16 | } 17 | 18 | public override string Title => _title; 19 | 20 | public void Abort() => _control.ParentWindow?.Close(); 21 | 22 | public void Continue() => OnNextPageRequested(); 23 | 24 | public string GetParameter(string name) => _wizard.Parameters[name]; 25 | 26 | public bool IsSupportedParameter(string name) => _wizard.IsSupportedParameter(name); 27 | 28 | public void SetParameter(string name, string value) => _wizard.Parameters[name] = value; 29 | 30 | protected override object CreateNativeWidget() 31 | { 32 | #if VS2022 33 | _control.Size = new Eto.Drawing.Size(900, 496); 34 | #endif 35 | var native = _control.ToNative(true); 36 | Application.Instance.AsyncInvoke(() => native.Window?.RecalculateKeyViewLoop()); 37 | return native; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Wizard/GrasshopperWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Ide.Projects; 3 | using System.Collections.Generic; 4 | using Eto.Forms; 5 | 6 | namespace Rhino.VisualStudio.Mac.Wizard 7 | { 8 | public class GrasshopperWizard : BaseTemplateWizard 9 | { 10 | public override string Id => "Rhino.VisualStudio.Mac.GrasshopperWizard"; 11 | public override string PageTitle => "Grasshopper project options"; 12 | protected override BaseWizardViewModel CreateModel() => new GrasshopperOptionsViewModel(); 13 | protected override Control CreatePanel() => new GrasshopperOptionsPanel(true); 14 | } 15 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Wizard/ProvideSampleControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Ide.Templates; 3 | using MonoDevelop.Ide.Projects; 4 | using System.Collections.Generic; 5 | using Eto.Forms; 6 | 7 | namespace Rhino.VisualStudio.Mac.Wizard 8 | { 9 | class ProvideSampleControl : ProjectConfigurationControl 10 | { 11 | readonly RhinoCommonWizard wizard; 12 | 13 | public ProvideSampleControl(RhinoCommonWizard wizard) 14 | { 15 | this.wizard = wizard; 16 | } 17 | 18 | public override string Label => string.Empty; 19 | 20 | Eto.Forms.CheckBox cb; 21 | 22 | protected override object CreateNativeWidget () 23 | { 24 | cb = new Eto.Forms.CheckBox{ Text = "Provide Code Sample"}; 25 | cb.ToolTip = "Check to provide a sample implementation for the command/component"; 26 | //cb.Checked = wizard.ProvideCodeSample; 27 | //cb.CheckedChanged += (sender, e) => wizard.ProvideCodeSample = cb.Checked == true; 28 | return cb.ToNative(true); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/Wizard/RhinoCommonWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MonoDevelop.Ide.Projects; 3 | using System.Collections.Generic; 4 | using Eto.Forms; 5 | 6 | namespace Rhino.VisualStudio.Mac.Wizard 7 | { 8 | public class RhinoCommonWizard : BaseTemplateWizard 9 | { 10 | public override string Id => "Rhino.VisualStudio.Mac.RhinoCommonWizard"; 11 | public override string PageTitle => "Rhino project options"; 12 | 13 | protected override BaseWizardViewModel CreateModel() => new RhinoCommonOptionsViewModel(); 14 | 15 | protected override Control CreatePanel() => new RhinoCommonOptionsPanel(true); 16 | } 17 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/rhinocommon_addin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/rhinocommon_addin.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Mac/rhinocommon_addin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Mac/rhinocommon_addin@2x.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/EtoInitializer.cs: -------------------------------------------------------------------------------- 1 | using Eto; 2 | using Eto.Forms; 3 | using Eto.Wpf.Forms; 4 | using System; 5 | 6 | namespace Rhino.VisualStudio.Windows 7 | { 8 | public static class EtoInitializer 9 | { 10 | static bool initialized; 11 | public static void Initialize() 12 | { 13 | if (initialized) 14 | return; 15 | 16 | initialized = true; 17 | 18 | try 19 | { 20 | Style.Add("rhino.themed", h => ThemeWindow(h.Control)); 21 | Style.Add("rhino.themed", h => ThemeWindow(h.Control)); 22 | 23 | var platform = Platform.Instance; 24 | if (platform == null) 25 | { 26 | platform = new Eto.Wpf.Platform(); 27 | Platform.Initialize(platform); 28 | } 29 | 30 | platform.LoadAssembly(typeof(EtoInitializer).Assembly); 31 | 32 | if (Application.Instance == null) 33 | new Eto.Forms.Application().Attach(); 34 | 35 | } 36 | catch (Exception ex) 37 | { 38 | Console.WriteLine($"{ex}"); 39 | } 40 | } 41 | private static void ThemeWindow(System.Windows.Window w) 42 | { 43 | w.Resources.MergedDictionaries.Add(new System.Windows.ResourceDictionary { Source = new Uri("pack://application:,,,/Rhino.VisualStudio.Windows;component/themes/WindowStyles.xaml", UriKind.RelativeOrAbsolute) }); 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Helpers.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using Microsoft.VisualStudio.Shell.Interop; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Diagnostics; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Text.RegularExpressions; 10 | using System.Threading.Tasks; 11 | using System.Xml; 12 | using System.Xml.Linq; 13 | 14 | namespace Rhino.VisualStudio.Windows 15 | { 16 | static class Helpers 17 | { 18 | static Helpers() 19 | { 20 | EtoInitializer.Initialize(); 21 | } 22 | 23 | public static Window MainWindow 24 | { 25 | get 26 | { 27 | Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); 28 | var uiShell = Services.GetService(); 29 | IntPtr hwnd; 30 | uiShell.GetDialogOwnerHwnd(out hwnd); 31 | return new Form(new Eto.Wpf.Forms.HwndFormHandler(hwnd)); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/PlatformHelperHandler.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Runtime.InteropServices; 6 | using Microsoft.Win32; 7 | using Rhino.VisualStudio; 8 | using Rhino.VisualStudio.Windows; 9 | using Eto; 10 | 11 | [assembly: ExportHandler(typeof(IPlatformHelpers), typeof(PlatformHelperHandler))] 12 | 13 | namespace Rhino.VisualStudio.Windows 14 | { 15 | class PlatformHelperHandler : IPlatformHelpers 16 | { 17 | const string RhinoExe = "Rhino.exe"; 18 | 19 | public string FindRhino(int version) 20 | { 21 | if (Environment.Is64BitOperatingSystem && RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) 22 | { 23 | var strings = new List(); 24 | SearchRegistryKey($@"Software\McNeel\Rhinoceros\{version}.0\Install", 25 | RegistryHive.LocalMachine, RegistryView.Registry64, strings); 26 | 27 | SearchRegistryKey($@"Software\McNeel\Rhinoceros\{version}.0\Install", 28 | RegistryHive.CurrentUser, RegistryView.Registry64, strings); 29 | 30 | 31 | foreach (var str in strings) 32 | { 33 | var path = Path.Combine(str, "System", RhinoExe); 34 | if (File.Exists(path)) 35 | { 36 | return path; 37 | } 38 | } 39 | } 40 | 41 | return string.Empty; 42 | } 43 | 44 | /// 45 | /// Caution: this method swallows any exception. 46 | /// 47 | private static bool SearchRegistryKey(string keyName, RegistryHive hive, RegistryView view, IList installPaths) 48 | { 49 | try 50 | { 51 | using (var registryKey = RegistryKey.OpenBaseKey(hive, view).OpenSubKey(keyName)) 52 | { 53 | if (registryKey != null) 54 | { 55 | string value = registryKey.GetValue("InstallPath") as string; 56 | if (!string.IsNullOrEmpty(value)) 57 | { 58 | if (!installPaths.Contains(value)) 59 | installPaths.Add(value); 60 | return true; 61 | } 62 | } 63 | } 64 | } 65 | catch { } 66 | return false; 67 | } 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/PlatformThemeHandler.cs: -------------------------------------------------------------------------------- 1 | using Eto; 2 | using Eto.Drawing; 3 | using Eto.Wpf; 4 | using Rhino.VisualStudio; 5 | using Rhino.VisualStudio.Windows; 6 | using Microsoft.VisualStudio.PlatformUI; 7 | 8 | [assembly: ExportHandler(typeof(IPlatformTheme), typeof(PlatformThemeHandler))] 9 | 10 | namespace Rhino.VisualStudio.Windows 11 | { 12 | class PlatformThemeHandler : IPlatformTheme 13 | { 14 | public Color ProjectBackground => VSColorTheme.GetThemedColor(ThemedDialogColors.WindowPanelColorKey).ToEto(); 15 | 16 | public Color ProjectForeground => VSColorTheme.GetThemedColor(ThemedDialogColors.WindowPanelTextColorKey).ToEto(); 17 | public Color ProjectDialogBackground => VSColorTheme.GetThemedColor(EnvironmentColors.NewProjectBackgroundColorKey).ToEto(); 18 | 19 | public Color ErrorForeground => VSColorTheme.GetThemedColor(ThemedDialogColors.ValidationErrorTextBrushKey).ToEto(); 20 | 21 | public Color SummaryBackground => VSColorTheme.GetThemedColor(ThemedDialogColors.WizardFooterColorKey).ToEto(); 22 | 23 | public Color SummaryForeground => VSColorTheme.GetThemedColor(ThemedDialogColors.WindowPanelTextColorKey).ToEto(); 24 | 25 | public Color DesignerBackground => VSColorTheme.GetThemedColor(EnvironmentColors.DesignerBackgroundColorKey).ToEto(); 26 | 27 | public Color DesignerPanel => Color.FromRgb(0xF0F0F0); // hmm. 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Rhino Visual Studio Extension")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Rhino Visual Studio Extension")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("8.16.2.0")] 33 | 34 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Services.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.ComponentModelHost; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using Microsoft.VisualStudio.Shell; 8 | using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; 9 | 10 | namespace Rhino.VisualStudio.Windows 11 | { 12 | static class Services 13 | { 14 | 15 | public static IOleServiceProvider ServiceProvider 16 | { 17 | get 18 | { 19 | ThreadHelper.ThrowIfNotOnUIThread(); 20 | return (IOleServiceProvider)Package.GetGlobalService(typeof(IOleServiceProvider)); 21 | } 22 | } 23 | 24 | static ServiceProvider vsServiceProvider; 25 | 26 | public static ServiceProvider VsServiceProvider 27 | { 28 | get 29 | { 30 | ThreadHelper.ThrowIfNotOnUIThread(); 31 | return vsServiceProvider ?? (vsServiceProvider = new ServiceProvider(ServiceProvider)); 32 | } 33 | } 34 | 35 | public static T GetService() 36 | where T : class 37 | { 38 | ThreadHelper.ThrowIfNotOnUIThread(); 39 | return VsServiceProvider.GetService(typeof(T)) as T; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CPPCommand/cmdMyCommand.cpp: -------------------------------------------------------------------------------- 1 | // cmd$fileinputname$.cpp 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | 7 | //////////////////////////////////////////////////////////////// 8 | //////////////////////////////////////////////////////////////// 9 | // 10 | // BEGIN $safefileinputname$ command 11 | // 12 | 13 | #pragma region $safefileinputname$ command 14 | 15 | class CCommand$safefileinputname$ : public CRhinoCommand 16 | { 17 | public: 18 | CCommand$safefileinputname$() = default; 19 | UUID CommandUUID() override 20 | { 21 | // {$guid1$} 22 | static const GUID $safefileinputname$Command_UUID = 23 | $guid1x$; 24 | return $safefileinputname$Command_UUID; 25 | } 26 | const wchar_t* EnglishCommandName() override { return L"$safefileinputname$"; } 27 | CRhinoCommand::result RunCommand(const CRhinoCommandContext& context) override; 28 | }; 29 | 30 | // The one and only CCommand$safefileinputname$ object 31 | static class CCommand$safefileinputname$ the$safefileinputname$Command; 32 | 33 | CRhinoCommand::result CCommand$safefileinputname$::RunCommand(const CRhinoCommandContext& context) 34 | { 35 | ON_wString str; 36 | str.Format( L"The \"%s\" command is under construction.\n", EnglishCommandName() ); 37 | if (context.IsInteractive()) 38 | RhinoMessageBox(str, EnglishCommandName(), MB_OK); 39 | else 40 | RhinoApp().Print(str); 41 | return CRhinoCommand::success; 42 | } 43 | 44 | #pragma endregion 45 | 46 | // 47 | // END $safefileinputname$ command 48 | // 49 | //////////////////////////////////////////////////////////////// 50 | //////////////////////////////////////////////////////////////// 51 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CPPCommand/command.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Empty Command for Rhino3D (C++) 5 | A new Rhino Command implemented in C++ 6 | 1 7 | 8 | Rhino.Plugin.File.CPP 9 | VC 10 | VC 11 | icon.ico 12 | MyRhinoCommand 13 | 14 | true 15 | 16 | 17 | cmdMyCommand.cpp 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 27 | Rhino.VisualStudio.Windows.Wizard.LegacyTemplateWizard 28 | 29 | 35 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CPPCommand/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CPPCommand/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSCommand/command.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Empty RhinoCommon Command for Rhino3D (C#) 5 | A new RhinoCommon Command implemented in C# 6 | 1 7 | 8 | Rhino.Plugin.File.CS 9 | CSharp 10 | CSharp + MultiTarget 11 | icon.ico 12 | MyRhinoCommand.cs 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 27 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 28 | 29 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSCommand/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSCommand/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSComponent/component.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Empty Grasshopper Component for Rhino3D (C#) 5 | A new Grasshopper Component implemented in C# 6 | 1 7 | 8 | Grasshopper.Component.File.CS 9 | CSharp 10 | CSharp + MultiTarget 11 | icon.ico 12 | MyComponent.cs 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 27 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 28 | 29 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSComponent/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSComponent/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSGrasshopper/grasshopper.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Grasshopper Assembly for Rhino3D (C#) 5 | Build Grasshopper components for Rhino3D in C# 6 | 1 7 | 8 | 20 9 | 10 | Grasshopper.Component.CS 11 | CSharp 12 | Windows 13 | macOS 14 | Desktop 15 | Rhino 16 | CSharp 17 | icon.ico 18 | MyGrasshopperAssembly 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.GrasshopperWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSGrasshopper/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSGrasshopper/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSGrasshopper2/grasshopper2.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Grasshopper2 Plug-In for Rhino3D (C#) 5 | Build Grasshopper2 components for Rhino3D in C# 6 | 1 7 | 8 | 20 9 | 10 | Grasshopper2.Component.CS 11 | CSharp 12 | Windows 13 | macOS 14 | Desktop 15 | Rhino 16 | CSharp 17 | icon.ico 18 | MyGrasshopper2PlugIn 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.Grasshopper2Wizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSGrasshopper2/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSGrasshopper2/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSRhino/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSRhino/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSRhino/rhino.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RhinoCommon Plug-In for Rhino3D (C#) 5 | Build plug-ins for Rhino3D with RhinoCommon in C# 6 | 1 7 | 8 | 20 9 | 10 | Rhino.Plugin.CS 11 | CSharp 12 | Windows 13 | macOS 14 | Desktop 15 | Rhino 16 | CSharp 17 | icon.ico 18 | MyRhinoPlugin 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.RhinoWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSRhinoTest/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSRhinoTest/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSRhinoTest/rhinotest.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RhinoCommon Tests for Rhino3D (C#) 5 | Build tests for Rhino3D Plug Ins with RhinoCommon in C# 6 | 1 7 | 8 | 21 9 | 10 | Rhino.Tests.CS 11 | CSharp 12 | Windows 13 | Desktop 14 | Rhino 15 | CSharp 16 | icon.ico 17 | MyRhinoTests 18 | 19 | true 20 | true 21 | Enabled 22 | true 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 36 | Rhino.VisualStudio.Windows.Wizard.RhinoTestWizard 37 | 38 | 39 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 40 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 41 | 42 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSZooPlugin/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CSZooPlugin/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CSZooPlugin/zooplugin.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Zoo Plug-In for Rhino3D (C#) 5 | A C# project to build a Rhino Zoo plugin. 6 | 7 | This requires Zoo 7.0 to be installed on your machine. 8 | Also, remember to copy the ID from your Rhino plug-in before continuing. 9 | 20 10 | 11 | Rhino.ZooPlugin.CS 12 | CSharp 13 | Windows 14 | Desktop 15 | Rhino 16 | CSharp 17 | icon.ico 18 | MyZooPlugin 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.ZooPluginWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CppRhino/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CppRhino/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CppRhino/rhino.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rhino3D Plug-In (C++) 5 | Build plug-ins for Rhino3D using the C++ SDK 6 | 1 7 | 8 | 20 9 | 10 | Rhino.Plugin.CPP 11 | VC 12 | Windows 13 | Desktop 14 | Rhino 15 | cpp 16 | icon.ico 17 | MyRhinoPlugin 18 | 19 | true 20 | true 21 | Enabled 22 | true 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 36 | Rhino.VisualStudio.Windows.Wizard.CppRhinoWizard 37 | 38 | 39 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 40 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 41 | 42 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CppSkin/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/CppSkin/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/CppSkin/skin.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rhino3D Skin (C++) 5 | Build skin DLLs for Rhino3D using the C++ SDK 6 | 1 7 | 8 | 20 9 | 10 | Rhino.Skin.CPP 11 | VC 12 | Windows 13 | Desktop 14 | Rhino 15 | cpp 16 | icon.ico 17 | MyRhinoSkin 18 | 19 | true 20 | true 21 | Enabled 22 | true 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 36 | Rhino.VisualStudio.Windows.Wizard.CppSkinWizard 37 | 38 | 39 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 40 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 41 | 42 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBCommand/command.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Empty RhinoCommon Command for Rhino3D (VB) 5 | A new RhinoCommon Command implemented in VB 6 | 1 7 | 8 | Rhino.Plugin.File.VB 9 | VisualBasic 10 | VisualBasic + MultiTarget 11 | icon.ico 12 | MyRhinoCommand.vb 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 27 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 28 | 29 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBCommand/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/VBCommand/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBComponent/component.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Empty Grasshopper Component for Rhino3D (VB) 5 | A new Grasshopper Component implemented in VB 6 | 1 7 | 8 | Grasshopper.Component.File.VB 9 | VisualBasic 10 | VisualBasic + MultiTarget 11 | icon.ico 12 | MyComponent.vb 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 27 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 28 | 29 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBComponent/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/VBComponent/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBGrasshopper/grasshopper.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Grasshopper Assembly for Rhino3D (VB) 5 | Build Grasshopper components for Rhino3D in VB.NET 6 | 1 7 | 8 | 20 9 | 10 | Grasshopper.Component.VB 11 | VisualBasic 12 | Windows 13 | macOS 14 | Desktop 15 | Rhino 16 | VisualBasic 17 | icon.ico 18 | MyGrasshopperAddOn 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.GrasshopperWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBGrasshopper/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/VBGrasshopper/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBRhino/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/VBRhino/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBRhino/rhino.vstemplate: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | RhinoCommon Plug-In for Rhino3D (VB) 5 | Build plug-ins for Rhino3D with RhinoCommon in VB.NET 6 | 1 7 | 8 | 20 9 | 10 | Rhino.Plugin.VB 11 | VisualBasic 12 | Windows 13 | macOS 14 | Desktop 15 | Rhino 16 | VisualBasic 17 | icon.ico 18 | MyRhinoPlugin 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.RhinoWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBZooPlugin/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/Templates/VBZooPlugin/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Templates/VBZooPlugin/zooplugin.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Zoo Plug-In for Rhino3D (VB) 5 | A VB project to build a Rhino Zoo plugin. 6 | 7 | This requires Zoo 7.0 to be installed on your machine. 8 | Also, remember to copy the ID from your Rhino plug-in before continuing. 9 | 20 10 | 11 | Rhino.ZooPlugin.VB 12 | VisualBasic 13 | Windows 14 | Desktop 15 | Rhino 16 | VisualBasic 17 | icon.ico 18 | MyZooPlugin 19 | 20 | true 21 | true 22 | Enabled 23 | true 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Rhino.VisualStudio.Windows, Version=8.16.2.0, Culture=neutral, PublicKeyToken=null 37 | Rhino.VisualStudio.Windows.Wizard.ZooPluginWizard 38 | 39 | 40 | Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 41 | Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard 42 | 43 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/CppRhinoWizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class CppRhinoWizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new CppRhinoPluginOptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new CppRhinoPluginOptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/CppSkinWizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class CppSkinWizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new CppRhinoSkinOptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new CppRhinoSkinOptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/Grasshopper2Wizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class Grasshopper2Wizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new Grasshopper2OptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new Grasshopper2OptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/GrasshopperWizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class GrasshopperWizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new GrasshopperOptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new GrasshopperOptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/LegacyTemplateWizard.cs: -------------------------------------------------------------------------------- 1 | using EnvDTE; 2 | using Microsoft.VisualStudio.TemplateWizard; 3 | using stdole; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace Rhino.VisualStudio.Windows.Wizard 11 | { 12 | public class LegacyTemplateWizard : IWizard 13 | { 14 | public void BeforeOpeningFile(ProjectItem projectItem) 15 | { 16 | } 17 | 18 | public void ProjectFinishedGenerating(Project project) 19 | { 20 | } 21 | 22 | public void ProjectItemFinishedGenerating(ProjectItem projectItem) 23 | { 24 | } 25 | 26 | public void RunFinished() 27 | { 28 | } 29 | 30 | public void RunStarted(object automationObject, Dictionary replacementsDictionary, WizardRunKind runKind, object[] customParams) 31 | { 32 | if (replacementsDictionary.TryGetValue("$safeitemname$", out var fileinputname)) 33 | { 34 | replacementsDictionary["$safefileinputname$"] = fileinputname; 35 | } 36 | 37 | for (int i = 1; i <= 10; i++) 38 | { 39 | if (!replacementsDictionary.TryGetValue($"$guid{i}$", out var guidString)) 40 | continue; 41 | 42 | var guid = Guid.Parse(guidString); 43 | replacementsDictionary[$"$guid{i}x$"] = guid.ToString("X"); 44 | } 45 | } 46 | 47 | public bool ShouldAddProjectItem(string filePath) => true; 48 | } 49 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/RhinoTestWizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class RhinoTestWizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new RhinoTestingOptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new RhinoTestingOptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/RhinoWizard.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio.Windows.Wizard 4 | { 5 | public class RhinoWizard : EtoWizard 6 | { 7 | protected override Control CreatePanel() => new RhinoCommonOptionsPanel(false); 8 | 9 | protected override BaseWizardViewModel CreateViewModel() => new RhinoCommonOptionsViewModel(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/WizardHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.VisualStudio.TemplateWizard; 5 | 6 | namespace Rhino.VisualStudio.Windows.Wizard 7 | { 8 | class WizardHost : IWizardHost 9 | { 10 | Dictionary _replacementsDictionary; 11 | 12 | const string ParametersPrefix = "$passthrough:"; 13 | 14 | static WizardHost() 15 | { 16 | EtoInitializer.Initialize(); 17 | } 18 | 19 | public WizardHost(Dictionary replacementsDictionary) 20 | { 21 | _replacementsDictionary = replacementsDictionary; 22 | } 23 | 24 | public void Abort() 25 | { 26 | throw new WizardBackoutException("User cancelled the wizard"); 27 | } 28 | 29 | public void Continue() 30 | { 31 | 32 | } 33 | 34 | public string GetParameter(string name) 35 | { 36 | string value; 37 | if ( 38 | _replacementsDictionary.TryGetValue("$" + name + "$", out value) 39 | || _replacementsDictionary.TryGetValue("$root." + name + "$", out value) 40 | || _replacementsDictionary.TryGetValue(ParametersPrefix + name + "$", out value) 41 | || _replacementsDictionary.TryGetValue("$root." + (ParametersPrefix + name).TrimStart('$') + "$", out value) 42 | ) 43 | return value; 44 | return null; 45 | } 46 | 47 | public bool IsSupportedParameter(string name) 48 | { 49 | if (!_replacementsDictionary.TryGetValue("SupportedParameters", out var supportedParameterString)) 50 | return false; 51 | var parameters = supportedParameterString.Split(';'); 52 | 53 | return parameters.Any(r => string.Equals(r, name, StringComparison.OrdinalIgnoreCase)); 54 | } 55 | 56 | public void SetParameter(string name, string value) 57 | { 58 | _replacementsDictionary[ParametersPrefix + name.Trim('$') + "$"] = value; 59 | } 60 | 61 | } 62 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/Wizard/ZooPluginWizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Eto.Forms; 3 | 4 | namespace Rhino.VisualStudio.Windows.Wizard 5 | { 6 | public class ZooPluginWizard : EtoWizard 7 | { 8 | protected override Control CreatePanel() => new ZooPluginOptionsPanel(false); 9 | 10 | protected override BaseWizardViewModel CreateViewModel() => new ZooPluginOptionsViewModel(); 11 | } 12 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/icon.ico -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/license.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang3082\deflangfe3082\deftab708{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}} 2 | {\*\generator Riched20 6.2.9200}\viewkind4\uc1 3 | \pard\sa200\sl276\slmult1\f0\fs22\lang1033 Copyright (c) 2013-2023 Robert McNeel & Associates. All Rights Reserved.\par 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.\par 5 | THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.\par 6 | Rhino is a registered trademark of Robert McNeel & Associates.\par 7 | } 8 | -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/rhino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/Rhino.VisualStudio.Windows/rhino.png -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/template.pkgdef: -------------------------------------------------------------------------------- 1 | [$RootKey$\TemplateEngine\Templates\Rhino] 2 | "InstalledPath"="$PackageFolder$" -------------------------------------------------------------------------------- /Rhino.VisualStudio.Windows/themes/Common.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseCppRhinoOptionsPageView.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | 3 | namespace Rhino.VisualStudio 4 | { 5 | public abstract class BaseCppRhinoOptionsPageView : BaseRhinoPageView 6 | { 7 | protected virtual void AddCPPSdkDownloadInfo(DynamicLayout information) 8 | { 9 | // Link to download the Rhino SDK 10 | var rhinoSdkDownloadLabel = new Label { TextAlignment = TextAlignment.Center }; 11 | rhinoSdkDownloadLabel.BindDataContext(c => c.Text, 12 | Binding.Property((CppRhinoSkinOptionsViewModel m) => m.RhinoVersion) 13 | .Convert(v => v > 0 ? $"This project requires the\nC++ SDK for Rhino {v} to be installed." : "This project requires the Rhino C++ SDK to be installed.")); 14 | var rhinoSdkDownload = new LinkButton { Text = "Click here to download the C++ SDK" }; 15 | rhinoSdkDownload.Click += (sender, e) => 16 | { 17 | var version = ((CppRhinoSkinOptionsViewModel)DataContext).RhinoVersion; 18 | if (version == 0) 19 | version = Global.LatestSdkRelease; 20 | Application.Instance.Open($"https://www.rhino3d.com/download/Rhino-SDK/{version}.0/latest/"); 21 | }; 22 | 23 | var rhinoSdkInfo = new TableLayout( 24 | rhinoSdkDownloadLabel, 25 | TableLayout.AutoSized(rhinoSdkDownload, centered: true) 26 | ); 27 | 28 | rhinoSdkInfo.BindDataContext(c => c.Visible, Binding.Property((CppRhinoSkinOptionsViewModel m) => m.IsSdkPathValid).Convert(v => !v)); 29 | information.Add(rhinoSdkInfo); 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseCppRhinoOptionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Runtime.CompilerServices; 3 | using Microsoft.Win32; 4 | 5 | namespace Rhino.VisualStudio 6 | { 7 | public abstract class BaseCppRhinoOptionsViewModel : BaseRhinoOptionsViewModel 8 | { 9 | public override bool IsRhinoVersionValid => base.IsRhinoVersionValid && IsSdkPathValid; 10 | public override string RhinoVersionValidationText 11 | { 12 | get 13 | { 14 | var version = RhinoVersion; 15 | var msg = version > 0 16 | ? $"The C++ SDK for Rhino {RhinoVersion} is not installed." 17 | : $"The Rhino C++ SDK is not installed."; 18 | var basemsg = base.RhinoVersionValidationText; 19 | if (basemsg != null) return string.Join("\n", basemsg, msg); 20 | return msg; 21 | } 22 | } 23 | 24 | public bool IsSdkPathValid => !string.IsNullOrEmpty(GetSdkPath(RhinoVersion)); 25 | public string GetSdkPath(int version) 26 | { 27 | var localKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64); 28 | using var key = localKey.OpenSubKey($@"SOFTWARE\McNeel\Rhinoceros\SDK\{version}.0"); 29 | if (key != null) 30 | { 31 | var path = key.GetValue("InstallPath") as string; 32 | if (path != null && Directory.Exists(path)) 33 | return path; 34 | } 35 | return null; 36 | } 37 | 38 | protected override void OnPropertyChanged([CallerMemberName] string propertyName = null) 39 | { 40 | base.OnPropertyChanged(propertyName); 41 | if (propertyName == nameof(RhinoVersion)) 42 | { 43 | OnPropertyChanged(nameof(IsSdkPathValid)); 44 | } 45 | } 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseDesktopWizardViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Rhino.VisualStudio 2 | { 3 | public abstract class BaseDesktopWizardViewModel : BaseLocationWizardViewModel 4 | { 5 | public bool ShowWindowsDesktop => Host.IsSupportedParameter("WindowsDesktop"); 6 | public bool SupportsYak => Host.IsSupportedParameter("Yak"); 7 | public bool SupportsVSCode => Host.IsSupportedParameter("VSCode"); 8 | 9 | bool _useWpf; 10 | public bool UseWpf 11 | { 12 | get => _useWpf; 13 | set => Set(ref _useWpf, value); 14 | } 15 | 16 | bool _useWinForms; 17 | public bool UseWinForms 18 | { 19 | get => _useWinForms; 20 | set => Set(ref _useWinForms, value); 21 | } 22 | 23 | bool _buildYak; 24 | public bool BuildYak 25 | { 26 | get => _buildYak; 27 | set => Set(ref _buildYak, value); 28 | } 29 | 30 | bool _includeVSCode = true; 31 | public bool IncludeVSCode 32 | { 33 | get => _includeVSCode; 34 | set => Set(ref _includeVSCode, value); 35 | } 36 | 37 | public override void Finish() 38 | { 39 | base.Finish(); 40 | if (Host == null) 41 | return; 42 | 43 | if (ShowWindowsDesktop) 44 | { 45 | Host.SetParameter("UseWpf", UseWpf.ToString()); 46 | Host.SetParameter("UseWinForms", UseWinForms.ToString()); 47 | } 48 | 49 | if (SupportsYak) 50 | { 51 | Host.SetParameter("BuildYak", BuildYak.ToString()); 52 | } 53 | if (SupportsVSCode) 54 | { 55 | Host.SetParameter("IncludeVSCode", IncludeVSCode.ToString()); 56 | } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseDialog.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using Eto.Forms; 3 | 4 | namespace Rhino.VisualStudio 5 | { 6 | public class BaseDialog : Dialog 7 | { 8 | Panel content; 9 | public new Control Content 10 | { 11 | get { return content.Content; } 12 | set { content.Content = value; } 13 | } 14 | 15 | public BaseDialog() 16 | { 17 | //ClientSize = new Size(800, 400); 18 | Style = "rhino.themed"; 19 | Resizable = true; 20 | BackgroundColor = Global.Theme.ProjectDialogBackground; 21 | 22 | content = new Panel(); 23 | 24 | AbortButton = new Button { Text = "C&ancel" }; 25 | AbortButton.Click += (sender, e) => Close(false); 26 | 27 | DefaultButton = new Button { Text = "Finish" }; 28 | DefaultButton.Click += (sender, e) => Close(true); 29 | DefaultButton.BindDataContext(c => c.Enabled, (BaseWizardViewModel m) => m.IsValid); 30 | 31 | var buttons = new StackLayout 32 | { 33 | Orientation = Orientation.Horizontal, 34 | Spacing = 5, 35 | Padding = new Padding(10), 36 | Items = 37 | { 38 | null, 39 | AbortButton, 40 | DefaultButton 41 | } 42 | }; 43 | 44 | base.Content = new StackLayout 45 | { 46 | HorizontalContentAlignment = HorizontalAlignment.Stretch, 47 | Items = 48 | { 49 | new StackLayoutItem(content, true), 50 | buttons 51 | } 52 | }; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Rhino.VisualStudio/BasePageView.cs: -------------------------------------------------------------------------------- 1 | using Eto.Drawing; 2 | using Eto.Forms; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace Rhino.VisualStudio 10 | { 11 | public class BasePageView : Panel 12 | { 13 | Scrollable content = new Scrollable { Border = BorderType.None }; 14 | Panel information = new Panel(); 15 | 16 | public new Control Content 17 | { 18 | get { return content.Content; } 19 | set { content.Content = value; } 20 | } 21 | 22 | public Control Information 23 | { 24 | get { return information.Content; } 25 | set { information.Content = value; } 26 | } 27 | 28 | public BasePageView() 29 | { 30 | if (Platform.IsWpf) 31 | { 32 | BackgroundColor = Global.Theme.ProjectBackground; 33 | MinimumSize = new Size(700, 400); 34 | } 35 | 36 | content.Padding = new Padding(50, 10, 20, 10); 37 | 38 | base.Content = new StackLayout 39 | { 40 | Orientation = Orientation.Horizontal, 41 | VerticalContentAlignment = VerticalAlignment.Stretch, 42 | Items = 43 | { 44 | new StackLayoutItem(content, VerticalAlignment.Center, expand: true), 45 | new Panel { BackgroundColor = Global.Theme.SummaryBackground, Size = new Size(280, 200), Content = information, Padding = new Padding(20) } 46 | } 47 | }; 48 | } 49 | 50 | protected override void OnKeyUp(KeyEventArgs e) 51 | { 52 | if (e.KeyData == Keys.Enter) 53 | { 54 | if (DataContext is BaseWizardViewModel m) 55 | { 56 | m.Continue(); 57 | e.Handled = true; 58 | } 59 | } 60 | if (e.KeyData == Keys.Escape) 61 | { 62 | if (DataContext is BaseWizardViewModel m) 63 | { 64 | m.Abort(); 65 | e.Handled = true; 66 | } 67 | } 68 | base.OnKeyUp(e); 69 | } 70 | 71 | 72 | 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | using System.Collections.Generic; 4 | 5 | namespace Rhino.VisualStudio 6 | { 7 | public class BaseViewModel : INotifyPropertyChanged 8 | { 9 | public event PropertyChangedEventHandler PropertyChanged; 10 | 11 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 12 | { 13 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 14 | } 15 | 16 | protected bool Set(ref T property, T value, [CallerMemberName] string propertyName = null) 17 | { 18 | if (EqualityComparer.Default.Equals(property, value)) 19 | return false; 20 | 21 | property = value; 22 | OnPropertyChanged(propertyName); 23 | return true; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/BaseWizardViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | namespace Rhino.VisualStudio 4 | { 5 | public abstract class BaseWizardViewModel : BaseViewModel 6 | { 7 | public IWizardHost Host { get; set; } 8 | 9 | public abstract bool IsValid { get; } 10 | 11 | public abstract string ProjectName { get; set; } 12 | 13 | public virtual bool IsProjectNameInvalid => !Utility.IsValidProjectName(ProjectName); 14 | 15 | public virtual string ProjectNameValidationText => "Project name must only be a combination of letters, digits, or one of '_', '-', '.'"; 16 | 17 | public virtual string ProjectTitle => string.Empty; 18 | 19 | public virtual void Continue() 20 | { 21 | if (IsValid) 22 | Host?.Continue(); 23 | } 24 | 25 | public virtual void Abort() 26 | { 27 | Host?.Abort(); 28 | } 29 | 30 | public virtual void Finish() 31 | { 32 | } 33 | 34 | } 35 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace Rhino.VisualStudio 2 | { 3 | public static class Constants 4 | { 5 | public const int DefaultRhinoVersion = 7; 6 | } 7 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/CppRhinoPluginOptionsViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Rhino.VisualStudio 2 | { 3 | 4 | public class CppRhinoPluginOptionsViewModel : BaseCppRhinoOptionsViewModel 5 | { 6 | public override string ProjectTitle => "New Rhino C++ Plug-In"; 7 | 8 | string _commandName; 9 | public string CommandName 10 | { 11 | get => _commandName ?? Utility.GetSafeNamePrefixSuffix(ProjectName, null, null, "PlugIn", "Command"); 12 | set 13 | { 14 | if (Set(ref _commandName, value)) 15 | { 16 | OnPropertyChanged(nameof(IsValid)); 17 | } 18 | } 19 | } 20 | 21 | string _projectName; 22 | public override string ProjectName 23 | { 24 | get => _projectName ?? string.Empty; 25 | set 26 | { 27 | if (Set(ref _projectName, value)) 28 | { 29 | OnPropertyChanged(nameof(CommandName)); 30 | OnPropertyChanged(nameof(IsValid)); 31 | OnPropertyChanged(nameof(IsProjectNameInvalid)); 32 | } 33 | } 34 | } 35 | 36 | bool _useSDL = true; 37 | public bool UseSDL 38 | { 39 | get => _useSDL; 40 | set => Set(ref _useSDL, value); 41 | } 42 | 43 | bool _useAutomation; 44 | public bool UseAutomation 45 | { 46 | get => _useAutomation; 47 | set => Set(ref _useAutomation, value); 48 | } 49 | 50 | bool _useSockets; 51 | public bool UseSockets 52 | { 53 | get => _useSockets; 54 | set => Set(ref _useSockets, value); 55 | } 56 | 57 | public CppRhinoPluginOptionsViewModel() 58 | { 59 | } 60 | 61 | public override bool IsValid => 62 | !IsProjectNameInvalid 63 | && Utility.IsValidIdentifier(CommandName) 64 | && !IsLocationInvalid 65 | && IsRhinoVersionValid; 66 | 67 | public override void Finish() 68 | { 69 | base.Finish(); 70 | if (Host == null) 71 | return; 72 | 73 | Host.SetParameter("CommandName", CommandName); 74 | Host.SetParameter("Automation", UseAutomation.ToString()); 75 | Host.SetParameter("Sockets", UseSockets.ToString()); 76 | Host.SetParameter("SDL", UseSDL.ToString()); 77 | } 78 | 79 | } 80 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/CppRhinoSkinOptionsPanel.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using Eto.Drawing; 3 | using System; 4 | using System.Linq; 5 | using Rhino.VisualStudio.Controls; 6 | 7 | namespace Rhino.VisualStudio 8 | { 9 | public class CppRhinoSkinOptionsPanel : BaseCppRhinoOptionsPageView 10 | { 11 | public CppRhinoSkinOptionsPanel(bool showProjectName) 12 | { 13 | var useCustomMenusCheckBox = new CheckBox { Text = "Custom Menus", ToolTip = "Enables support for custom menus." }; 14 | useCustomMenusCheckBox.CheckedBinding.BindDataContext((CppRhinoSkinOptionsViewModel m) => m.UseCustomMenus); 15 | 16 | var useSDLCheckBox = new CheckBox { Text = "Security Development Lifecycle (SDL) checks", ToolTip = "Enable additional Security Development Lifecycle (SDL) checks." }; 17 | useSDLCheckBox.CheckedBinding.BindDataContext((CppRhinoSkinOptionsViewModel m) => m.UseSDL); 18 | 19 | 20 | // layout 21 | var layout = new DynamicLayout { DefaultSpacing = DefaultSpacing, Padding = DefaultPadding }; 22 | 23 | // top 24 | layout.BeginVertical(); 25 | if (showProjectName) 26 | { 27 | AddProjectName(layout); 28 | } 29 | layout.EndVertical(); 30 | 31 | layout.BeginVertical(); 32 | layout.Add(new PanelSeparator("Options")); 33 | 34 | AddRhinoVersion(layout); 35 | 36 | layout.Add(useCustomMenusCheckBox); 37 | layout.Add(useSDLCheckBox); 38 | 39 | Content = layout; 40 | 41 | var information = new DynamicLayout(); 42 | information.AddSpace(); 43 | AddRhinoDownloadInfo(information); 44 | 45 | AddCPPSdkDownloadInfo(information); 46 | 47 | information.AddSpace(); 48 | 49 | Information = information; 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/CppRhinoSkinOptionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Runtime.CompilerServices; 3 | using Microsoft.Win32; 4 | 5 | namespace Rhino.VisualStudio 6 | { 7 | public class CppRhinoSkinOptionsViewModel : BaseCppRhinoOptionsViewModel 8 | { 9 | public override string ProjectTitle => "New Rhino C++ Skin"; 10 | 11 | string _projectName; 12 | public override string ProjectName 13 | { 14 | get => _projectName ?? string.Empty; 15 | set 16 | { 17 | if (Set(ref _projectName, value)) 18 | { 19 | OnPropertyChanged(nameof(IsValid)); 20 | OnPropertyChanged(nameof(IsProjectNameInvalid)); 21 | } 22 | } 23 | } 24 | 25 | bool _useSDL = true; 26 | public bool UseSDL 27 | { 28 | get => _useSDL; 29 | set => Set(ref _useSDL, value); 30 | } 31 | 32 | bool _useCustomMenus = true; 33 | public bool UseCustomMenus 34 | { 35 | get => _useCustomMenus; 36 | set => Set(ref _useCustomMenus, value); 37 | } 38 | 39 | public override bool IsValid => 40 | !IsProjectNameInvalid 41 | && !IsLocationInvalid 42 | && IsRhinoVersionValid; 43 | 44 | public override void Finish() 45 | { 46 | base.Finish(); 47 | if (Host == null) 48 | return; 49 | 50 | Host.SetParameter("CustomMenus", UseCustomMenus.ToString()); 51 | Host.SetParameter("SDL", UseSDL.ToString()); 52 | } 53 | 54 | } 55 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/IPlatformTheme.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Eto; 3 | using Eto.Drawing; 4 | 5 | namespace Rhino.VisualStudio 6 | { 7 | public interface IPlatformTheme 8 | { 9 | Color ProjectBackground { get; } 10 | Color ProjectForeground { get; } 11 | Color ProjectDialogBackground { get; } 12 | Color ErrorForeground { get; } 13 | Color SummaryBackground { get; } 14 | Color SummaryForeground { get; } 15 | Color DesignerBackground { get; } 16 | Color DesignerPanel { get; } 17 | } 18 | 19 | public interface IPlatformHelpers 20 | { 21 | string FindRhino(int version); 22 | } 23 | 24 | public static class Global 25 | { 26 | public static IPlatformTheme Theme => Platform.Instance.CreateShared(); 27 | 28 | public static IPlatformHelpers Helpers => Platform.Instance.CreateShared(); 29 | 30 | public static int LatestSdkRelease { get; internal set; } = 7; 31 | public static readonly int[] VersionsToCheck = { 8, 7, 6 }; 32 | } 33 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/IWizardHost.cs: -------------------------------------------------------------------------------- 1 | namespace Rhino.VisualStudio 2 | { 3 | public interface IWizardHost 4 | { 5 | bool IsSupportedParameter(string name); 6 | string GetParameter(string name); 7 | void SetParameter(string name, string value); 8 | void Abort(); 9 | void Continue(); 10 | } 11 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/Rhino.VisualStudio.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0;net47 5 | net7.0;net47 6 | 8.0 7 | 8 | 9 | 10 | false 11 | ..\build\rhinocommonsignature.snk 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Rhino.VisualStudio/RhinoCommonOptionsPanel.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using Eto.Drawing; 3 | using System; 4 | using Rhino.VisualStudio.Controls; 5 | 6 | namespace Rhino.VisualStudio 7 | { 8 | public class RhinoCommonOptionsPanel : BaseRhinoPageView 9 | { 10 | public RhinoCommonOptionsPanel(bool showProjectName) 11 | { 12 | var padding = new Padding(8); 13 | 14 | var pluginClassNameTextBox = new TextBox(); 15 | pluginClassNameTextBox.TextBinding.BindDataContext((RhinoCommonOptionsViewModel m) => m.PluginClassName); 16 | 17 | var commandClassNameTextBox = new TextBox(); 18 | commandClassNameTextBox.TextBinding.BindDataContext((RhinoCommonOptionsViewModel m) => m.CommandClassName); 19 | 20 | var provideCommandSampleCheckBox = new CheckBox { Text = "Provide command sample", ToolTip = "Check to provide a sample implementation for the command" }; 21 | provideCommandSampleCheckBox.CheckedBinding.BindDataContext((RhinoCommonOptionsViewModel m) => m.IncludeSample); 22 | provideCommandSampleCheckBox.BindDataContext(c => c.Enabled, (RhinoCommonOptionsViewModel m) => m.CanProvideSample); 23 | 24 | 25 | Styles.Add(null, g => g.Padding = padding); 26 | 27 | // layout 28 | var layout = new DynamicLayout { DefaultSpacing = DefaultSpacing, Padding = padding }; 29 | 30 | // top 31 | layout.BeginVertical(); 32 | if (showProjectName) 33 | { 34 | AddProjectName(layout); 35 | } 36 | layout.AddRow("Plug-in class name", pluginClassNameTextBox); 37 | layout.AddRow("Command class name", commandClassNameTextBox); 38 | layout.EndVertical(); 39 | 40 | AddPluginType(layout); 41 | 42 | layout.BeginVertical(); 43 | layout.Add(new PanelSeparator("Options")); 44 | 45 | AddRhinoVersion(layout); 46 | AddBuildYakPackage(layout); 47 | AddIncludeVSCode(layout); 48 | layout.Add(provideCommandSampleCheckBox); 49 | 50 | AddFileOptions(layout); 51 | layout.EndVertical(); 52 | 53 | 54 | AddWindowsUI(layout); 55 | 56 | // AddRhinoLocation(layout); 57 | 58 | Content = layout; 59 | 60 | var information = new DynamicLayout(); 61 | information.AddSpace(); 62 | AddRhinoDownloadInfo(information); 63 | information.AddSpace(); 64 | 65 | Information = information; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/RhinoTestingOptionsPanel.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using Eto.Drawing; 3 | using System; 4 | using Rhino.VisualStudio.Controls; 5 | 6 | namespace Rhino.VisualStudio 7 | { 8 | public class RhinoTestingOptionsPanel : BaseRhinoPageView 9 | { 10 | public RhinoTestingOptionsPanel(bool showProjectName) 11 | { 12 | var padding = new Padding(8); 13 | 14 | InitLayout(showProjectName); 15 | 16 | var information = new DynamicLayout(); 17 | information.AddSpace(); 18 | AddRhinoDownloadInfo(information); 19 | information.AddSpace(); 20 | 21 | Information = information; 22 | } 23 | 24 | private void InitLayout(bool showProjectName) 25 | { 26 | var testClassNameTextBox = new TextBox(); 27 | testClassNameTextBox.TextBinding.BindDataContext((RhinoTestingOptionsViewModel m) => m.TestClassName); 28 | 29 | var provideCommandSampleCheckBox = new CheckBox { Text = "Provide test sample", ToolTip = "Check to provide a sample test implementation" }; 30 | provideCommandSampleCheckBox.CheckedBinding.BindDataContext((RhinoTestingOptionsViewModel m) => m.IncludeSample); 31 | provideCommandSampleCheckBox.BindDataContext(c => c.Enabled, (RhinoTestingOptionsViewModel m) => m.CanProvideSample); 32 | 33 | Styles.Add(null, g => g.Padding = this.Padding); 34 | 35 | // layout 36 | var layout = new DynamicLayout { DefaultSpacing = DefaultSpacing, Padding = this.Padding }; 37 | 38 | // top 39 | layout.BeginVertical(); 40 | 41 | if (showProjectName) 42 | AddProjectName(layout); 43 | 44 | layout.AddRow("Test class name", testClassNameTextBox); 45 | layout.EndVertical(); 46 | 47 | layout.BeginVertical(); 48 | layout.Add(new PanelSeparator("Options")); 49 | 50 | AddRhinoVersion(layout); 51 | 52 | AddIncludeVSCode(layout); 53 | 54 | layout.Add(provideCommandSampleCheckBox); 55 | layout.EndVertical(); 56 | 57 | Content = layout; 58 | } 59 | 60 | } 61 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/RhinoTestingOptionsViewModel.cs: -------------------------------------------------------------------------------- 1 | using Eto.Forms; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.CompilerServices; 5 | 6 | namespace Rhino.VisualStudio 7 | { 8 | public class RhinoTestingOptionsViewModel : BaseRhinoOptionsViewModel 9 | { 10 | 11 | public override string ProjectTitle => "New RhinoCommon .NET Tests"; 12 | 13 | string _testClassName; 14 | public string TestClassName 15 | { 16 | get => _testClassName ?? Utility.GetSafeName(ProjectName, "Test", "Plugin", "Addin", "Tests"); 17 | set 18 | { 19 | if (Set(ref _testClassName, value)) 20 | { 21 | OnPropertyChanged(nameof(IsValid)); 22 | } 23 | } 24 | } 25 | 26 | string _projectName; 27 | public override string ProjectName 28 | { 29 | get => _projectName ?? string.Empty; 30 | set 31 | { 32 | if (Set(ref _projectName, value)) 33 | { 34 | OnPropertyChanged(nameof(TestClassName)); 35 | OnPropertyChanged(nameof(IsValid)); 36 | OnPropertyChanged(nameof(IsProjectNameInvalid)); 37 | } 38 | } 39 | } 40 | 41 | public override IEnumerable RhinoVersionsAvailable 42 | { 43 | get 44 | { 45 | // Ensures Versionis are > 7 46 | foreach (int version in Global.VersionsToCheck.Where(v => v > 7)) 47 | { 48 | if (!string.IsNullOrEmpty(FindLocation(version))) 49 | { 50 | yield return version; 51 | } 52 | } 53 | } 54 | } 55 | 56 | 57 | 58 | public RhinoTestingOptionsViewModel() 59 | { 60 | } 61 | 62 | 63 | public override bool IsValid => 64 | !IsProjectNameInvalid 65 | && Utility.IsValidIdentifier(TestClassName) 66 | && !IsLocationInvalid 67 | && IsRhinoVersionValid; 68 | 69 | public override void Finish() 70 | { 71 | base.Finish(); 72 | if (Host == null) 73 | return; 74 | 75 | Host.SetParameter("TestClassName", TestClassName); 76 | } 77 | 78 | protected override string FindLocation(int version) => Global.Helpers.FindRhino(version); 79 | } 80 | } -------------------------------------------------------------------------------- /Rhino.VisualStudio/ZooFinder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace Rhino.VisualStudio 5 | { 6 | public static class ZooFinder 7 | { 8 | const string ZOO_DIR = "Zoo "; 9 | const string ZOO_DLL = "ZooPlugin.dll"; 10 | 11 | public static string FindZooDll(int version) 12 | { 13 | string prog_folder = Environment.GetFolderPath(Environment.Is64BitOperatingSystem ? 14 | Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles); 15 | 16 | if (!Directory.Exists(prog_folder)) 17 | throw new InvalidOperationException("The program files folder could not be found."); 18 | 19 | var path = Path.Combine(prog_folder, ZOO_DIR + version); 20 | 21 | if (!Directory.Exists(path)) 22 | return null; 23 | // throw new InvalidOperationException( 24 | // string.Format("No zoo directory:\n{0}", path)); 25 | 26 | var final_location = Path.Combine(path, ZOO_DLL); 27 | 28 | //if (!File.Exists(final_location)) 29 | // throw new InvalidOperationException( 30 | // $"The Zoo {version}.0 folder was found in {path}\nbut the file \"{ZOO_DLL}\" was not present."); 31 | 32 | return final_location; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /build/rhinocommonsignature.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcneel/RhinoVisualStudioExtensions/d23c10b0e0658d69b36059c19604dfcda7065524/build/rhinocommonsignature.snk -------------------------------------------------------------------------------- /dotnet-workloads.json: -------------------------------------------------------------------------------- 1 | { 2 | "microsoft.net.sdk.macos": "13.1.2054" 3 | } -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | // "version": "5.0.400", // required for VS 2019 4 | // "version": "7.0.100", // required to build on Mac 5 | "version": "8.0.100", // required to build on Mac 6 | "rollForward": "latestFeature" 7 | } 8 | } -------------------------------------------------------------------------------- /marketplace description.md: -------------------------------------------------------------------------------- 1 | # RhinoCommon and Grasshopper template wizards for [Rhino3D](https://www.rhino3d.com) 2 | 3 | ## RhinoCommon templates 4 | 5 | * **RhinoCommon Plugin** - Provides a project with a PlugIn-derived class and a Command-derived class. 6 | * **RhinoCommon Command** - Adds a single command class item. 7 | 8 | * **Zoo Plug-ins** - Adds a single project with a Zoo plug-in (requires Zoo to be installed). 9 | 10 | To load the resulting .rhp file, open Rhino. Explore to the _bin/_ output folder in the solution. Then, drag-and-drop that file onto Rhino. 11 | 12 | ## Grasshopper templates 13 | 14 | * **Grasshopper Assembly** - Provides a project with a GH_Component-derived class and a GH_AssemblyInfo-derived class. 15 | * **Grasshopper Component** - Adds a single component class item. 16 | 17 | Download the Grasshopper SDK with the Rhino `_GrasshopperGetSDKDocumentation` command, or obtain the .chm file from the Related links section below here. 18 | 19 | In order to load the result .gha file, you can use the `_GrasshopperDeveloperSettings` command. Add the bin/ folder as a looked-up folder. 20 | 21 | ## C++ SDK templates 22 | 23 | * **Rhino Plug-In** - Provides a PlugIn Project 24 | 25 | ## Features 26 | 27 | This extension provides add-on and component wizards for RhinoCommon and Grasshopper projects in C# and VB.NET, and wizards for the Rhino C++ SDK. For RhinoCommon and C++ project templates, this includes utility, digitizier, import and export plug-ins. For Grasshopper project templates, this includes a spiral for an Archimedean spiral component. 28 | 29 | It makes setting up debugging easier and automatically references the RhinoCommon and/or Grasshopper NuGet packages. Rhino and Grasshopper are requirements for this wizard to operate correctly. 30 | 31 | ## Related Links 32 | 33 | * [Guides for our SDKs](https://developer.rhino3d.com/guides/) 34 | * [RhinoCommon API documentation](https://developer.rhino3d.com/api/rhinocommon/) 35 | * [Grasshopper API documentation](https://developer.rhino3d.com/api/grasshopper/) 36 | 37 | --- 38 | 39 | (c) 2012-2025 Robert McNeel & Associates 40 | For questions, email curtis@mcneel.com --------------------------------------------------------------------------------