Skip to content

Commit

Permalink
Updating READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Dec 4, 2020
1 parent cbe8600 commit 46755b9
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 2 deletions.
12 changes: 11 additions & 1 deletion rhino.inside/javascript/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Rhino.Inside Javascript
Rhino Inside® technology allows Rhino and Grasshopper to be embedded within other products.
Rhino Inside technology allows Rhino and Grasshopper to be embedded within other products.
### Running Rhino and Grasshopper inside various JavaScript Runtimes / Frameworks (Node.js, Electron, Chromium Embedded Framework)

## Samples

1. [Rhino.Inside Node.js](SampleRhinoInsideNodeApp) - This sample runs Rhino inside Node.js. The JavaScript code calls into a .NET dll which launches Rhino, creates some geometry, and returns information related to that geometry. This information is then passed back to JavaScript and is printed to the console. This sample uses the RhinoMethods Library.

![image](https://user-images.githubusercontent.com/1014562/101172558-9b3a5e80-3641-11eb-84cc-1e9816053f19.png)

2. [Rhino.Inside Electron](SampleRhinoInsideElectronApp) - This sample runs Rhino.Inside Electron. The Electron app calls methods from JavaScript to .NET to launch Rhino, create some geometry. This geometry is then passed back to Electron. The geometry is deserialized with rhino3dm.js and rendered with Three.js. This sample uses the RhinoMethods Library.

![image](https://user-images.githubusercontent.com/1014562/101173482-e43ee280-3642-11eb-8e49-d3cfd222a516.png)

3. [Rhino.Inside Electron + GH](SampleRhinoInsideElectronAppGH) - This sample starts Rhino and Grasshopper inside Electron. Grasshopper preview meshes are passed to the Electron app and visualized with Three.js. This sample uses the RhinoTaskManager Library.

![image](https://user-images.githubusercontent.com/1014562/101174472-36ccce80-3644-11eb-9c1d-42d4fe0fccfb.png)


4. [Rhino.Inside CEF](SampleRhinoInsideCEF) - This sample starts Rhino and Grasshopper inside a .net winforms application hosting a Chromium Embedded Framework browser. Grasshopper Preview meshes are passed to CEF and visualized with Three.js. This sample uses the RhinoTaskManager Library.

## Libraries
Expand Down
23 changes: 23 additions & 0 deletions rhino.inside/javascript/SampleRhinoInsideCEF/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Rhino.Inside CEF
Sample showing how to start Rhino and Grasshopper from a winforms app with a CEF control.

![image](https://user-images.githubusercontent.com/1014562/101174472-36ccce80-3644-11eb-9c1d-42d4fe0fccfb.png)


## Requirements
- [Rhino 7 for Windows](https://www.rhino3d.com/download/rhino-for-windows/7/latest)
- [node.js and npm](https://nodejs.org/en/) (tested on node version 12.18.0 and npm 6.14.4)

## Dependencies
- [CEFSharp](https://github.com/cefsharp/CefSharp) - [version 86.0.241] Used to host the UI, and javascript.
- [rhino3dm.js](https://www.npmjs.com/package/rhino3dm) - [version 0.13.0] Used to decode data from .net
- [three.js](https://threejs.org) - [version 123] Used to display the geometry coming from Rhino..
- .net [version 4.8]
- [Rhino.Inside](https://www.nuget.org/packages/Rhino.Inside/) - [version 7.0.0] - Used to resolve Rhino related assemblies.
- [RhinoTaskManager Library](../SampleRhinoInsideJavascriptTaskManagerLib) - .net library that opens up Rhino.

## Usage
1. This assumes you've installed node.js and Rhino 7.
2. Clone this repository and open the `SampleRhinoInsideCEF.sln` in Visual Studio 2019.
3. Start the application.
4. A winforms window will appear, then the GH Editor. Place some components onto the GH canvas to see them rendered on the js canvas hosted in CEF. This might take some time to start depending on the number of plugins installed in Rhino and GH.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleRhinoInsideCEF", "Sam
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleRhinoInsideJavascriptTaskManagerLib", "..\SampleRhinoInsideJavascriptTaskManagerLib\SampleRhinoInsideJavascriptTaskManagerLib.csproj", "{B70ABEBE-DF8A-4960-82E4-97959F353738}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{CF6F4C66-31E3-4A48-8BFE-9FA6538F2C7B}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
24 changes: 24 additions & 0 deletions rhino.inside/javascript/SampleRhinoInsideElectronApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Rhino.Inside Electron
Sample showing how to start Rhino from Electron

![image](https://user-images.githubusercontent.com/1014562/101172558-9b3a5e80-3641-11eb-84cc-1e9816053f19.png)

## Requirements
- [Rhino 7 for Windows](https://www.rhino3d.com/download/rhino-for-windows/7/latest)
- [node.js and npm](https://nodejs.org/en/) (tested on node version 12.18.0 and npm 6.14.4)

## Dependencies
- [electron-edge.js](https://www.npmjs.com/package/electron-edge-js) - [version 12.16.3] Used to communicate between .net and node.js.
- [rhino3dm.js](https://www.npmjs.com/package/rhino3dm) - [version 0.13.0] Used to decode data from .net
- [three.js](https://threejs.org) - [version 123] Used to display the geometry coming from Rhino in the Electron app.
- [Electron](https://www.electronjs.org/) - [version 5.0.13] Used to host the application, UI, and javascript.
- .net [version 4.8]
- [Rhino.Inside](https://www.nuget.org/packages/Rhino.Inside/) - [version 7.0.0] - Used to resolve Rhino related assemblies.
- [RhinoMethods Library](../SampleRhinoInsideJavascriptMethodsLib) - .net library that opens up Rhino.

## Usage
1. This assumes you've installed node.js and Rhino 7, and have built the RhinoMethods library.
2. Clone this repository. Open a terminal to the cloned repository directory.
3. Install dependencies: `npm i`.
4. Start app: `npm run start`.
5. An electron app will appear and eventually a wireframe render of a sphere.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
"dependencies": {
"electron": "5.0.13",
"electron-edge-js": "12.16.3"
},
"engines": {
"node": ">=12.18.0",
"npm": ">=6.14.0"
}
}
25 changes: 25 additions & 0 deletions rhino.inside/javascript/SampleRhinoInsideElectronAppGH/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Rhino.Inside Electron + GH
Sample showing how to start Rhino and Grasshopper from Electron

![image](https://user-images.githubusercontent.com/1014562/101173482-e43ee280-3642-11eb-8e49-d3cfd222a516.png)


## Requirements
- [Rhino 7 for Windows](https://www.rhino3d.com/download/rhino-for-windows/7/latest)
- [node.js and npm](https://nodejs.org/en/) (tested on node version 12.18.0 and npm 6.14.4)

## Dependencies
- [electron-edge.js](https://www.npmjs.com/package/electron-edge-js) - [version 12.16.3] Used to communicate between .net and node.js.
- [rhino3dm.js](https://www.npmjs.com/package/rhino3dm) - [version 0.13.0] Used to decode data from .net
- [three.js](https://threejs.org) - [version 123] Used to display the geometry coming from Rhino in the Electron app.
- [Electron](https://www.electronjs.org/) - [version 5.0.13] Used to host the application, UI, and javascript.
- .net [version 4.8]
- [Rhino.Inside](https://www.nuget.org/packages/Rhino.Inside/) - [version 7.0.0] - Used to resolve Rhino related assemblies.
- [RhinoTaskManager Library](../SampleRhinoInsideJavascriptTaskManagerLib) - .net library that opens up Rhino.

## Usage
1. This assumes you've installed node.js and Rhino 7, and have built the [RhinoTaskManager Library](../SampleRhinoInsideJavascriptTaskManagerLib).
2. Clone this repository. Open a terminal to the cloned repository directory.
3. Install dependencies: `npm i`.
4. Start app: `npm run start`.
5. An electron app will appear, then the GH Editor. Place some components onto the GH canvas to see them rendered in the Electron app. This might take some time depending on the number of plugins installed in Rhino and GH.
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
"dependencies": {
"electron": "5.0.13",
"electron-edge-js": "12.16.3"
},
"engines": {
"node": ">=12.18.0",
"npm": ">=6.14.0"
}
}
25 changes: 25 additions & 0 deletions rhino.inside/javascript/SampleRhinoInsideNodeApp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Rhino.Inside Node.js
Sample showing how to start Rhino from node.js

## Requirements
- [Rhino 7 for Windows](https://www.rhino3d.com/download/rhino-for-windows/7/latest)
- [node.js and npm](https://nodejs.org/en/) (tested on node version 12.18.0 and npm 6.14.4)

## Dependencies
- [edge.js](https://www.npmjs.com/package/edge-js) - [version 14.3.2] Used to communicate between .net and node.js.
- [rhino3dm.js](https://www.npmjs.com/package/rhino3dm) - [version 0.13.0] Used to decode data from .net
- .net [version 4.8]
- [Rhino.Inside](https://www.nuget.org/packages/Rhino.Inside/) - [version 7.0.0] - Used to resolve Rhino related assemblies.
- [RhinoMethods Library](../SampleRhinoInsideJavascriptMethodsLib) - .net library that opens up Rhino.

## Usage
1. This assumes you've installed node.js and Rhino 7, and have built the RhinoMethods library.
2. Clone this repository. Open a terminal to the cloned repository directory.
3. Install dependencies: `npm i`.
4. Start app: `npm run start`.
5. You will see the following in the terminal:
```
rhino3dm loaded.
Rhino has started.
Mesh has 92 vertices and 100 faces.
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
"edge-js": "14.3.2",
"rhino3dm": "0.13.0"
},
"engines": {
"node": ">=12.18.0",
"npm": ">=6.14.0"
},
"scripts": {
"start": "node app.js"
"start": "node ."
},
"keywords": [
"rhino3d",
Expand Down

0 comments on commit 46755b9

Please sign in to comment.