├── 0003 compute.rhino3d with Unity
└── unity
│ ├── Outputs
│ └── .gitkeep
│ ├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── ClusterInputManager.asset
│ ├── PresetManager.asset
│ ├── XRSettings.asset
│ ├── TimeManager.asset
│ ├── EditorBuildSettings.asset
│ ├── VFXManager.asset
│ ├── AudioManager.asset
│ ├── TagManager.asset
│ ├── EditorSettings.asset
│ ├── UnityConnectSettings.asset
│ ├── DynamicsManager.asset
│ ├── NavMeshAreas.asset
│ ├── Physics2DSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ └── QualitySettings.asset
│ ├── Assets
│ ├── Plugins
│ │ ├── Rhino3dmIO.dll
│ │ ├── librhino3dmio_native.dll
│ │ ├── librhino3dmio_native.dylib
│ │ ├── librhino3dmio_native.dylib.meta
│ │ ├── librhino3dmio_native.dll.meta
│ │ └── Rhino3dmIO.dll.meta
│ ├── JsonDotNet
│ │ ├── link.xml.meta
│ │ ├── JsonDotNet201Source.zip
│ │ ├── Assemblies
│ │ │ ├── AOT
│ │ │ │ ├── Newtonsoft.Json.dll
│ │ │ │ ├── Newtonsoft.Json.XML.meta
│ │ │ │ └── Newtonsoft.Json.dll.meta
│ │ │ ├── Windows
│ │ │ │ ├── Newtonsoft.Json.dll
│ │ │ │ ├── Newtonsoft.Json.XML.meta
│ │ │ │ └── Newtonsoft.Json.dll.meta
│ │ │ ├── Standalone
│ │ │ │ ├── Newtonsoft.Json.dll
│ │ │ │ ├── Newtonsoft.Json.XML.meta
│ │ │ │ └── Newtonsoft.Json.dll.meta
│ │ │ ├── AOT.meta
│ │ │ ├── Windows.meta
│ │ │ └── Standalone.meta
│ │ ├── Documentation
│ │ │ ├── Json Net for Unity 2.0.1.pdf
│ │ │ └── Json Net for Unity 2.0.1.pdf.meta
│ │ ├── JsonDotNet201Source.zip.meta
│ │ ├── Assemblies.meta
│ │ ├── Documentation.meta
│ │ └── link.xml
│ ├── Scenes
│ │ ├── SampleScene.unity.meta
│ │ └── SampleScene.unity
│ ├── Materials.meta
│ ├── Plugins.meta
│ ├── Scenes.meta
│ ├── Scripts.meta
│ ├── JsonDotNet.meta
│ ├── compute.rhino3d.meta
│ ├── Materials
│ │ ├── mat.mat.meta
│ │ └── mat.mat
│ ├── Scripts
│ │ ├── TestCompute.cs.meta
│ │ └── TestCompute.cs
│ └── compute.rhino3d
│ │ └── RhinoCompute.cs.meta
│ └── .gitignore
├── 0008 Toon Shader with GhGL
└── toon_shader.gh
├── 0007 Matcap Shader with GhGL
└── matcap_shader.gh
├── 0009 Fresnel Shader with GhGL
└── fresnel_shader.gh
├── 0011 Outline Shader with GhGL
└── outline_shader.gh
├── 0010 Half Tone Shader with GhGL
└── half_tone_shader.gh
├── 0012 Export CSV with C# for Grasshopper
└── CSVExport.gh
├── 0013 Skeletonization with Grasshopper C#
├── sketch.png
└── skeletonization.gh
├── 0016 Import Geometry with Grasshopper C#
├── network.png
├── v6_rhino_logo.3dm
└── Import Geometry with Grasshopper C#.gh
├── 0005 Load Grasshopper file with compute.rhino3d Unity
└── GrasshopperLoader
│ ├── ProjectSettings
│ ├── ProjectVersion.txt
│ ├── ClusterInputManager.asset
│ ├── PresetManager.asset
│ ├── EditorBuildSettings.asset
│ ├── XRSettings.asset
│ ├── TimeManager.asset
│ ├── VFXManager.asset
│ ├── AudioManager.asset
│ ├── TagManager.asset
│ ├── EditorSettings.asset
│ ├── UnityConnectSettings.asset
│ ├── DynamicsManager.asset
│ ├── NavMeshAreas.asset
│ ├── Physics2DSettings.asset
│ ├── GraphicsSettings.asset
│ ├── InputManager.asset
│ └── QualitySettings.asset
│ ├── Assets
│ ├── Plugins
│ │ ├── GH_IO.dll
│ │ ├── RestSharp.dll
│ │ ├── Rhino3dmIO.dll
│ │ ├── Newtonsoft.Json.dll
│ │ ├── librhino3dmio_native.dll
│ │ ├── librhino3dmio_native.dylib
│ │ ├── librhino3dmio_native.dll.meta
│ │ ├── librhino3dmio_native.dylib.meta
│ │ ├── GH_IO.dll.meta
│ │ ├── RestSharp.dll.meta
│ │ ├── Rhino3dmIO.dll.meta
│ │ └── Newtonsoft.Json.dll.meta
│ ├── Prefabs
│ │ ├── MeshObject.prefab.meta
│ │ └── MeshObject.prefab
│ ├── Scenes
│ │ ├── SampleScene.unity.meta
│ │ └── SampleScene.unity
│ ├── StreamingAssets
│ │ ├── stickyball.gh
│ │ ├── tiling.ghx.meta
│ │ └── stickyball.gh.meta
│ ├── Materials.meta
│ ├── Plugins.meta
│ ├── Prefabs.meta
│ ├── Scenes.meta
│ ├── Scripts.meta
│ ├── StreamingAssets.meta
│ ├── Materials
│ │ ├── Sample.mat.meta
│ │ └── Sample.mat
│ └── Scripts
│ │ └── GHLoader.cs.meta
│ └── .gitignore
├── 0006 Generate Grasshopper components with C#
└── Autogeneration.gh
├── 0004 Load Grasshopper file with compute.rhino3d Python
├── voronoi.3dm
└── ghload.py
├── 0001 Basics of Grasshopper Plugin Development
├── hello-spiral-breakdown.gh
└── HelloSpiral
│ ├── HelloSpiral
│ ├── Resources
│ │ └── Icon1.ico
│ ├── HelloSpiralInfo.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── HelloSpiral.csproj
│ └── SpiralComponent.cs
│ └── HelloSpiral.sln
├── 0014 Graham Scan with Grasshopper C#
└── Graham Scan with Grasshopper C#.gh
├── Live-0001 Getting Started with Grasshopper Modeling with C#
├── chandelier.gh
├── imgs
│ ├── img1.png
│ ├── img2.png
│ ├── img3.png
│ ├── img4.png
│ ├── img5.png
│ ├── img6.png
│ ├── img7.png
│ ├── img8.png
│ ├── img9.png
│ ├── img10.png
│ └── img11.png
└── README.md
├── Live-0002 Parametric Design with C# component for designers
├── imgs
│ ├── img1.png
│ ├── img2.png
│ ├── img3.png
│ ├── img4.png
│ ├── img5.png
│ ├── img6.png
│ ├── img7.png
│ ├── sketch.png
│ ├── component.png
│ └── component2.png
├── CustomPopulateGeometry1.gh
├── CustomPopulateGeometry2.gh
├── CustomPopulateGeometry3.gh
└── README.md
├── 0015 Export Geometry with Grasshopper C#
└── Export Geometry with Grasshopper C#.gh
├── Live-0003 Batch Automation with RhinoScript Python
├── runConvertImportedObjs.py
├── runExportBoxes.py
├── exportObjs.py
├── importObjs.py
├── createBox.py
└── README.md
├── 0017 RhinoInside with CPython
└── rhinoinside_python.py
├── 0002 Getting Started with compute.rhino3d for Python
└── compute rhino3d example.py
└── .gitignore
/0003 compute.rhino3d with Unity/unity/Outputs/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2019.1.0f2
2 | m_EditorVersionWithRevision: 2019.1.0f2 (292b93d75a2c)
3 |
--------------------------------------------------------------------------------
/0008 Toon Shader with GhGL/toon_shader.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0008 Toon Shader with GhGL/toon_shader.gh
--------------------------------------------------------------------------------
/0007 Matcap Shader with GhGL/matcap_shader.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0007 Matcap Shader with GhGL/matcap_shader.gh
--------------------------------------------------------------------------------
/0009 Fresnel Shader with GhGL/fresnel_shader.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0009 Fresnel Shader with GhGL/fresnel_shader.gh
--------------------------------------------------------------------------------
/0011 Outline Shader with GhGL/outline_shader.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0011 Outline Shader with GhGL/outline_shader.gh
--------------------------------------------------------------------------------
/0010 Half Tone Shader with GhGL/half_tone_shader.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0010 Half Tone Shader with GhGL/half_tone_shader.gh
--------------------------------------------------------------------------------
/0012 Export CSV with C# for Grasshopper/CSVExport.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0012 Export CSV with C# for Grasshopper/CSVExport.gh
--------------------------------------------------------------------------------
/0013 Skeletonization with Grasshopper C#/sketch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0013 Skeletonization with Grasshopper C#/sketch.png
--------------------------------------------------------------------------------
/0016 Import Geometry with Grasshopper C#/network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0016 Import Geometry with Grasshopper C#/network.png
--------------------------------------------------------------------------------
/0016 Import Geometry with Grasshopper C#/v6_rhino_logo.3dm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0016 Import Geometry with Grasshopper C#/v6_rhino_logo.3dm
--------------------------------------------------------------------------------
/0013 Skeletonization with Grasshopper C#/skeletonization.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0013 Skeletonization with Grasshopper C#/skeletonization.gh
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/ProjectVersion.txt:
--------------------------------------------------------------------------------
1 | m_EditorVersion: 2019.2.12f1
2 | m_EditorVersionWithRevision: 2019.2.12f1 (b1a7e1fb4fa5)
3 |
--------------------------------------------------------------------------------
/0006 Generate Grasshopper components with C#/Autogeneration.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0006 Generate Grasshopper components with C#/Autogeneration.gh
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/Rhino3dmIO.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/Plugins/Rhino3dmIO.dll
--------------------------------------------------------------------------------
/0004 Load Grasshopper file with compute.rhino3d Python/voronoi.3dm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0004 Load Grasshopper file with compute.rhino3d Python/voronoi.3dm
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/hello-spiral-breakdown.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0001 Basics of Grasshopper Plugin Development/hello-spiral-breakdown.gh
--------------------------------------------------------------------------------
/0014 Graham Scan with Grasshopper C#/Graham Scan with Grasshopper C#.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0014 Graham Scan with Grasshopper C#/Graham Scan with Grasshopper C#.gh
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/chandelier.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/chandelier.gh
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img1.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img2.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img3.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img4.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img5.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img6.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img7.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img8.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img9.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img1.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img2.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img3.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img4.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img5.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img6.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/img7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/img7.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img10.png
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0001 Getting Started with Grasshopper Modeling with C#/imgs/img11.png
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/sketch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/sketch.png
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/link.xml.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06314f49bdda26043963578d60a0a7ee
3 | TextScriptImporter:
4 | userData:
5 | assetBundleName:
6 | assetBundleVariant:
7 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dll
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/component.png
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/JsonDotNet201Source.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/JsonDotNet201Source.zip
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dylib
--------------------------------------------------------------------------------
/0015 Export Geometry with Grasshopper C#/Export Geometry with Grasshopper C#.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0015 Export Geometry with Grasshopper C#/Export Geometry with Grasshopper C#.gh
--------------------------------------------------------------------------------
/0016 Import Geometry with Grasshopper C#/Import Geometry with Grasshopper C#.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0016 Import Geometry with Grasshopper C#/Import Geometry with Grasshopper C#.gh
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/imgs/component2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/imgs/component2.png
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/ClusterInputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!236 &1
4 | ClusterInputManager:
5 | m_ObjectHideFlags: 0
6 | m_Inputs: []
7 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/PresetManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1386491679 &1
4 | PresetManager:
5 | m_ObjectHideFlags: 0
6 | m_DefaultList: []
7 |
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry1.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry1.gh
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry2.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry2.gh
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry3.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/Live-0002 Parametric Design with C# component for designers/CustomPopulateGeometry3.gh
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/Resources/Icon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/Resources/Icon1.ico
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8a01ab7741aa8cf49a5f0d9637c8031c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 445a5a54aa6a1604d8f4f20dc065a9c6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 8678c1d02bf300543b207141da88debe
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 34cb32b48a0ddb74aa2ebd5b8ef350c4
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5b241ded66df71b4da889f22822e66dc
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Windows/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Windows/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dylib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 5569172f3e523ef43bbdf28e411fc6f6
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Documentation/Json Net for Unity 2.0.1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Documentation/Json Net for Unity 2.0.1.pdf
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/compute.rhino3d.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a513a65c6f60a564abde28e755332474
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/GH_IO.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/GH_IO.dll
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/RestSharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/RestSharp.dll
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Rhino3dmIO.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Rhino3dmIO.dll
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Materials/mat.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1760965e14e3ecc4fb00139e23b88f50
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/JsonDotNet201Source.zip.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9a6f8c7c1ea72ce46831c5e1b6150d0c
3 | timeCreated: 1466790933
4 | licenseType: Store
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Prefabs/MeshObject.prefab.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: efa9fb3f7b0c0c24eba7379d5dee1213
3 | PrefabImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Scenes/SampleScene.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9fc0d4010bbf28b4594072e72b8655ab
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/StreamingAssets/stickyball.gh:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/StreamingAssets/stickyball.gh
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/StreamingAssets/tiling.ghx.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 95eda22dd41f7c0449afce10466ddc05
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 72273a4ff6db50b448168280752753a6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: e2efc314f14fa77479088e30b91a9241
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Prefabs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 868aa672009481c4f9ab257f449bcd22
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Scenes.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 223066cbbd7b63648a45a437e38dc053
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Scripts.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: afcdb77d8e2192744979ab45ecbcd3b1
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/StreamingAssets/stickyball.gh.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1111dbaca0d3f7e41a4dd8cc967a6f6e
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dll
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jhorikawa/GrasshopperProgrammingTutorials/HEAD/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dylib
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/StreamingAssets.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9aa188e02f47cda4986b14a9ad620f23
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: aadad8ac54f29e44583510294ac5c312
3 | timeCreated: 1466788355
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes: []
8 | m_configObjects: {}
9 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/XRSettings.asset:
--------------------------------------------------------------------------------
1 | {
2 | "m_SettingKeys": [
3 | "VR Device Disabled",
4 | "VR Device User Alert"
5 | ],
6 | "m_SettingValues": [
7 | "False",
8 | "False"
9 | ]
10 | }
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 577d9725f58264943855b8ac185531fe
3 | folderAsset: yes
4 | timeCreated: 1466788344
5 | licenseType: Store
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d6807fedb8dcaf04682d2c84f0ab753f
3 | timeCreated: 1466788355
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Windows/Newtonsoft.Json.XML.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 36f7323c55864364d8bb88c736e4bca6
3 | timeCreated: 1466788355
4 | licenseType: Store
5 | TextScriptImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Documentation.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 76f828f47ce26cc43991113c6a39dbbf
3 | folderAsset: yes
4 | timeCreated: 1466010535
5 | licenseType: Store
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Documentation/Json Net for Unity 2.0.1.pdf.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4e7d9a07cc3f02a41a575406e7230846
3 | timeCreated: 1466788421
4 | licenseType: Store
5 | DefaultImporter:
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/AOT.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 14f21d7a1e53a8c4e87b25526a7eb63c
3 | folderAsset: yes
4 | timeCreated: 1466788345
5 | licenseType: Store
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Windows.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 1418141139a6ac443b18cb05c0643a29
3 | folderAsset: yes
4 | timeCreated: 1466788345
5 | licenseType: Store
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Standalone.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 01ef782d02bb1994dbe418b69432552b
3 | folderAsset: yes
4 | timeCreated: 1466788344
5 | licenseType: Store
6 | DefaultImporter:
7 | userData:
8 | assetBundleName:
9 | assetBundleVariant:
10 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Materials/Sample.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 7e06b5cfc0056e74b86e2918c317b1b0
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/link.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!5 &1
4 | TimeManager:
5 | m_ObjectHideFlags: 0
6 | Fixed Timestep: 0.02
7 | Maximum Allowed Timestep: 0.33333334
8 | m_TimeScale: 1
9 | Maximum Particle Timestep: 0.03
10 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/runConvertImportedObjs.py:
--------------------------------------------------------------------------------
1 | import rhinoscriptsyntax as rs
2 | import importObjs
3 | import exportObjs
4 |
5 | dir = rs.BrowseForFolder(None, "Select folder which contains objects you want to import")
6 | objs = importObjs.Run(dir, "3dm")
7 | exportObjs.Run(objs, dir, "obj")
8 | rs.DeleteObjects(objs)
9 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scripts/TestCompute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: c1b91b14c6450b9478a6820b5a54bf03
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/compute.rhino3d/RhinoCompute.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4c8f4ef81fb614744ae6d381f1db6ef5
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1045 &1
4 | EditorBuildSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Scenes:
8 | - enabled: 1
9 | path: Assets/Scenes/SampleScene.unity
10 | guid: 9fc0d4010bbf28b4594072e72b8655ab
11 | m_configObjects: {}
12 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Scripts/GHLoader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: ada223993d6dcdb47bb79e1c014c6969
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/VFXManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!937362698 &1
4 | VFXManager:
5 | m_ObjectHideFlags: 0
6 | m_IndirectShader: {fileID: 0}
7 | m_CopyBufferShader: {fileID: 0}
8 | m_SortShader: {fileID: 0}
9 | m_RenderPipeSettingsPath:
10 | m_FixedTimeStep: 0.016666668
11 | m_MaxDeltaTime: 0.05
12 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/runExportBoxes.py:
--------------------------------------------------------------------------------
1 | import rhinoscriptsyntax as rs
2 | import createBox
3 | import exportObjs
4 |
5 | xNum = rs.GetInteger("X number", 5, 1)
6 | yNum = rs.GetInteger("Y number", 5, 1)
7 | boxes = createBox.Run(xNum, yNum)
8 | if boxes is None or len(boxes) == 0:
9 | rs.MessageBox("No objects to export")
10 | else:
11 | dir = rs.BrowseForFolder(None, "Select a folder to save files")
12 | exportObjs.Run(boxes, dir, "3dm")
13 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | m_Volume: 1
7 | Rolloff Scale: 1
8 | Doppler Factor: 1
9 | Default Speaker Mode: 2
10 | m_SampleRate: 0
11 | m_DSPBufferSize: 1024
12 | m_VirtualVoiceCount: 512
13 | m_RealVoiceCount: 32
14 | m_SpatializerPlugin:
15 | m_AmbisonicDecoderPlugin:
16 | m_DisableAudio: 0
17 | m_VirtualizeEffects: 1
18 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!11 &1
4 | AudioManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Volume: 1
8 | Rolloff Scale: 1
9 | Doppler Factor: 1
10 | Default Speaker Mode: 2
11 | m_SampleRate: 0
12 | m_DSPBufferSize: 1024
13 | m_VirtualVoiceCount: 512
14 | m_RealVoiceCount: 32
15 | m_SpatializerPlugin:
16 | m_AmbisonicDecoderPlugin:
17 | m_DisableAudio: 0
18 | m_VirtualizeEffects: 1
19 | m_RequestedDSPBufferSize: 1024
20 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags: []
7 | layers:
8 | - Default
9 | - TransparentFX
10 | - Ignore Raycast
11 | -
12 | - Water
13 | - UI
14 | -
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | m_SortingLayers:
41 | - name: Default
42 | uniqueID: 0
43 | locked: 0
44 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!78 &1
4 | TagManager:
5 | serializedVersion: 2
6 | tags:
7 | - Object
8 | layers:
9 | - Default
10 | - TransparentFX
11 | - Ignore Raycast
12 | -
13 | - Water
14 | - UI
15 | -
16 | -
17 | -
18 | -
19 | -
20 | -
21 | -
22 | -
23 | -
24 | -
25 | -
26 | -
27 | -
28 | -
29 | -
30 | -
31 | -
32 | -
33 | -
34 | -
35 | -
36 | -
37 | -
38 | -
39 | -
40 | -
41 | m_SortingLayers:
42 | - name: Default
43 | uniqueID: 0
44 | locked: 0
45 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/librhino3dmio_native.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: d4e15248e7ded52499b29b1a5c66ca95
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | userData:
26 | assetBundleName:
27 | assetBundleVariant:
28 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 74ea43a9dbac4394f88b07385e2240ac
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | userData:
26 | assetBundleName:
27 | assetBundleVariant:
28 |
--------------------------------------------------------------------------------
/0017 RhinoInside with CPython/rhinoinside_python.py:
--------------------------------------------------------------------------------
1 | import rhinoinside
2 | rhinoinside.load()
3 | import System
4 | import Rhino
5 | import streamlit as st
6 | import matplotlib.pyplot as plt
7 | import math
8 |
9 |
10 | st.write("""
11 | # RhinoInside for CPython with Streamlit
12 | """)
13 |
14 | ang = st.slider("Step Angle", 0.0, 90.0, 30.0, 0.1)
15 |
16 | xarray = []
17 | yarray = []
18 | for i in range(100):
19 | pos = Rhino.Geometry.Point3d(i * 0.1, 0.0, 0.0)
20 | pt = Rhino.Geometry.Point(pos)
21 | pt.Rotate(math.radians(ang * i), Rhino.Geometry.Vector3d.ZAxis, Rhino.Geometry.Point3d.Origin)
22 | xarray.append(pt.Location.X)
23 | yarray.append(pt.Location.Y)
24 |
25 | fig, ax = plt.subplots()
26 | ax.plot(xarray, yarray)
27 |
28 | st.pyplot(fig)
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Plugins/Rhino3dmIO.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0e2259d55e293aa40a48f1cbbc470947
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/librhino3dmio_native.dylib.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f20be69ad19f8d54ba4294150b935d80
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 0
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 1
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Standalone: OSXUniversal
27 | second:
28 | enabled: 1
29 | settings: {}
30 | userData:
31 | assetBundleName:
32 | assetBundleVariant:
33 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/exportObjs.py:
--------------------------------------------------------------------------------
1 | import rhinoscriptsyntax as rs
2 | #import createBox
3 |
4 | def Run(objs, dir, ext):
5 | rs.EnableRedraw(False)
6 | rs.UnselectAllObjects()
7 | for i in range(len(objs)):
8 | obj = objs[i]
9 | filepath = dir + "/exported" + str(i) + "." + ext
10 | rs.SelectObject(obj)
11 | rs.Command("!_-Export \"" + filepath + "\" -Enter -Enter")
12 | rs.UnselectAllObjects()
13 | rs.EnableRedraw(True)
14 |
15 | #xNum = rs.GetInteger("X number", 5, 1)
16 | #yNum = rs.GetInteger("Y number", 5, 1)
17 | #boxes = createBox.Run(xNum, yNum)
18 | #if boxes is None or len(boxes) == 0:
19 | # rs.MessageBox("No objects to export")
20 | #else:
21 | # dir = rs.BrowseForFolder(None, "Select a folder to save files")
22 | # Run(boxes, dir, "3dm")
23 |
24 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/GH_IO.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 616dde8387ed4214087a485f11fd1c18
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/RestSharp.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 89a86e4cb6b13b641bf8d18addfea0fb
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Rhino3dmIO.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 431bd839e53563b42a4a228ec8e695c4
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Plugins/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fb7fa3d496a906e409a5936edbc36d16
3 | PluginImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | iconMap: {}
7 | executionOrder: {}
8 | defineConstraints: []
9 | isPreloaded: 0
10 | isOverridable: 0
11 | isExplicitlyReferenced: 0
12 | validateReferences: 1
13 | platformData:
14 | - first:
15 | Any:
16 | second:
17 | enabled: 1
18 | settings: {}
19 | - first:
20 | Editor: Editor
21 | second:
22 | enabled: 0
23 | settings:
24 | DefaultValueInitialized: true
25 | - first:
26 | Windows Store Apps: WindowsStoreApps
27 | second:
28 | enabled: 0
29 | settings:
30 | CPU: AnyCPU
31 | userData:
32 | assetBundleName:
33 | assetBundleVariant:
34 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/importObjs.py:
--------------------------------------------------------------------------------
1 | import rhinoscriptsyntax as rs
2 | import os
3 |
4 | def Run(dir, ext):
5 | if dir is None:
6 | rs.MessageBox("No directory path defied")
7 | return
8 |
9 | files = []
10 | for file in os.listdir(dir):
11 | if file.endswith("." + ext):
12 | files.append(dir + "/" + file)
13 |
14 | rs.EnableRedraw(False)
15 | rs.UnselectAllObjects()
16 | importedObjs = []
17 | for filepath in files:
18 | rs.Command("!_-Import \"" + filepath + "\" -Enter -Enter")
19 | selectedObjs = rs.SelectedObjects()
20 | importedObjs.extend(selectedObjs)
21 | rs.UnselectAllObjects()
22 | rs.EnableRedraw(True)
23 |
24 | return importedObjs
25 |
26 |
27 | #dir = rs.BrowseForFolder(None, "Select folder which contains objects you want to import")
28 | #Run(dir, "3dm")
29 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 7
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!159 &1
4 | EditorSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 8
7 | m_ExternalVersionControlSupport: Hidden Meta Files
8 | m_SerializationMode: 2
9 | m_LineEndingsForNewScripts: 2
10 | m_DefaultBehaviorMode: 0
11 | m_PrefabRegularEnvironment: {fileID: 0}
12 | m_PrefabUIEnvironment: {fileID: 0}
13 | m_SpritePackerMode: 0
14 | m_SpritePackerPaddingPower: 1
15 | m_EtcTextureCompressorBehavior: 1
16 | m_EtcTextureFastCompressor: 1
17 | m_EtcTextureNormalCompressor: 2
18 | m_EtcTextureBestCompressor: 4
19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref
20 | m_ProjectGenerationRootNamespace:
21 | m_CollabEditorSettings:
22 | inProgressEnabled: 1
23 | m_EnableTextureStreamingInEditMode: 1
24 | m_EnableTextureStreamingInPlayMode: 1
25 | m_AsyncShaderCompilation: 1
26 | m_ShowLightmapResolutionOverlay: 1
27 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 1
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/UnityConnectSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!310 &1
4 | UnityConnectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 1
7 | m_Enabled: 0
8 | m_TestMode: 0
9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com
12 | m_TestInitMode: 0
13 | CrashReportingSettings:
14 | m_EventUrl: https://perf-events.cloud.unity3d.com
15 | m_Enabled: 0
16 | m_LogBufferSize: 10
17 | m_CaptureEditorExceptions: 1
18 | UnityPurchasingSettings:
19 | m_Enabled: 0
20 | m_TestMode: 0
21 | UnityAnalyticsSettings:
22 | m_Enabled: 0
23 | m_TestMode: 0
24 | m_InitializeOnStartup: 1
25 | UnityAdsSettings:
26 | m_Enabled: 0
27 | m_InitializeOnStartup: 1
28 | m_TestMode: 0
29 | m_IosGameId:
30 | m_AndroidGameId:
31 | m_GameIds: {}
32 | m_GameId:
33 | PerformanceReportingSettings:
34 | m_Enabled: 0
35 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 |
3 | /[Ll]ibrary/
4 | /[Tt]emp/
5 | /[Oo]bj/
6 | /[Bb]uild/
7 | /[Bb]uilds/
8 | /[Ll]ogs/
9 |
10 | # Never ignore Asset meta data
11 | !/[Aa]ssets/**/*.meta
12 |
13 | # Uncomment this line if you wish to ignore the asset store tools plugin
14 | # /[Aa]ssets/AssetStoreTools*
15 |
16 | # TextMesh Pro files
17 | [Aa]ssets/TextMesh*Pro/
18 |
19 | # Visual Studio cache directory
20 | .vs/
21 |
22 | # Gradle cache directory
23 | .gradle/
24 |
25 | # Autogenerated VS/MD/Consulo solution and project files
26 | ExportedObj/
27 | .consulo/
28 | *.csproj
29 | *.unityproj
30 | *.sln
31 | *.suo
32 | *.tmp
33 | *.user
34 | *.userprefs
35 | *.pidb
36 | *.booproj
37 | *.svd
38 | *.pdb
39 | *.mdb
40 | *.opendb
41 | *.VC.db
42 |
43 | # Unity3D generated meta files
44 | *.pidb.meta
45 | *.pdb.meta
46 | *.mdb.meta
47 |
48 | # Unity3D generated file on crash reports
49 | sysinfo.txt
50 |
51 | # Builds
52 | *.apk
53 | *.unitypackage
54 |
55 | # Crashlytics generated file
56 | crashlytics-build.properties
57 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/.gitignore:
--------------------------------------------------------------------------------
1 | # This .gitignore file should be placed at the root of your Unity project directory
2 |
3 | /[Ll]ibrary/
4 | /[Tt]emp/
5 | /[Oo]bj/
6 | /[Bb]uild/
7 | /[Bb]uilds/
8 | /[Ll]ogs/
9 |
10 | # Never ignore Asset meta data
11 | !/[Aa]ssets/**/*.meta
12 |
13 | # Uncomment this line if you wish to ignore the asset store tools plugin
14 | # /[Aa]ssets/AssetStoreTools*
15 |
16 | # TextMesh Pro files
17 | [Aa]ssets/TextMesh*Pro/
18 |
19 | # Visual Studio cache directory
20 | .vs/
21 |
22 | # Gradle cache directory
23 | .gradle/
24 |
25 | # Autogenerated VS/MD/Consulo solution and project files
26 | ExportedObj/
27 | .consulo/
28 | *.csproj
29 | *.unityproj
30 | *.sln
31 | *.suo
32 | *.tmp
33 | *.user
34 | *.userprefs
35 | *.pidb
36 | *.booproj
37 | *.svd
38 | *.pdb
39 | *.mdb
40 | *.opendb
41 | *.VC.db
42 |
43 | # Unity3D generated meta files
44 | *.pidb.meta
45 | *.pdb.meta
46 | *.mdb.meta
47 |
48 | # Unity3D generated file on crash reports
49 | sysinfo.txt
50 |
51 | # Builds
52 | *.apk
53 | *.unitypackage
54 |
55 | # Crashlytics generated file
56 | crashlytics-build.properties
57 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.27428.2027
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloSpiral", "HelloSpiral\HelloSpiral.csproj", "{EEC8761A-D901-4DA0-9BF5-D36CF2406943}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {EEC8761A-D901-4DA0-9BF5-D36CF2406943}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {EEC8761A-D901-4DA0-9BF5-D36CF2406943}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {EEC8761A-D901-4DA0-9BF5-D36CF2406943}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {EEC8761A-D901-4DA0-9BF5-D36CF2406943}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {8EAAD3E0-0D67-4D0E-BDC8-88C27C8B5770}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/0002 Getting Started with compute.rhino3d for Python/compute rhino3d example.py:
--------------------------------------------------------------------------------
1 | import rhino3dm
2 | import random
3 | import compute_rhino3d
4 | import compute_rhino3d.Util
5 | import compute_rhino3d.Curve
6 | import compute_rhino3d.Mesh
7 |
8 | compute_rhino3d.Util.authToken = ""
9 | #compute_rhino3d.Util.url = "http://127.0.0.1:8081/"
10 |
11 | model = rhino3dm.File3dm()
12 | curves = []
13 | for i in range(20):
14 | pt = rhino3dm.Point3d(random.uniform(-10, 10), random.uniform(-10, 10), 0)
15 | #model.Objects.AddPoint(pt)
16 | circle = rhino3dm.Circle(pt, random.uniform(1, 4))
17 | #model.Objects.AddCircle(circle)
18 | curve = circle.ToNurbsCurve()
19 | curves.append(curve)
20 |
21 | bcurves = compute_rhino3d.Curve.CreateBooleanUnion(curves)
22 |
23 | for bcurve in bcurves:
24 | bcurveObj = rhino3dm.CommonObject.Decode(bcurve)
25 |
26 | extrusion = rhino3dm.Extrusion.Create(bcurveObj, 5, True)
27 | #model.Objects.AddExtrusion(extrusion)
28 |
29 | brep = extrusion.ToBrep(True)
30 | meshes = compute_rhino3d.Mesh.CreateFromBrep(brep)
31 | for i in range(len(meshes)):
32 | meshObj = rhino3dm.CommonObject.Decode(meshes[i])
33 | model.Objects.AddMesh(meshObj)
34 |
35 |
36 | model.Write('mesh.3dm', 5)
37 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/createBox.py:
--------------------------------------------------------------------------------
1 | import rhinoscriptsyntax as rs
2 | import Rhino.Geometry as geo
3 | import math
4 |
5 | def Run(xNum, yNum):
6 | if xNum is None:
7 | rs.MessageBox("No number provided for x")
8 | return
9 | if yNum is None:
10 | rs.MessageBox("No number provided for y")
11 | return
12 |
13 | rs.EnableRedraw(False)
14 | boxes = []
15 | for i in range(xNum):
16 | for n in range(yNum):
17 | points = []
18 | for s in range(2):
19 | for t in range(4):
20 | x = math.cos(math.radians(45 + 90 * t)) * math.sqrt(2)
21 | y = math.sin(math.radians(45 + 90 * t)) * math.sqrt(2)
22 | z = -1 + 2 * s
23 | point = geo.Point3d(x, y, z)
24 | points.append(point)
25 | box = rs.AddBox(points)
26 |
27 | box = rs.RotateObject(box, geo.Point3d(0,0,0), 90 / (xNum - 1) * i, geo.Vector3d.ZAxis)
28 | box = rs.RotateObject(box, geo.Point3d(0,0,0), 90 / (yNum - 1) * n, geo.Vector3d.XAxis)
29 |
30 | box = rs.MoveObject(box, geo.Vector3d(4 * i, 4 * n, 0))
31 | boxes.append(box)
32 | rs.EnableRedraw(True)
33 |
34 | return boxes
35 |
36 | #Run()
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!55 &1
4 | PhysicsManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 11
7 | m_Gravity: {x: 0, y: -9.81, z: 0}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_BounceThreshold: 2
10 | m_SleepThreshold: 0.005
11 | m_DefaultContactOffset: 0.01
12 | m_DefaultSolverIterations: 6
13 | m_DefaultSolverVelocityIterations: 1
14 | m_QueriesHitBackfaces: 0
15 | m_QueriesHitTriggers: 1
16 | m_EnableAdaptiveForce: 0
17 | m_ClothInterCollisionDistance: 0
18 | m_ClothInterCollisionStiffness: 0
19 | m_ContactsGeneration: 1
20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
21 | m_AutoSimulation: 1
22 | m_AutoSyncTransforms: 0
23 | m_ReuseCollisionCallbacks: 1
24 | m_ClothInterCollisionSettingsToggle: 0
25 | m_ContactPairsMode: 0
26 | m_BroadphaseType: 0
27 | m_WorldBounds:
28 | m_Center: {x: 0, y: 0, z: 0}
29 | m_Extent: {x: 250, y: 250, z: 250}
30 | m_WorldSubdivisions: 8
31 | m_FrictionType: 0
32 | m_EnableEnhancedDeterminism: 0
33 | m_EnableUnifiedHeightmaps: 1
34 | m_DefaultMaxAngluarSpeed: 7
35 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/HelloSpiralInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using Grasshopper.Kernel;
4 |
5 | namespace HelloSpiral
6 | {
7 | public class HelloSpiralInfo : GH_AssemblyInfo
8 | {
9 | public override string Name
10 | {
11 | get
12 | {
13 | return "HelloSpiral";
14 | }
15 | }
16 | public override Bitmap Icon
17 | {
18 | get
19 | {
20 | //Return a 24x24 pixel bitmap to represent this GHA library.
21 | return null;
22 | }
23 | }
24 | public override string Description
25 | {
26 | get
27 | {
28 | //Return a short string describing the purpose of this GHA library.
29 | return "";
30 | }
31 | }
32 | public override Guid Id
33 | {
34 | get
35 | {
36 | return new Guid("ff1397e5-186d-44e4-adfe-fa46c827603b");
37 | }
38 | }
39 |
40 | public override string AuthorName
41 | {
42 | get
43 | {
44 | //Return a string identifying you or your company.
45 | return "";
46 | }
47 | }
48 | public override string AuthorContact
49 | {
50 | get
51 | {
52 | //Return a string representing your preferred contact details.
53 | return "";
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/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("HelloSpiral")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("HelloSpiral")]
13 | [assembly: AssemblyCopyright("Copyright © 2018")]
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 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("eec8761a-d901-4da0-9bf5-d36cf2406943")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Windows/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 9b6ba260dada0ea4a871a42011f8b87d
3 | timeCreated: 1466788355
4 | licenseType: Store
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Android:
12 | enabled: 0
13 | settings:
14 | CPU: AnyCPU
15 | Any:
16 | enabled: 0
17 | settings: {}
18 | Editor:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | DefaultValueInitialized: true
23 | OS: AnyOS
24 | Linux:
25 | enabled: 0
26 | settings:
27 | CPU: x86
28 | Linux64:
29 | enabled: 0
30 | settings:
31 | CPU: x86_64
32 | OSXIntel:
33 | enabled: 0
34 | settings:
35 | CPU: AnyCPU
36 | OSXIntel64:
37 | enabled: 0
38 | settings:
39 | CPU: AnyCPU
40 | SamsungTV:
41 | enabled: 0
42 | settings:
43 | STV_MODEL: STANDARD_13
44 | Win:
45 | enabled: 0
46 | settings:
47 | CPU: AnyCPU
48 | Win64:
49 | enabled: 0
50 | settings:
51 | CPU: AnyCPU
52 | WindowsStoreApps:
53 | enabled: 1
54 | settings:
55 | CPU: AnyCPU
56 | DontProcess: False
57 | PlaceholderPath: Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
58 | SDK: AnySDK
59 | ScriptingBackend: DotNet
60 | iOS:
61 | enabled: 0
62 | settings:
63 | CompileFlags:
64 | FrameworkDependencies:
65 | userData:
66 | assetBundleName:
67 | assetBundleVariant:
68 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 17aef65a15b471f468b5fbeb4ff0c6a1
3 | timeCreated: 1466788349
4 | licenseType: Store
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Android:
12 | enabled: 0
13 | settings:
14 | CPU: AnyCPU
15 | Any:
16 | enabled: 0
17 | settings: {}
18 | Editor:
19 | enabled: 1
20 | settings:
21 | CPU: AnyCPU
22 | DefaultValueInitialized: true
23 | OS: AnyOS
24 | Linux:
25 | enabled: 1
26 | settings:
27 | CPU: x86
28 | Linux64:
29 | enabled: 1
30 | settings:
31 | CPU: x86_64
32 | LinuxUniversal:
33 | enabled: 1
34 | settings:
35 | CPU: AnyCPU
36 | OSXIntel:
37 | enabled: 1
38 | settings:
39 | CPU: AnyCPU
40 | OSXIntel64:
41 | enabled: 1
42 | settings:
43 | CPU: AnyCPU
44 | OSXUniversal:
45 | enabled: 1
46 | settings:
47 | CPU: AnyCPU
48 | SamsungTV:
49 | enabled: 0
50 | settings:
51 | STV_MODEL: STANDARD_13
52 | Win:
53 | enabled: 1
54 | settings:
55 | CPU: AnyCPU
56 | Win64:
57 | enabled: 1
58 | settings:
59 | CPU: AnyCPU
60 | WindowsStoreApps:
61 | enabled: 0
62 | settings:
63 | CPU: AnyCPU
64 | DontProcess: False
65 | PlaceholderPath:
66 | SDK: AnySDK
67 | ScriptingBackend: Il2Cpp
68 | iOS:
69 | enabled: 0
70 | settings:
71 | CompileFlags:
72 | FrameworkDependencies:
73 | userData:
74 | assetBundleName:
75 | assetBundleVariant:
76 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/NavMeshAreas.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!126 &1
4 | NavMeshProjectSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | areas:
8 | - name: Walkable
9 | cost: 1
10 | - name: Not Walkable
11 | cost: 1
12 | - name: Jump
13 | cost: 2
14 | - name:
15 | cost: 1
16 | - name:
17 | cost: 1
18 | - name:
19 | cost: 1
20 | - name:
21 | cost: 1
22 | - name:
23 | cost: 1
24 | - name:
25 | cost: 1
26 | - name:
27 | cost: 1
28 | - name:
29 | cost: 1
30 | - name:
31 | cost: 1
32 | - name:
33 | cost: 1
34 | - name:
35 | cost: 1
36 | - name:
37 | cost: 1
38 | - name:
39 | cost: 1
40 | - name:
41 | cost: 1
42 | - name:
43 | cost: 1
44 | - name:
45 | cost: 1
46 | - name:
47 | cost: 1
48 | - name:
49 | cost: 1
50 | - name:
51 | cost: 1
52 | - name:
53 | cost: 1
54 | - name:
55 | cost: 1
56 | - name:
57 | cost: 1
58 | - name:
59 | cost: 1
60 | - name:
61 | cost: 1
62 | - name:
63 | cost: 1
64 | - name:
65 | cost: 1
66 | - name:
67 | cost: 1
68 | - name:
69 | cost: 1
70 | - name:
71 | cost: 1
72 | m_LastAgentTypeID: -887442657
73 | m_Settings:
74 | - serializedVersion: 2
75 | agentTypeID: 0
76 | agentRadius: 0.5
77 | agentHeight: 2
78 | agentSlope: 45
79 | agentClimb: 0.75
80 | ledgeDropHeight: 0
81 | maxJumpAcrossDistance: 0
82 | minRegionArea: 2
83 | manualCellSize: 0
84 | cellSize: 0.16666667
85 | manualTileSize: 0
86 | tileSize: 256
87 | accuratePlacement: 0
88 | debug:
89 | m_Flags: 0
90 | m_SettingNames:
91 | - Humanoid
92 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/JsonDotNet/Assemblies/AOT/Newtonsoft.Json.dll.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 6a3c684705042f345975d924f6983e36
3 | timeCreated: 1466788352
4 | licenseType: Store
5 | PluginImporter:
6 | serializedVersion: 1
7 | iconMap: {}
8 | executionOrder: {}
9 | isPreloaded: 0
10 | platformData:
11 | Android:
12 | enabled: 1
13 | settings:
14 | CPU: AnyCPU
15 | Any:
16 | enabled: 0
17 | settings: {}
18 | Editor:
19 | enabled: 0
20 | settings:
21 | CPU: AnyCPU
22 | DefaultValueInitialized: true
23 | OS: AnyOS
24 | Linux:
25 | enabled: 0
26 | settings:
27 | CPU: x86
28 | Linux64:
29 | enabled: 0
30 | settings:
31 | CPU: x86_64
32 | OSXIntel:
33 | enabled: 0
34 | settings:
35 | CPU: AnyCPU
36 | OSXIntel64:
37 | enabled: 0
38 | settings:
39 | CPU: AnyCPU
40 | SamsungTV:
41 | enabled: 1
42 | settings:
43 | STV_MODEL: STANDARD_13
44 | Tizen:
45 | enabled: 1
46 | settings: {}
47 | WebGL:
48 | enabled: 1
49 | settings: {}
50 | Win:
51 | enabled: 0
52 | settings:
53 | CPU: AnyCPU
54 | Win64:
55 | enabled: 0
56 | settings:
57 | CPU: AnyCPU
58 | WindowsStoreApps:
59 | enabled: 1
60 | settings:
61 | CPU: AnyCPU
62 | DontProcess: False
63 | PlaceholderPath: Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
64 | SDK: AnySDK
65 | ScriptingBackend: Il2Cpp
66 | iOS:
67 | enabled: 1
68 | settings:
69 | CompileFlags:
70 | FrameworkDependencies:
71 | tvOS:
72 | enabled: 1
73 | settings: {}
74 | userData:
75 | assetBundleName:
76 | assetBundleVariant:
77 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/Physics2DSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!19 &1
4 | Physics2DSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 4
7 | m_Gravity: {x: 0, y: -9.81}
8 | m_DefaultMaterial: {fileID: 0}
9 | m_VelocityIterations: 8
10 | m_PositionIterations: 3
11 | m_VelocityThreshold: 1
12 | m_MaxLinearCorrection: 0.2
13 | m_MaxAngularCorrection: 8
14 | m_MaxTranslationSpeed: 100
15 | m_MaxRotationSpeed: 360
16 | m_BaumgarteScale: 0.2
17 | m_BaumgarteTimeOfImpactScale: 0.75
18 | m_TimeToSleep: 0.5
19 | m_LinearSleepTolerance: 0.01
20 | m_AngularSleepTolerance: 2
21 | m_DefaultContactOffset: 0.01
22 | m_JobOptions:
23 | serializedVersion: 2
24 | useMultithreading: 0
25 | useConsistencySorting: 0
26 | m_InterpolationPosesPerJob: 100
27 | m_NewContactsPerJob: 30
28 | m_CollideContactsPerJob: 100
29 | m_ClearFlagsPerJob: 200
30 | m_ClearBodyForcesPerJob: 200
31 | m_SyncDiscreteFixturesPerJob: 50
32 | m_SyncContinuousFixturesPerJob: 50
33 | m_FindNearestContactsPerJob: 100
34 | m_UpdateTriggerContactsPerJob: 100
35 | m_IslandSolverCostThreshold: 100
36 | m_IslandSolverBodyCostScale: 1
37 | m_IslandSolverContactCostScale: 10
38 | m_IslandSolverJointCostScale: 10
39 | m_IslandSolverBodiesPerJob: 50
40 | m_IslandSolverContactsPerJob: 50
41 | m_AutoSimulation: 1
42 | m_QueriesHitTriggers: 1
43 | m_QueriesStartInColliders: 1
44 | m_CallbacksOnDisable: 1
45 | m_ReuseCollisionCallbacks: 1
46 | m_AutoSyncTransforms: 0
47 | m_AlwaysShowColliders: 0
48 | m_ShowColliderSleep: 1
49 | m_ShowColliderContacts: 0
50 | m_ShowColliderAABB: 0
51 | m_ContactArrowScale: 0.2
52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
57 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Materials/mat.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: mat
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 1, b: 1, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Materials/Sample.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Sample
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 0.5424528, b: 0.5424528, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | m_PreloadedShaders: []
39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
40 | type: 0}
41 | m_CustomRenderPipeline: {fileID: 0}
42 | m_TransparencySortMode: 0
43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
44 | m_DefaultRenderingPath: 1
45 | m_DefaultMobileRenderingPath: 1
46 | m_TierSettings: []
47 | m_LightmapStripping: 0
48 | m_FogStripping: 0
49 | m_InstancingStripping: 0
50 | m_LightmapKeepPlain: 1
51 | m_LightmapKeepDirCombined: 1
52 | m_LightmapKeepDynamicPlain: 1
53 | m_LightmapKeepDynamicDirCombined: 1
54 | m_LightmapKeepShadowMask: 1
55 | m_LightmapKeepSubtractive: 1
56 | m_FogKeepLinear: 1
57 | m_FogKeepExp: 1
58 | m_FogKeepExp2: 1
59 | m_AlbedoSwatchInfos: []
60 | m_LightsUseLinearIntensity: 0
61 | m_LightsUseColorTemperature: 0
62 |
--------------------------------------------------------------------------------
/0004 Load Grasshopper file with compute.rhino3d Python/ghload.py:
--------------------------------------------------------------------------------
1 | import compute_rhino3d.Brep
2 | import rhino3dm
3 | import requests
4 | import base64
5 | import json
6 |
7 | compute_rhino3d.Util.authToken = ""
8 | compute_rhino3d.Util.url = "http://127.0.0.1:8081/"
9 |
10 | post_url = compute_rhino3d.Util.url + "grasshopper"
11 |
12 | gh_data = open("./voronoi.ghx", mode="r", encoding="utf-8-sig").read()
13 | data_bytes = gh_data.encode("utf-8")
14 | encoded = base64.b64encode(data_bytes)
15 | decoded = encoded.decode("utf-8")
16 |
17 | response = requests.post(post_url, json={
18 | "algo": decoded,
19 | "pointer": None,
20 | "values": [
21 | {
22 | "ParamName": "RH_IN:Size",
23 | "InnerTree": {
24 | "{ 0; }": [
25 | {
26 | "type": "System.Double",
27 | "data": "100.0"
28 | }
29 | ]
30 | }
31 | },
32 | {
33 | "ParamName": "RH_IN:Count",
34 | "InnerTree": {
35 | "{ 0; }": [
36 | {
37 | "type": "System.Integer",
38 | "data": "80"
39 | }
40 | ]
41 | }
42 | },
43 | {
44 | "ParamName": "RH_IN:Outer",
45 | "InnerTree": {
46 | "{ 0; }": [
47 | {
48 | "type": "System.Double",
49 | "data": "40.0"
50 | }
51 | ]
52 | }
53 | },
54 | {
55 | "ParamName": "RH_IN:Inner",
56 | "InnerTree": {
57 | "{ 0; }": [
58 | {
59 | "type": "System.Double",
60 | "data": "20.0"
61 | }
62 | ]
63 | }
64 | }
65 | ]
66 | })
67 |
68 | res = response.content.decode("utf-8")
69 | res = json.loads(res)
70 |
71 | values = res["values"]
72 |
73 | model = rhino3dm.File3dm()
74 | for val in values:
75 | paramName = val['ParamName']
76 | print(paramName)
77 | innerTree = val['InnerTree']
78 | for key, innerVals in innerTree.items():
79 | print(key)
80 | for innerVal in innerVals:
81 | data = json.loads(innerVal['data'])
82 | geo = rhino3dm.CommonObject.Decode(data)
83 | model.Objects.Add(geo)
84 | model.Write("./voronoi.3dm")
85 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Prefabs/MeshObject.prefab:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!1 &7271443733234122731
4 | GameObject:
5 | m_ObjectHideFlags: 0
6 | m_CorrespondingSourceObject: {fileID: 0}
7 | m_PrefabInstance: {fileID: 0}
8 | m_PrefabAsset: {fileID: 0}
9 | serializedVersion: 6
10 | m_Component:
11 | - component: {fileID: 7271443733234122730}
12 | - component: {fileID: 7271443733234122728}
13 | - component: {fileID: 7271443733234122729}
14 | m_Layer: 0
15 | m_Name: MeshObject
16 | m_TagString: Object
17 | m_Icon: {fileID: 0}
18 | m_NavMeshLayer: 0
19 | m_StaticEditorFlags: 0
20 | m_IsActive: 1
21 | --- !u!4 &7271443733234122730
22 | Transform:
23 | m_ObjectHideFlags: 0
24 | m_CorrespondingSourceObject: {fileID: 0}
25 | m_PrefabInstance: {fileID: 0}
26 | m_PrefabAsset: {fileID: 0}
27 | m_GameObject: {fileID: 7271443733234122731}
28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29 | m_LocalPosition: {x: 0, y: 0, z: 0}
30 | m_LocalScale: {x: 1, y: 1, z: 1}
31 | m_Children: []
32 | m_Father: {fileID: 0}
33 | m_RootOrder: 0
34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35 | --- !u!23 &7271443733234122728
36 | MeshRenderer:
37 | m_ObjectHideFlags: 0
38 | m_CorrespondingSourceObject: {fileID: 0}
39 | m_PrefabInstance: {fileID: 0}
40 | m_PrefabAsset: {fileID: 0}
41 | m_GameObject: {fileID: 7271443733234122731}
42 | m_Enabled: 1
43 | m_CastShadows: 1
44 | m_ReceiveShadows: 1
45 | m_DynamicOccludee: 1
46 | m_MotionVectors: 1
47 | m_LightProbeUsage: 1
48 | m_ReflectionProbeUsage: 1
49 | m_RenderingLayerMask: 1
50 | m_RendererPriority: 0
51 | m_Materials:
52 | - {fileID: 2100000, guid: 7e06b5cfc0056e74b86e2918c317b1b0, type: 2}
53 | m_StaticBatchInfo:
54 | firstSubMesh: 0
55 | subMeshCount: 0
56 | m_StaticBatchRoot: {fileID: 0}
57 | m_ProbeAnchor: {fileID: 0}
58 | m_LightProbeVolumeOverride: {fileID: 0}
59 | m_ScaleInLightmap: 1
60 | m_ReceiveGI: 1
61 | m_PreserveUVs: 0
62 | m_IgnoreNormalsForChartDetection: 0
63 | m_ImportantGI: 0
64 | m_StitchLightmapSeams: 1
65 | m_SelectedEditorRenderState: 3
66 | m_MinimumChartSize: 4
67 | m_AutoUVMaxDistance: 0.5
68 | m_AutoUVMaxAngle: 89
69 | m_LightmapParameters: {fileID: 0}
70 | m_SortingLayerID: 0
71 | m_SortingLayer: 0
72 | m_SortingOrder: 0
73 | --- !u!33 &7271443733234122729
74 | MeshFilter:
75 | m_ObjectHideFlags: 0
76 | m_CorrespondingSourceObject: {fileID: 0}
77 | m_PrefabInstance: {fileID: 0}
78 | m_PrefabAsset: {fileID: 0}
79 | m_GameObject: {fileID: 7271443733234122731}
80 | m_Mesh: {fileID: 0}
81 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/GraphicsSettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!30 &1
4 | GraphicsSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 12
7 | m_Deferred:
8 | m_Mode: 1
9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
10 | m_DeferredReflections:
11 | m_Mode: 1
12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
13 | m_ScreenSpaceShadows:
14 | m_Mode: 1
15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
16 | m_LegacyDeferred:
17 | m_Mode: 1
18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
19 | m_DepthNormals:
20 | m_Mode: 1
21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
22 | m_MotionVectors:
23 | m_Mode: 1
24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
25 | m_LightHalo:
26 | m_Mode: 1
27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
28 | m_LensFlare:
29 | m_Mode: 1
30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
31 | m_AlwaysIncludedShaders:
32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
41 | m_PreloadedShaders: []
42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
43 | type: 0}
44 | m_CustomRenderPipeline: {fileID: 0}
45 | m_TransparencySortMode: 0
46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1}
47 | m_DefaultRenderingPath: 1
48 | m_DefaultMobileRenderingPath: 1
49 | m_TierSettings: []
50 | m_LightmapStripping: 0
51 | m_FogStripping: 0
52 | m_InstancingStripping: 0
53 | m_LightmapKeepPlain: 1
54 | m_LightmapKeepDirCombined: 1
55 | m_LightmapKeepDynamicPlain: 1
56 | m_LightmapKeepDynamicDirCombined: 1
57 | m_LightmapKeepShadowMask: 1
58 | m_LightmapKeepSubtractive: 1
59 | m_FogKeepLinear: 1
60 | m_FogKeepExp: 1
61 | m_FogKeepExp2: 1
62 | m_AlbedoSwatchInfos: []
63 | m_LightsUseLinearIntensity: 0
64 | m_LightsUseColorTemperature: 0
65 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace HelloSpiral.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HelloSpiral.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
65 | ///
66 | internal static System.Drawing.Icon Icon1 {
67 | get {
68 | object obj = ResourceManager.GetObject("Icon1", resourceCulture);
69 | return ((System.Drawing.Icon)(obj));
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Live-0003 Batch Automation with RhinoScript Python/README.md:
--------------------------------------------------------------------------------
1 | # Batch Automation with RhinoScript Python
2 |
3 | ## Requirements
4 | - Rhinoceros 6
5 |
6 | ## Reference pages
7 | - RhinoScriptSyntax: https://developer.rhino3d.com/api/RhinoScriptSyntax/
8 | - Find files in directory: https://stackoverflow.com/questions/3964681/find-all-files-in-a-directory-with-extension-txt-in-python
9 |
10 | ## Audience target
11 | - Beginner in RhinoScript and want to learn the basics of batch automation.
12 |
13 | ## What you will learn
14 | - Basics of RhinoScript Python.
15 | - Reuse function saved in external python file.
16 | - How to batch import files.
17 | - How to batch export files.
18 |
19 | ## Step 1: Define function to create bunch of rotated boxes.
20 |
21 | ```python
22 | import rhinoscriptsyntax as rs
23 | import Rhino.Geometry as geo
24 | import math
25 |
26 | def Run(xNum, yNum):
27 | if xNum is None:
28 | rs.MessageBox("No number provided for x")
29 | return
30 | if yNum is None:
31 | rs.MessageBox("No number provided for y")
32 | return
33 |
34 | rs.EnableRedraw(False)
35 | boxes = []
36 | for i in range(xNum):
37 | for n in range(yNum):
38 | points = []
39 | for s in range(2):
40 | for t in range(4):
41 | x = math.cos(math.radians(45 + 90 * t)) * math.sqrt(2)
42 | y = math.sin(math.radians(45 + 90 * t)) * math.sqrt(2)
43 | z = -1 + 2 * s
44 | point = geo.Point3d(x, y, z)
45 | points.append(point)
46 | box = rs.AddBox(points)
47 |
48 | box = rs.RotateObject(box, geo.Point3d(0,0,0), 90 / (xNum - 1) * i, geo.Vector3d.ZAxis)
49 | box = rs.RotateObject(box, geo.Point3d(0,0,0), 90 / (yNum - 1) * n, geo.Vector3d.XAxis)
50 |
51 | box = rs.MoveObject(box, geo.Vector3d(4 * i, 4 * n, 0))
52 | boxes.append(box)
53 | rs.EnableRedraw(True)
54 |
55 | return boxes
56 | ```
57 |
58 | ## Step 2: Define function to export objects to files.
59 |
60 | ```python
61 | import rhinoscriptsyntax as rs
62 |
63 | def Run(objs, dir, ext):
64 | rs.EnableRedraw(False)
65 | rs.UnselectAllObjects()
66 | for i in range(len(objs)):
67 | obj = objs[i]
68 | filepath = dir + "/exported" + str(i) + "." + ext
69 | rs.SelectObject(obj)
70 | rs.Command("!_-Export \"" + filepath + "\" -Enter -Enter")
71 | rs.UnselectAllObjects()
72 | rs.EnableRedraw(True)
73 | ```
74 |
75 | ## Step 3: Define function to import files.
76 |
77 | ```python
78 | import rhinoscriptsyntax as rs
79 | import os
80 |
81 | def Run(dir, ext):
82 | if dir is None:
83 | rs.MessageBox("No directory path defied")
84 | return
85 |
86 | files = []
87 | for file in os.listdir(dir):
88 | if file.endswith("." + ext):
89 | files.append(dir + "/" + file)
90 |
91 | rs.EnableRedraw(False)
92 | rs.UnselectAllObjects()
93 | importedObjs = []
94 | for filepath in files:
95 | rs.Command("!_-Import \"" + filepath + "\" -Enter -Enter")
96 | selectedObjs = rs.SelectedObjects()
97 | importedObjs.extend(selectedObjs)
98 | rs.UnselectAllObjects()
99 | rs.EnableRedraw(True)
100 |
101 | return importedObjs
102 | ```
103 |
104 | ## Step 4: Create boxes and export them as files.
105 |
106 | ```python
107 | import rhinoscriptsyntax as rs
108 | import createBox
109 | import exportObjs
110 |
111 | xNum = rs.GetInteger("X number", 5, 1)
112 | yNum = rs.GetInteger("Y number", 5, 1)
113 | boxes = createBox.Run(xNum, yNum)
114 | if boxes is None or len(boxes) == 0:
115 | rs.MessageBox("No objects to export")
116 | else:
117 | dir = rs.BrowseForFolder(None, "Select a folder to save files")
118 | exportObjs.Run(boxes, dir, "3dm")
119 |
120 | ```
121 |
122 | ## Step 5: Import exported files and export them again in different file format.
123 |
124 | ```python
125 | import rhinoscriptsyntax as rs
126 | import importObjs
127 | import exportObjs
128 |
129 | dir = rs.BrowseForFolder(None, "Select folder which contains objects you want to import")
130 | objs = importObjs.Run(dir, "3dm")
131 | exportObjs.Run(objs, dir, "obj")
132 | rs.DeleteObjects(objs)
133 |
134 | ```
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/HelloSpiral.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {EEC8761A-D901-4DA0-9BF5-D36CF2406943}
9 | Library
10 | Properties
11 | HelloSpiral
12 | HelloSpiral
13 | v4.5
14 | 512
15 | false
16 |
17 |
18 | true
19 | full
20 | false
21 | C:\Users\jhorikawa\AppData\Roaming\Grasshopper\Libraries\
22 | DEBUG;TRACE
23 | prompt
24 | false
25 |
26 |
27 | pdbonly
28 | true
29 | bin\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | False
44 | C:\Program Files\Rhino 6\System\rhinocommon.dll
45 | False
46 |
47 |
48 | False
49 | C:\Program Files\Rhino 6\Plug-ins\Grasshopper\Grasshopper.dll
50 | False
51 |
52 |
53 | False
54 | C:\Program Files\Rhino 6\Plug-ins\Grasshopper\GH_IO.dll
55 | False
56 |
57 |
58 |
59 |
60 | True
61 | True
62 | Resources.resx
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | ResXFileCodeGenerator
71 | Resources.Designer.cs
72 |
73 |
74 |
75 |
76 |
77 |
78 |
85 |
86 | Copy "$(TargetPath)" "$(TargetDir)$(ProjectName).gha"
87 | Erase "$(TargetPath)"
88 |
89 |
90 | en-US
91 |
92 |
93 | C:\Program Files\Rhino 6\System\Rhino.exe
94 |
95 |
96 | Program
97 |
98 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scripts/TestCompute.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using UnityEngine;
5 | using Rhino.Compute;
6 | using Rhino;
7 |
8 | public class TestCompute : MonoBehaviour
9 | {
10 | public string authToken;
11 | public Material mat;
12 | private Rhino.FileIO.File3dm model;
13 |
14 | private float prevHeight, prevPipeRad, prevSegments, prevAngle;
15 | private float height = 10f;
16 | private float pipeRad = 2f;
17 | private int segments = 5;
18 | private float angle = 30f;
19 |
20 |
21 |
22 | // Start is called before the first frame update
23 | void Start()
24 | {
25 | ComputeServer.AuthToken = authToken;
26 | ComputeServer.WebAddress = "http://127.0.0.1:8081/";
27 | }
28 |
29 | // Update is called once per frame
30 | void Update()
31 | {
32 | bool updateGeo = false;
33 | if(prevHeight != height)
34 | {
35 | updateGeo = true;
36 | prevHeight = height;
37 | }
38 |
39 | if(prevAngle != angle)
40 | {
41 | updateGeo = true;
42 | prevAngle = angle;
43 | }
44 |
45 | if(prevPipeRad != pipeRad)
46 | {
47 | updateGeo = true;
48 | prevPipeRad = pipeRad;
49 | }
50 |
51 | if(prevSegments != segments)
52 | {
53 | updateGeo = true;
54 | prevSegments = segments;
55 | }
56 |
57 |
58 | if (updateGeo)
59 | {
60 | DeleteMeshes();
61 |
62 | GenerateGeo();
63 | }
64 | }
65 |
66 | private void DeleteMeshes()
67 | {
68 | var objs = GameObject.FindObjectsOfType();
69 | foreach (var obj in objs)
70 | {
71 | Destroy(obj.mesh);
72 | Destroy(obj.gameObject);
73 | }
74 | Resources.UnloadUnusedAssets();
75 | }
76 |
77 | private void GenerateGeo()
78 | {
79 | model = new Rhino.FileIO.File3dm();
80 |
81 | int num = 10;
82 | float outerRad = 2f;
83 |
84 | var curves = new List();
85 | for (int i = 0; i < num; i++)
86 | {
87 | var pt = new Rhino.Geometry.Point3d(0, 0, height / (num - 1) * i);
88 | var circle = new Rhino.Geometry.Circle(pt, pipeRad);
89 | var polygon = Rhino.Geometry.Polyline.CreateInscribedPolygon(circle, segments);
90 | var curve = polygon.ToNurbsCurve();
91 | curve.Rotate(i * Mathf.Deg2Rad * angle, new Rhino.Geometry.Vector3d(0, 0, 1), new Rhino.Geometry.Point3d(0, 0, 0));
92 | curve.Translate(new Rhino.Geometry.Vector3d(Mathf.Cos(Mathf.Deg2Rad * angle * i), Mathf.Sin(Mathf.Deg2Rad * angle * i), 0) * outerRad);
93 | curves.Add(curve);
94 | }
95 |
96 | var breps = BrepCompute.CreateFromLoft(curves, Rhino.Geometry.Point3d.Unset, Rhino.Geometry.Point3d.Unset, Rhino.Geometry.LoftType.Normal, false);
97 |
98 | var meshList = new List();
99 | foreach (var brep in breps)
100 | {
101 | var brep2 = brep.CapPlanarHoles(0.001);
102 | var meshes = MeshCompute.CreateFromBrep(brep2);
103 | meshList.AddRange(meshes.ToList());
104 |
105 | model.Objects.AddBrep(brep2);
106 | }
107 |
108 | foreach (var mesh in meshList)
109 | {
110 |
111 | Mesh meshObj = new Mesh();
112 |
113 | var vertices = new List();
114 | foreach (var meshVertex in mesh.Vertices)
115 | {
116 | var vertex = new Vector3(meshVertex.X, meshVertex.Z, meshVertex.Y);
117 | vertices.Add(vertex);
118 | }
119 |
120 | var triangles = new List();
121 | foreach (var meshFace in mesh.Faces)
122 | {
123 | if (meshFace.IsTriangle)
124 | {
125 | triangles.Add(meshFace.C);
126 | triangles.Add(meshFace.B);
127 | triangles.Add(meshFace.A);
128 | }
129 | else if (meshFace.IsQuad)
130 | {
131 | triangles.Add(meshFace.C);
132 | triangles.Add(meshFace.B);
133 | triangles.Add(meshFace.A);
134 | triangles.Add(meshFace.D);
135 | triangles.Add(meshFace.C);
136 | triangles.Add(meshFace.A);
137 | }
138 | }
139 |
140 | var normals = new List();
141 | foreach(var normal in mesh.Normals)
142 | {
143 | normals.Add(new Vector3(normal.X, normal.Z, normal.Y));
144 | }
145 |
146 | meshObj.vertices = vertices.ToArray();
147 | meshObj.triangles = triangles.ToArray();
148 | meshObj.normals = normals.ToArray();
149 |
150 |
151 | GameObject gb = new GameObject();
152 | gb.AddComponent().mesh = meshObj;
153 | gb.AddComponent().material = mat;
154 | }
155 |
156 |
157 |
158 | }
159 |
160 | private void OnGUI()
161 | {
162 | GUI.Label(new Rect(10f, 10f, 90, 20), "Height");
163 | height = GUI.HorizontalSlider(new Rect(100, 15, 100, 20), height, 1f, 20f);
164 |
165 | GUI.Label(new Rect(10f, 30f, 90, 20), "Radius");
166 | pipeRad = GUI.HorizontalSlider(new Rect(100, 35, 100, 20), pipeRad, 0.5f, 5f);
167 |
168 | GUI.Label(new Rect(10f, 50f, 90, 20), "Angle");
169 | angle = GUI.HorizontalSlider(new Rect(100, 55, 100, 20), angle, 0, 90f);
170 |
171 | GUI.Label(new Rect(10f, 70f, 90, 20), "Segments");
172 | segments = (int)GUI.HorizontalSlider(new Rect(100, 75, 100, 20), segments, 3, 8);
173 |
174 | if(GUI.Button(new Rect(10f, 100f, 50, 20), "Save"))
175 | {
176 | if(model != null)
177 | {
178 | var path = Application.dataPath + "/../Outputs/model.3dm";
179 | model.Write(path, 5);
180 | }
181 | }
182 | }
183 | }
184 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\Icon1.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 |
56 | # StyleCop
57 | StyleCopReport.xml
58 |
59 | # Files built by Visual Studio
60 | *_i.c
61 | *_p.c
62 | *_i.h
63 | *.ilk
64 | *.meta
65 | *.obj
66 | *.iobj
67 | *.pch
68 | *.pdb
69 | *.ipdb
70 | *.pgc
71 | *.pgd
72 | *.rsp
73 | *.sbr
74 | *.tlb
75 | *.tli
76 | *.tlh
77 | *.tmp
78 | *.tmp_proj
79 | *.log
80 | *.vspscc
81 | *.vssscc
82 | .builds
83 | *.pidb
84 | *.svclog
85 | *.scc
86 |
87 | # Chutzpah Test files
88 | _Chutzpah*
89 |
90 | # Visual C++ cache files
91 | ipch/
92 | *.aps
93 | *.ncb
94 | *.opendb
95 | *.opensdf
96 | *.sdf
97 | *.cachefile
98 | *.VC.db
99 | *.VC.VC.opendb
100 |
101 | # Visual Studio profiler
102 | *.psess
103 | *.vsp
104 | *.vspx
105 | *.sap
106 |
107 | # Visual Studio Trace Files
108 | *.e2e
109 |
110 | # TFS 2012 Local Workspace
111 | $tf/
112 |
113 | # Guidance Automation Toolkit
114 | *.gpState
115 |
116 | # ReSharper is a .NET coding add-in
117 | _ReSharper*/
118 | *.[Rr]e[Ss]harper
119 | *.DotSettings.user
120 |
121 | # JustCode is a .NET coding add-in
122 | .JustCode
123 |
124 | # TeamCity is a build add-in
125 | _TeamCity*
126 |
127 | # DotCover is a Code Coverage Tool
128 | *.dotCover
129 |
130 | # AxoCover is a Code Coverage Tool
131 | .axoCover/*
132 | !.axoCover/settings.json
133 |
134 | # Visual Studio code coverage results
135 | *.coverage
136 | *.coveragexml
137 |
138 | # NCrunch
139 | _NCrunch_*
140 | .*crunch*.local.xml
141 | nCrunchTemp_*
142 |
143 | # MightyMoose
144 | *.mm.*
145 | AutoTest.Net/
146 |
147 | # Web workbench (sass)
148 | .sass-cache/
149 |
150 | # Installshield output folder
151 | [Ee]xpress/
152 |
153 | # DocProject is a documentation generator add-in
154 | DocProject/buildhelp/
155 | DocProject/Help/*.HxT
156 | DocProject/Help/*.HxC
157 | DocProject/Help/*.hhc
158 | DocProject/Help/*.hhk
159 | DocProject/Help/*.hhp
160 | DocProject/Help/Html2
161 | DocProject/Help/html
162 |
163 | # Click-Once directory
164 | publish/
165 |
166 | # Publish Web Output
167 | *.[Pp]ublish.xml
168 | *.azurePubxml
169 | # Note: Comment the next line if you want to checkin your web deploy settings,
170 | # but database connection strings (with potential passwords) will be unencrypted
171 | *.pubxml
172 | *.publishproj
173 |
174 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
175 | # checkin your Azure Web App publish settings, but sensitive information contained
176 | # in these scripts will be unencrypted
177 | PublishScripts/
178 |
179 | # NuGet Packages
180 | *.nupkg
181 | # The packages folder can be ignored because of Package Restore
182 | **/[Pp]ackages/*
183 | # except build/, which is used as an MSBuild target.
184 | !**/[Pp]ackages/build/
185 | # Uncomment if necessary however generally it will be regenerated when needed
186 | #!**/[Pp]ackages/repositories.config
187 | # NuGet v3's project.json files produces more ignorable files
188 | *.nuget.props
189 | *.nuget.targets
190 |
191 | # Microsoft Azure Build Output
192 | csx/
193 | *.build.csdef
194 |
195 | # Microsoft Azure Emulator
196 | ecf/
197 | rcf/
198 |
199 | # Windows Store app package directories and files
200 | AppPackages/
201 | BundleArtifacts/
202 | Package.StoreAssociation.xml
203 | _pkginfo.txt
204 | *.appx
205 |
206 | # Visual Studio cache files
207 | # files ending in .cache can be ignored
208 | *.[Cc]ache
209 | # but keep track of directories ending in .cache
210 | !*.[Cc]ache/
211 |
212 | # Others
213 | ClientBin/
214 | ~$*
215 | *~
216 | *.dbmdl
217 | *.dbproj.schemaview
218 | *.jfm
219 | *.pfx
220 | *.publishsettings
221 | orleans.codegen.cs
222 |
223 | # Including strong name files can present a security risk
224 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
225 | #*.snk
226 |
227 | # Since there are multiple workflows, uncomment next line to ignore bower_components
228 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
229 | #bower_components/
230 |
231 | # RIA/Silverlight projects
232 | Generated_Code/
233 |
234 | # Backup & report files from converting an old project file
235 | # to a newer Visual Studio version. Backup files are not needed,
236 | # because we have git ;-)
237 | _UpgradeReport_Files/
238 | Backup*/
239 | UpgradeLog*.XML
240 | UpgradeLog*.htm
241 | ServiceFabricBackup/
242 | *.rptproj.bak
243 |
244 | # SQL Server files
245 | *.mdf
246 | *.ldf
247 | *.ndf
248 |
249 | # Business Intelligence projects
250 | *.rdl.data
251 | *.bim.layout
252 | *.bim_*.settings
253 | *.rptproj.rsuser
254 |
255 | # Microsoft Fakes
256 | FakesAssemblies/
257 |
258 | # GhostDoc plugin setting file
259 | *.GhostDoc.xml
260 |
261 | # Node.js Tools for Visual Studio
262 | .ntvs_analysis.dat
263 | node_modules/
264 |
265 | # Visual Studio 6 build log
266 | *.plg
267 |
268 | # Visual Studio 6 workspace options file
269 | *.opt
270 |
271 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
272 | *.vbw
273 |
274 | # Visual Studio LightSwitch build output
275 | **/*.HTMLClient/GeneratedArtifacts
276 | **/*.DesktopClient/GeneratedArtifacts
277 | **/*.DesktopClient/ModelManifest.xml
278 | **/*.Server/GeneratedArtifacts
279 | **/*.Server/ModelManifest.xml
280 | _Pvt_Extensions
281 |
282 | # Paket dependency manager
283 | .paket/paket.exe
284 | paket-files/
285 |
286 | # FAKE - F# Make
287 | .fake/
288 |
289 | # JetBrains Rider
290 | .idea/
291 | *.sln.iml
292 |
293 | # CodeRush
294 | .cr/
295 |
296 | # Python Tools for Visual Studio (PTVS)
297 | __pycache__/
298 | *.pyc
299 |
300 | # Cake - Uncomment if you are using it
301 | # tools/**
302 | # !tools/packages.config
303 |
304 | # Tabs Studio
305 | *.tss
306 |
307 | # Telerik's JustMock configuration file
308 | *.jmconfig
309 |
310 | # BizTalk build output
311 | *.btp.cs
312 | *.btm.cs
313 | *.odx.cs
314 | *.xsd.cs
315 |
316 | # OpenCover UI analysis results
317 | OpenCover/
318 |
319 | # Azure Stream Analytics local run output
320 | ASALocalRun/
321 |
322 | # MSBuild Binary and Structured Log
323 | *.binlog
324 |
325 | # NVidia Nsight GPU debugger configuration file
326 | *.nvuser
327 |
328 | # MFractors (Xamarin productivity tool) working folder
329 | .mfractor/
330 |
331 | */reference/
332 | *.cloudf
333 |
334 | temp/
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!13 &1
4 | InputManager:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_Axes:
8 | - serializedVersion: 3
9 | m_Name: Horizontal
10 | descriptiveName:
11 | descriptiveNegativeName:
12 | negativeButton: left
13 | positiveButton: right
14 | altNegativeButton: a
15 | altPositiveButton: d
16 | gravity: 3
17 | dead: 0.001
18 | sensitivity: 3
19 | snap: 1
20 | invert: 0
21 | type: 0
22 | axis: 0
23 | joyNum: 0
24 | - serializedVersion: 3
25 | m_Name: Vertical
26 | descriptiveName:
27 | descriptiveNegativeName:
28 | negativeButton: down
29 | positiveButton: up
30 | altNegativeButton: s
31 | altPositiveButton: w
32 | gravity: 3
33 | dead: 0.001
34 | sensitivity: 3
35 | snap: 1
36 | invert: 0
37 | type: 0
38 | axis: 0
39 | joyNum: 0
40 | - serializedVersion: 3
41 | m_Name: Fire1
42 | descriptiveName:
43 | descriptiveNegativeName:
44 | negativeButton:
45 | positiveButton: left ctrl
46 | altNegativeButton:
47 | altPositiveButton: mouse 0
48 | gravity: 1000
49 | dead: 0.001
50 | sensitivity: 1000
51 | snap: 0
52 | invert: 0
53 | type: 0
54 | axis: 0
55 | joyNum: 0
56 | - serializedVersion: 3
57 | m_Name: Fire2
58 | descriptiveName:
59 | descriptiveNegativeName:
60 | negativeButton:
61 | positiveButton: left alt
62 | altNegativeButton:
63 | altPositiveButton: mouse 1
64 | gravity: 1000
65 | dead: 0.001
66 | sensitivity: 1000
67 | snap: 0
68 | invert: 0
69 | type: 0
70 | axis: 0
71 | joyNum: 0
72 | - serializedVersion: 3
73 | m_Name: Fire3
74 | descriptiveName:
75 | descriptiveNegativeName:
76 | negativeButton:
77 | positiveButton: left shift
78 | altNegativeButton:
79 | altPositiveButton: mouse 2
80 | gravity: 1000
81 | dead: 0.001
82 | sensitivity: 1000
83 | snap: 0
84 | invert: 0
85 | type: 0
86 | axis: 0
87 | joyNum: 0
88 | - serializedVersion: 3
89 | m_Name: Jump
90 | descriptiveName:
91 | descriptiveNegativeName:
92 | negativeButton:
93 | positiveButton: space
94 | altNegativeButton:
95 | altPositiveButton:
96 | gravity: 1000
97 | dead: 0.001
98 | sensitivity: 1000
99 | snap: 0
100 | invert: 0
101 | type: 0
102 | axis: 0
103 | joyNum: 0
104 | - serializedVersion: 3
105 | m_Name: Mouse X
106 | descriptiveName:
107 | descriptiveNegativeName:
108 | negativeButton:
109 | positiveButton:
110 | altNegativeButton:
111 | altPositiveButton:
112 | gravity: 0
113 | dead: 0
114 | sensitivity: 0.1
115 | snap: 0
116 | invert: 0
117 | type: 1
118 | axis: 0
119 | joyNum: 0
120 | - serializedVersion: 3
121 | m_Name: Mouse Y
122 | descriptiveName:
123 | descriptiveNegativeName:
124 | negativeButton:
125 | positiveButton:
126 | altNegativeButton:
127 | altPositiveButton:
128 | gravity: 0
129 | dead: 0
130 | sensitivity: 0.1
131 | snap: 0
132 | invert: 0
133 | type: 1
134 | axis: 1
135 | joyNum: 0
136 | - serializedVersion: 3
137 | m_Name: Mouse ScrollWheel
138 | descriptiveName:
139 | descriptiveNegativeName:
140 | negativeButton:
141 | positiveButton:
142 | altNegativeButton:
143 | altPositiveButton:
144 | gravity: 0
145 | dead: 0
146 | sensitivity: 0.1
147 | snap: 0
148 | invert: 0
149 | type: 1
150 | axis: 2
151 | joyNum: 0
152 | - serializedVersion: 3
153 | m_Name: Horizontal
154 | descriptiveName:
155 | descriptiveNegativeName:
156 | negativeButton:
157 | positiveButton:
158 | altNegativeButton:
159 | altPositiveButton:
160 | gravity: 0
161 | dead: 0.19
162 | sensitivity: 1
163 | snap: 0
164 | invert: 0
165 | type: 2
166 | axis: 0
167 | joyNum: 0
168 | - serializedVersion: 3
169 | m_Name: Vertical
170 | descriptiveName:
171 | descriptiveNegativeName:
172 | negativeButton:
173 | positiveButton:
174 | altNegativeButton:
175 | altPositiveButton:
176 | gravity: 0
177 | dead: 0.19
178 | sensitivity: 1
179 | snap: 0
180 | invert: 1
181 | type: 2
182 | axis: 1
183 | joyNum: 0
184 | - serializedVersion: 3
185 | m_Name: Fire1
186 | descriptiveName:
187 | descriptiveNegativeName:
188 | negativeButton:
189 | positiveButton: joystick button 0
190 | altNegativeButton:
191 | altPositiveButton:
192 | gravity: 1000
193 | dead: 0.001
194 | sensitivity: 1000
195 | snap: 0
196 | invert: 0
197 | type: 0
198 | axis: 0
199 | joyNum: 0
200 | - serializedVersion: 3
201 | m_Name: Fire2
202 | descriptiveName:
203 | descriptiveNegativeName:
204 | negativeButton:
205 | positiveButton: joystick button 1
206 | altNegativeButton:
207 | altPositiveButton:
208 | gravity: 1000
209 | dead: 0.001
210 | sensitivity: 1000
211 | snap: 0
212 | invert: 0
213 | type: 0
214 | axis: 0
215 | joyNum: 0
216 | - serializedVersion: 3
217 | m_Name: Fire3
218 | descriptiveName:
219 | descriptiveNegativeName:
220 | negativeButton:
221 | positiveButton: joystick button 2
222 | altNegativeButton:
223 | altPositiveButton:
224 | gravity: 1000
225 | dead: 0.001
226 | sensitivity: 1000
227 | snap: 0
228 | invert: 0
229 | type: 0
230 | axis: 0
231 | joyNum: 0
232 | - serializedVersion: 3
233 | m_Name: Jump
234 | descriptiveName:
235 | descriptiveNegativeName:
236 | negativeButton:
237 | positiveButton: joystick button 3
238 | altNegativeButton:
239 | altPositiveButton:
240 | gravity: 1000
241 | dead: 0.001
242 | sensitivity: 1000
243 | snap: 0
244 | invert: 0
245 | type: 0
246 | axis: 0
247 | joyNum: 0
248 | - serializedVersion: 3
249 | m_Name: Submit
250 | descriptiveName:
251 | descriptiveNegativeName:
252 | negativeButton:
253 | positiveButton: return
254 | altNegativeButton:
255 | altPositiveButton: joystick button 0
256 | gravity: 1000
257 | dead: 0.001
258 | sensitivity: 1000
259 | snap: 0
260 | invert: 0
261 | type: 0
262 | axis: 0
263 | joyNum: 0
264 | - serializedVersion: 3
265 | m_Name: Submit
266 | descriptiveName:
267 | descriptiveNegativeName:
268 | negativeButton:
269 | positiveButton: enter
270 | altNegativeButton:
271 | altPositiveButton: space
272 | gravity: 1000
273 | dead: 0.001
274 | sensitivity: 1000
275 | snap: 0
276 | invert: 0
277 | type: 0
278 | axis: 0
279 | joyNum: 0
280 | - serializedVersion: 3
281 | m_Name: Cancel
282 | descriptiveName:
283 | descriptiveNegativeName:
284 | negativeButton:
285 | positiveButton: escape
286 | altNegativeButton:
287 | altPositiveButton: joystick button 1
288 | gravity: 1000
289 | dead: 0.001
290 | sensitivity: 1000
291 | snap: 0
292 | invert: 0
293 | type: 0
294 | axis: 0
295 | joyNum: 0
296 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | Nintendo 3DS: 5
223 | Nintendo Switch: 5
224 | PS4: 5
225 | PSP2: 2
226 | Standalone: 5
227 | WebGL: 3
228 | Windows Store Apps: 5
229 | XboxOne: 5
230 | iPhone: 2
231 | tvOS: 2
232 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!47 &1
4 | QualitySettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 5
7 | m_CurrentQuality: 5
8 | m_QualitySettings:
9 | - serializedVersion: 2
10 | name: Very Low
11 | pixelLightCount: 0
12 | shadows: 0
13 | shadowResolution: 0
14 | shadowProjection: 1
15 | shadowCascades: 1
16 | shadowDistance: 15
17 | shadowNearPlaneOffset: 3
18 | shadowCascade2Split: 0.33333334
19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
20 | shadowmaskMode: 0
21 | blendWeights: 1
22 | textureQuality: 1
23 | anisotropicTextures: 0
24 | antiAliasing: 0
25 | softParticles: 0
26 | softVegetation: 0
27 | realtimeReflectionProbes: 0
28 | billboardsFaceCameraPosition: 0
29 | vSyncCount: 0
30 | lodBias: 0.3
31 | maximumLODLevel: 0
32 | streamingMipmapsActive: 0
33 | streamingMipmapsAddAllCameras: 1
34 | streamingMipmapsMemoryBudget: 512
35 | streamingMipmapsRenderersPerFrame: 512
36 | streamingMipmapsMaxLevelReduction: 2
37 | streamingMipmapsMaxFileIORequests: 1024
38 | particleRaycastBudget: 4
39 | asyncUploadTimeSlice: 2
40 | asyncUploadBufferSize: 16
41 | asyncUploadPersistentBuffer: 1
42 | resolutionScalingFixedDPIFactor: 1
43 | excludedTargetPlatforms: []
44 | - serializedVersion: 2
45 | name: Low
46 | pixelLightCount: 0
47 | shadows: 0
48 | shadowResolution: 0
49 | shadowProjection: 1
50 | shadowCascades: 1
51 | shadowDistance: 20
52 | shadowNearPlaneOffset: 3
53 | shadowCascade2Split: 0.33333334
54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
55 | shadowmaskMode: 0
56 | blendWeights: 2
57 | textureQuality: 0
58 | anisotropicTextures: 0
59 | antiAliasing: 0
60 | softParticles: 0
61 | softVegetation: 0
62 | realtimeReflectionProbes: 0
63 | billboardsFaceCameraPosition: 0
64 | vSyncCount: 0
65 | lodBias: 0.4
66 | maximumLODLevel: 0
67 | streamingMipmapsActive: 0
68 | streamingMipmapsAddAllCameras: 1
69 | streamingMipmapsMemoryBudget: 512
70 | streamingMipmapsRenderersPerFrame: 512
71 | streamingMipmapsMaxLevelReduction: 2
72 | streamingMipmapsMaxFileIORequests: 1024
73 | particleRaycastBudget: 16
74 | asyncUploadTimeSlice: 2
75 | asyncUploadBufferSize: 16
76 | asyncUploadPersistentBuffer: 1
77 | resolutionScalingFixedDPIFactor: 1
78 | excludedTargetPlatforms: []
79 | - serializedVersion: 2
80 | name: Medium
81 | pixelLightCount: 1
82 | shadows: 1
83 | shadowResolution: 0
84 | shadowProjection: 1
85 | shadowCascades: 1
86 | shadowDistance: 20
87 | shadowNearPlaneOffset: 3
88 | shadowCascade2Split: 0.33333334
89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
90 | shadowmaskMode: 0
91 | blendWeights: 2
92 | textureQuality: 0
93 | anisotropicTextures: 1
94 | antiAliasing: 0
95 | softParticles: 0
96 | softVegetation: 0
97 | realtimeReflectionProbes: 0
98 | billboardsFaceCameraPosition: 0
99 | vSyncCount: 1
100 | lodBias: 0.7
101 | maximumLODLevel: 0
102 | streamingMipmapsActive: 0
103 | streamingMipmapsAddAllCameras: 1
104 | streamingMipmapsMemoryBudget: 512
105 | streamingMipmapsRenderersPerFrame: 512
106 | streamingMipmapsMaxLevelReduction: 2
107 | streamingMipmapsMaxFileIORequests: 1024
108 | particleRaycastBudget: 64
109 | asyncUploadTimeSlice: 2
110 | asyncUploadBufferSize: 16
111 | asyncUploadPersistentBuffer: 1
112 | resolutionScalingFixedDPIFactor: 1
113 | excludedTargetPlatforms: []
114 | - serializedVersion: 2
115 | name: High
116 | pixelLightCount: 2
117 | shadows: 2
118 | shadowResolution: 1
119 | shadowProjection: 1
120 | shadowCascades: 2
121 | shadowDistance: 40
122 | shadowNearPlaneOffset: 3
123 | shadowCascade2Split: 0.33333334
124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
125 | shadowmaskMode: 1
126 | blendWeights: 2
127 | textureQuality: 0
128 | anisotropicTextures: 1
129 | antiAliasing: 0
130 | softParticles: 0
131 | softVegetation: 1
132 | realtimeReflectionProbes: 1
133 | billboardsFaceCameraPosition: 1
134 | vSyncCount: 1
135 | lodBias: 1
136 | maximumLODLevel: 0
137 | streamingMipmapsActive: 0
138 | streamingMipmapsAddAllCameras: 1
139 | streamingMipmapsMemoryBudget: 512
140 | streamingMipmapsRenderersPerFrame: 512
141 | streamingMipmapsMaxLevelReduction: 2
142 | streamingMipmapsMaxFileIORequests: 1024
143 | particleRaycastBudget: 256
144 | asyncUploadTimeSlice: 2
145 | asyncUploadBufferSize: 16
146 | asyncUploadPersistentBuffer: 1
147 | resolutionScalingFixedDPIFactor: 1
148 | excludedTargetPlatforms: []
149 | - serializedVersion: 2
150 | name: Very High
151 | pixelLightCount: 3
152 | shadows: 2
153 | shadowResolution: 2
154 | shadowProjection: 1
155 | shadowCascades: 2
156 | shadowDistance: 70
157 | shadowNearPlaneOffset: 3
158 | shadowCascade2Split: 0.33333334
159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
160 | shadowmaskMode: 1
161 | blendWeights: 4
162 | textureQuality: 0
163 | anisotropicTextures: 2
164 | antiAliasing: 2
165 | softParticles: 1
166 | softVegetation: 1
167 | realtimeReflectionProbes: 1
168 | billboardsFaceCameraPosition: 1
169 | vSyncCount: 1
170 | lodBias: 1.5
171 | maximumLODLevel: 0
172 | streamingMipmapsActive: 0
173 | streamingMipmapsAddAllCameras: 1
174 | streamingMipmapsMemoryBudget: 512
175 | streamingMipmapsRenderersPerFrame: 512
176 | streamingMipmapsMaxLevelReduction: 2
177 | streamingMipmapsMaxFileIORequests: 1024
178 | particleRaycastBudget: 1024
179 | asyncUploadTimeSlice: 2
180 | asyncUploadBufferSize: 16
181 | asyncUploadPersistentBuffer: 1
182 | resolutionScalingFixedDPIFactor: 1
183 | excludedTargetPlatforms: []
184 | - serializedVersion: 2
185 | name: Ultra
186 | pixelLightCount: 4
187 | shadows: 2
188 | shadowResolution: 2
189 | shadowProjection: 1
190 | shadowCascades: 4
191 | shadowDistance: 150
192 | shadowNearPlaneOffset: 3
193 | shadowCascade2Split: 0.33333334
194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
195 | shadowmaskMode: 1
196 | blendWeights: 4
197 | textureQuality: 0
198 | anisotropicTextures: 2
199 | antiAliasing: 2
200 | softParticles: 1
201 | softVegetation: 1
202 | realtimeReflectionProbes: 1
203 | billboardsFaceCameraPosition: 1
204 | vSyncCount: 1
205 | lodBias: 2
206 | maximumLODLevel: 0
207 | streamingMipmapsActive: 0
208 | streamingMipmapsAddAllCameras: 1
209 | streamingMipmapsMemoryBudget: 512
210 | streamingMipmapsRenderersPerFrame: 512
211 | streamingMipmapsMaxLevelReduction: 2
212 | streamingMipmapsMaxFileIORequests: 1024
213 | particleRaycastBudget: 4096
214 | asyncUploadTimeSlice: 2
215 | asyncUploadBufferSize: 16
216 | asyncUploadPersistentBuffer: 1
217 | resolutionScalingFixedDPIFactor: 1
218 | excludedTargetPlatforms: []
219 | m_PerPlatformDefaultQuality:
220 | Android: 2
221 | Lumin: 5
222 | Nintendo 3DS: 5
223 | Nintendo Switch: 5
224 | PS4: 5
225 | PSP2: 2
226 | Standalone: 5
227 | WebGL: 3
228 | Windows Store Apps: 5
229 | XboxOne: 5
230 | iPhone: 2
231 | tvOS: 2
232 |
--------------------------------------------------------------------------------
/0001 Basics of Grasshopper Plugin Development/HelloSpiral/HelloSpiral/SpiralComponent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using Grasshopper.Kernel;
5 | using Rhino.Geometry;
6 |
7 | // In order to load the result of this wizard, you will also need to
8 | // add the output bin/ folder of this project to the list of loaded
9 | // folder in Grasshopper.
10 | // You can use the _GrasshopperDeveloperSettings Rhino command for that.
11 |
12 | namespace HelloSpiral
13 | {
14 | public class SpiralComponent : GH_Component
15 | {
16 | ///
17 | /// Each implementation of GH_Component must provide a public
18 | /// constructor without any arguments.
19 | /// Category represents the Tab in which the component will appear,
20 | /// Subcategory the panel. If you use non-existing tab or panel names,
21 | /// new tabs/panels will automatically be created.
22 | ///
23 | public SpiralComponent()
24 | : base("Spiral", "Spi",
25 | "Create a spiral curve in z direction.",
26 | "HelloSpiral", "Primitive")
27 | {
28 | }
29 |
30 | ///
31 | /// Registers all the input parameters for this component.
32 | ///
33 | protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
34 | {
35 | // Use the pManager object to register your input parameters.
36 | // You can often supply default values when creating parameters.
37 | // All parameters must have the correct access type. If you want
38 | // to import lists or trees of values, modify the ParamAccess flag.
39 | pManager.AddPlaneParameter("Plane", "P", "Base plane for spiral", GH_ParamAccess.item, Plane.WorldXY);
40 | pManager.AddNumberParameter("Inner Radius", "R0", "Inner radius for spiral", GH_ParamAccess.item, 1.0);
41 | pManager.AddNumberParameter("Outer Radius", "R1", "Outer radius for spiral", GH_ParamAccess.item, 5.0);
42 | pManager.AddIntegerParameter("Turns", "T", "Number of turns between radii", GH_ParamAccess.item, 10);
43 | pManager.AddNumberParameter("Height", "H", "Height of the spiral", GH_ParamAccess.item, 20.0);
44 | pManager.AddIntegerParameter("Waves", "W", "Number of waves on the side of spiral", GH_ParamAccess.item, 2);
45 |
46 | // If you want to change properties of certain parameters,
47 | // you can use the pManager instance to access them by index:
48 | //pManager[0].Optional = true;
49 | }
50 |
51 | ///
52 | /// Registers all the output parameters for this component.
53 | ///
54 | protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
55 | {
56 | // Use the pManager object to register your output parameters.
57 | // Output parameters do not have default values, but they too must have the correct access type.
58 | pManager.AddCurveParameter("Spiral", "S", "Spiral curve", GH_ParamAccess.item);
59 |
60 | // Sometimes you want to hide a specific parameter from the Rhino preview.
61 | // You can use the HideParameter() method as a quick way:
62 | //pManager.HideParameter(0);
63 | }
64 |
65 | ///
66 | /// This is the method that actually does the work.
67 | ///
68 | /// The DA object can be used to retrieve data from input parameters and
69 | /// to store data in output parameters.
70 | protected override void SolveInstance(IGH_DataAccess DA)
71 | {
72 | // First, we need to retrieve all data from the input parameters.
73 | // We'll start by declaring variables and assigning them starting values.
74 | Plane plane = Plane.WorldXY;
75 | double radius0 = 0.0;
76 | double radius1 = 0.0;
77 | int turns = 0;
78 | double height = 0.0;
79 | int waves = 0;
80 |
81 | // Then we need to access the input parameters individually.
82 | // When data cannot be extracted from a parameter, we should abort this method.
83 | if (!DA.GetData(0, ref plane)) return;
84 | if (!DA.GetData(1, ref radius0)) return;
85 | if (!DA.GetData(2, ref radius1)) return;
86 | if (!DA.GetData(3, ref turns)) return;
87 | if (!DA.GetData(4, ref height)) return;
88 | if (!DA.GetData(5, ref waves)) return;
89 |
90 |
91 | // We should now validate the data and warn the user if invalid data is supplied.
92 | if (radius0 < 0.0)
93 | {
94 | AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Inner radius must be bigger than or equal to zero");
95 | return;
96 | }
97 | if (radius1 < 0.0)
98 | {
99 | AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Outer radius must be bigger than the inner radius");
100 | return;
101 | }
102 | if (turns <= 0)
103 | {
104 | AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Spiral turn count must be bigger than or equal to one");
105 | return;
106 | }
107 | if (waves < 0)
108 | {
109 | AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Waves must be more than zero");
110 | return;
111 | }
112 |
113 | // We're set to create the spiral now. To keep the size of the SolveInstance() method small,
114 | // The actual functionality will be in a different method:
115 | Curve spiral = CreateSpiral(plane, radius0, radius1, turns, height, waves);
116 |
117 | // Finally assign the spiral to the output parameter.
118 | DA.SetData(0, spiral);
119 | }
120 |
121 | private Curve CreateSpiral(Plane plane, double r0, double r1, Int32 turns, double height, Int32 waves)
122 | {
123 | Line line = new Line(plane.Origin, plane.Origin + plane.ZAxis * height);
124 |
125 | Point3d[] pts;
126 | line.ToNurbsCurve().DivideByCount(turns * 20, true, out pts);
127 |
128 | for(int i=0; i
147 | /// The Exposure property controls where in the panel a component icon
148 | /// will appear. There are seven possible locations (primary to septenary),
149 | /// each of which can be combined with the GH_Exposure.obscure flag, which
150 | /// ensures the component will only be visible on panel dropdowns.
151 | ///
152 | public override GH_Exposure Exposure
153 | {
154 | get { return GH_Exposure.primary; }
155 | }
156 |
157 | ///
158 | /// Provides an Icon for every component that will be visible in the User Interface.
159 | /// Icons need to be 24x24 pixels.
160 | ///
161 | protected override System.Drawing.Bitmap Icon
162 | {
163 | get
164 | {
165 | // You can add image files to your project resources and access them like this:
166 | //return Resources.IconForThisComponent;
167 | return HelloSpiral.Properties.Resources.Icon1.ToBitmap();
168 | }
169 | }
170 |
171 | ///
172 | /// Each component must have a unique Guid to identify it.
173 | /// It is vital this Guid doesn't change otherwise old ghx files
174 | /// that use the old ID will partially fail during loading.
175 | ///
176 | public override Guid ComponentGuid
177 | {
178 | get { return new Guid("159297ee-6747-4f6d-aa87-92b24a72520d"); }
179 | }
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/0003 compute.rhino3d with Unity/unity/Assets/Scenes/SampleScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 705507994}
41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 0
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 1
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 500
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 2
83 | m_PVRDenoiserTypeDirect: 0
84 | m_PVRDenoiserTypeIndirect: 0
85 | m_PVRDenoiserTypeAO: 0
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 0
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ShowResolutionOverlay: 1
98 | m_ExportTrainingData: 0
99 | m_LightingDataAsset: {fileID: 0}
100 | m_UseShadowmask: 1
101 | --- !u!196 &4
102 | NavMeshSettings:
103 | serializedVersion: 2
104 | m_ObjectHideFlags: 0
105 | m_BuildSettings:
106 | serializedVersion: 2
107 | agentTypeID: 0
108 | agentRadius: 0.5
109 | agentHeight: 2
110 | agentSlope: 45
111 | agentClimb: 0.4
112 | ledgeDropHeight: 0
113 | maxJumpAcrossDistance: 0
114 | minRegionArea: 2
115 | manualCellSize: 0
116 | cellSize: 0.16666667
117 | manualTileSize: 0
118 | tileSize: 256
119 | accuratePlacement: 0
120 | debug:
121 | m_Flags: 0
122 | m_NavMeshData: {fileID: 0}
123 | --- !u!1 &705507993
124 | GameObject:
125 | m_ObjectHideFlags: 0
126 | m_CorrespondingSourceObject: {fileID: 0}
127 | m_PrefabInstance: {fileID: 0}
128 | m_PrefabAsset: {fileID: 0}
129 | serializedVersion: 6
130 | m_Component:
131 | - component: {fileID: 705507995}
132 | - component: {fileID: 705507994}
133 | m_Layer: 0
134 | m_Name: Directional Light
135 | m_TagString: Untagged
136 | m_Icon: {fileID: 0}
137 | m_NavMeshLayer: 0
138 | m_StaticEditorFlags: 0
139 | m_IsActive: 1
140 | --- !u!108 &705507994
141 | Light:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInstance: {fileID: 0}
145 | m_PrefabAsset: {fileID: 0}
146 | m_GameObject: {fileID: 705507993}
147 | m_Enabled: 1
148 | serializedVersion: 9
149 | m_Type: 1
150 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
151 | m_Intensity: 1
152 | m_Range: 10
153 | m_SpotAngle: 30
154 | m_InnerSpotAngle: 21.80208
155 | m_CookieSize: 10
156 | m_Shadows:
157 | m_Type: 2
158 | m_Resolution: -1
159 | m_CustomResolution: -1
160 | m_Strength: 1
161 | m_Bias: 0.05
162 | m_NormalBias: 0.4
163 | m_NearPlane: 0.2
164 | m_CullingMatrixOverride:
165 | e00: 1
166 | e01: 0
167 | e02: 0
168 | e03: 0
169 | e10: 0
170 | e11: 1
171 | e12: 0
172 | e13: 0
173 | e20: 0
174 | e21: 0
175 | e22: 1
176 | e23: 0
177 | e30: 0
178 | e31: 0
179 | e32: 0
180 | e33: 1
181 | m_UseCullingMatrixOverride: 0
182 | m_Cookie: {fileID: 0}
183 | m_DrawHalo: 0
184 | m_Flare: {fileID: 0}
185 | m_RenderMode: 0
186 | m_CullingMask:
187 | serializedVersion: 2
188 | m_Bits: 4294967295
189 | m_RenderingLayerMask: 1
190 | m_Lightmapping: 1
191 | m_LightShadowCasterMode: 0
192 | m_AreaSize: {x: 1, y: 1}
193 | m_BounceIntensity: 1
194 | m_ColorTemperature: 6570
195 | m_UseColorTemperature: 0
196 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
197 | m_UseBoundingSphereOverride: 0
198 | m_ShadowRadius: 0
199 | m_ShadowAngle: 0
200 | --- !u!4 &705507995
201 | Transform:
202 | m_ObjectHideFlags: 0
203 | m_CorrespondingSourceObject: {fileID: 0}
204 | m_PrefabInstance: {fileID: 0}
205 | m_PrefabAsset: {fileID: 0}
206 | m_GameObject: {fileID: 705507993}
207 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
208 | m_LocalPosition: {x: 0, y: 3, z: 0}
209 | m_LocalScale: {x: 1, y: 1, z: 1}
210 | m_Children: []
211 | m_Father: {fileID: 0}
212 | m_RootOrder: 1
213 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
214 | --- !u!1 &963194225
215 | GameObject:
216 | m_ObjectHideFlags: 0
217 | m_CorrespondingSourceObject: {fileID: 0}
218 | m_PrefabInstance: {fileID: 0}
219 | m_PrefabAsset: {fileID: 0}
220 | serializedVersion: 6
221 | m_Component:
222 | - component: {fileID: 963194228}
223 | - component: {fileID: 963194227}
224 | - component: {fileID: 963194226}
225 | - component: {fileID: 963194229}
226 | m_Layer: 0
227 | m_Name: Main Camera
228 | m_TagString: MainCamera
229 | m_Icon: {fileID: 0}
230 | m_NavMeshLayer: 0
231 | m_StaticEditorFlags: 0
232 | m_IsActive: 1
233 | --- !u!81 &963194226
234 | AudioListener:
235 | m_ObjectHideFlags: 0
236 | m_CorrespondingSourceObject: {fileID: 0}
237 | m_PrefabInstance: {fileID: 0}
238 | m_PrefabAsset: {fileID: 0}
239 | m_GameObject: {fileID: 963194225}
240 | m_Enabled: 1
241 | --- !u!20 &963194227
242 | Camera:
243 | m_ObjectHideFlags: 0
244 | m_CorrespondingSourceObject: {fileID: 0}
245 | m_PrefabInstance: {fileID: 0}
246 | m_PrefabAsset: {fileID: 0}
247 | m_GameObject: {fileID: 963194225}
248 | m_Enabled: 1
249 | serializedVersion: 2
250 | m_ClearFlags: 1
251 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
252 | m_projectionMatrixMode: 1
253 | m_GateFitMode: 2
254 | m_FOVAxisMode: 0
255 | m_SensorSize: {x: 36, y: 24}
256 | m_LensShift: {x: 0, y: 0}
257 | m_FocalLength: 50
258 | m_NormalizedViewPortRect:
259 | serializedVersion: 2
260 | x: 0
261 | y: 0
262 | width: 1
263 | height: 1
264 | near clip plane: 0.3
265 | far clip plane: 1000
266 | field of view: 60
267 | orthographic: 0
268 | orthographic size: 5
269 | m_Depth: -1
270 | m_CullingMask:
271 | serializedVersion: 2
272 | m_Bits: 4294967295
273 | m_RenderingPath: -1
274 | m_TargetTexture: {fileID: 0}
275 | m_TargetDisplay: 0
276 | m_TargetEye: 3
277 | m_HDR: 1
278 | m_AllowMSAA: 1
279 | m_AllowDynamicResolution: 0
280 | m_ForceIntoRT: 0
281 | m_OcclusionCulling: 1
282 | m_StereoConvergence: 10
283 | m_StereoSeparation: 0.022
284 | --- !u!4 &963194228
285 | Transform:
286 | m_ObjectHideFlags: 0
287 | m_CorrespondingSourceObject: {fileID: 0}
288 | m_PrefabInstance: {fileID: 0}
289 | m_PrefabAsset: {fileID: 0}
290 | m_GameObject: {fileID: 963194225}
291 | m_LocalRotation: {x: 0.19473164, y: -0.7300531, z: 0.2321027, w: 0.6125606}
292 | m_LocalPosition: {x: 18.784536, y: 20.260452, z: 3.3742123}
293 | m_LocalScale: {x: 1, y: 1, z: 1}
294 | m_Children: []
295 | m_Father: {fileID: 0}
296 | m_RootOrder: 0
297 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
298 | --- !u!114 &963194229
299 | MonoBehaviour:
300 | m_ObjectHideFlags: 0
301 | m_CorrespondingSourceObject: {fileID: 0}
302 | m_PrefabInstance: {fileID: 0}
303 | m_PrefabAsset: {fileID: 0}
304 | m_GameObject: {fileID: 963194225}
305 | m_Enabled: 1
306 | m_EditorHideFlags: 0
307 | m_Script: {fileID: 11500000, guid: c1b91b14c6450b9478a6820b5a54bf03, type: 3}
308 | m_Name:
309 | m_EditorClassIdentifier:
310 | authToken:
311 | mat: {fileID: 2100000, guid: 1760965e14e3ecc4fb00139e23b88f50, type: 2}
312 |
--------------------------------------------------------------------------------
/Live-0002 Parametric Design with C# component for designers/README.md:
--------------------------------------------------------------------------------
1 | # Parametric Design with C# component for designers
2 |
3 | ## Video Url
4 | https://youtu.be/7fPxQd7nUV0
5 |
6 | ## Requirements
7 |
8 | - Rhinoceros 6
9 | - (Option; if you want to open the example file) Weaverbird plugin for Grasshopper
10 | - A bit of coding experience.
11 |
12 | ## References
13 | - Populate 2D sampling algorithm: https://www.grasshopper3d.com/forum/topics/populate-2d-sampling-algorithm
14 | - Value Remapping algorithm: https://stackoverflow.com/questions/3451553/value-remapping
15 | - RhinoCommon API: https://developer.rhino3d.com/api/RhinoCommon/html/R_Project_RhinoCommon.htm
16 |
17 | ## Create a design tool with C#
18 |
19 | In this session we are going to create a custom component for Grasshopper with C# to populate geometry with attractor points input in order to create gradational scattered points.
20 |
21 | 
22 |
23 | 
24 |
25 | 
26 |
27 | 
28 |
29 | ## Algorithm explained
30 |
31 | 
32 |
33 | ## Step 1. Setup C# component input
34 |
35 | ### Inputs:
36 | - brep (Brep / Item): Geometry to place points on.
37 | - attractors (Point3d / List): Attractor points to create attracting forces to control point scattering.
38 | - num (Integer / Item): Number of points.
39 | - ite (Integer / Item): Scattering iteration.
40 | - attractor_rad (Double / Item): Attractor point affecting radius.
41 | - attractor_pow (Double / Item): Attractor point power (-/+).
42 |
43 | ### Output:
44 |
45 | - A: Ouput scattered points.
46 |
47 | ###
48 |
49 | 
50 |
51 | ## Step 2. Add necessary namespace
52 |
53 | Add a namespace to use Rhino collection in order to use a convenient class. Specifically we are going to use Point3dList class.
54 |
55 | ```csharp
56 | using Rhino.Collections;
57 | ```
58 |
59 | ## Step 3. Add resusable functions
60 |
61 | Value remapping function.
62 |
63 | ```csharp
64 | double Remap(double val, double smin, double smax, double tmin, double tmax){
65 | return (val - smin) / (smax - smin) * (tmax - tmin) + tmin;
66 | }
67 | ```
68 |
69 | A function to create random point on top of input brep.
70 |
71 | ```csharp
72 | Point3d CreateRandomPoint(Random rnd, Brep brep, BoundingBox bbox){
73 | var x = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.X, bbox.Max.X);
74 | var y = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.Y, bbox.Max.Y);
75 | var z = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.Z, bbox.Max.Z);
76 |
77 | return brep.ClosestPoint(new Point3d(x, y, z));
78 | }
79 | ```
80 |
81 | ## Step 4. Try creating random points on given geometry
82 |
83 | ```csharp
84 | // Create emply point list with Point3dList.
85 | var points = new Point3dList();
86 |
87 | // Check that brep is not null.
88 | if(brep != null){
89 | // Create random class.
90 | var rnd = new Random();
91 | // Create a bounding box from input brep.
92 | var bbox = brep.GetBoundingBox(true);
93 |
94 | // Create number of random points on given brep geometry.
95 | for(int i = 0; i < num; i++){
96 | var rndpt = CreateRandomPoint(rnd, brep, bbox);
97 | points.Add(rndpt);
98 | }
99 | }
100 | // Output points.
101 | A = points;
102 | ```
103 |
104 | ## Step 5. Create populate geometry function
105 |
106 | ```csharp
107 | var points = new Point3dList();
108 | if(brep != null){
109 | // Create attractor point list with Poin3dList.
110 | var attracts = new Point3dList(attractors);
111 | var rnd = new Random();
112 | var bbox = brep.GetBoundingBox(true);
113 |
114 | for(int i = 0; i < num; i++){
115 |
116 | if(points.Count == 0){ // Create first random point.
117 | var rndpt = CreateRandomPoint(rnd, brep, bbox);
118 | points.Add(rndpt);
119 | }else{ // Create scattered random points.
120 | double fdist = -1; // A variable to store furthest distance from exisisting points.
121 | Point3d fpos = new Point3d(); // A variable to store furthest point from existing points.
122 |
123 | // Find furthest point from existing points by creating number of random points.
124 | for(int t = 0; t < Math.Max(Math.Min(ite, i), 10); t++){
125 | // Create random point
126 | var nrndpt = CreateRandomPoint(rnd, brep, bbox);
127 |
128 | // Find closest point from existing points with random point.
129 | var nindex = points.ClosestIndex(nrndpt);
130 | var npos = points[nindex];
131 | var ndist = npos.DistanceTo(nrndpt);
132 |
133 | // Find furthest random point
134 | if(fdist < ndist){
135 | fdist = ndist;
136 | fpos = nrndpt;
137 | }
138 | }
139 | // Add a furthest random point to points list.
140 | points.Add(fpos);
141 | }
142 | }
143 | }
144 |
145 | A = points;
146 |
147 | ```
148 |
149 | ## Step 6. Use attractor points to modify scattered points.
150 |
151 | ```csharp
152 |
153 | private void RunScript(Brep brep, List attractors, int num, int ite, double attractor_rad, double attractor_pow, ref object A)
154 | {
155 | var points = new Point3dList();
156 |
157 | if(brep != null){
158 | var attracts = new Point3dList(attractors);
159 | var rnd = new Random();
160 | var bbox = brep.GetBoundingBox(true);
161 |
162 | for(int i = 0; i < num; i++){
163 |
164 | if(points.Count == 0){
165 | var rndpt = CreateRandomPoint(rnd, brep, bbox);
166 | points.Add(rndpt);
167 | }else{
168 |
169 | double fdist = -1;
170 | Point3d fpos = new Point3d();
171 | for(int t = 0; t < Math.Max(Math.Min(ite, i), 10); t++){
172 | var nrndpt = CreateRandomPoint(rnd, brep, bbox);
173 | var nindex = points.ClosestIndex(nrndpt);
174 | var npos = points[nindex];
175 |
176 | // Create attractor weight.
177 | var nattractid = attracts.ClosestIndex(nrndpt);
178 | var nattractpos = attracts[nattractid];
179 | var mindist = attractor_rad;
180 | var pow = attractor_pow;
181 | var nattractdist = Math.Pow(Remap(Math.Min(nattractpos.DistanceTo(nrndpt), mindist), 0, mindist, 0, 1.0), pow);
182 |
183 | // Multipy distance with attractor weight.
184 | var ndist = npos.DistanceTo(nrndpt) * nattractdist;
185 |
186 | if(fdist < ndist){
187 | fdist = ndist;
188 | fpos = nrndpt;
189 | }
190 | }
191 | points.Add(fpos);
192 | }
193 | }
194 | }
195 |
196 | A = points;
197 | }
198 |
199 | ```
200 |
201 | ## Final Code
202 |
203 | ```csharp
204 | using System;
205 | using System.Collections;
206 | using System.Collections.Generic;
207 | using Rhino;
208 | using Rhino.Geometry;
209 | using Grasshopper;
210 | using Grasshopper.Kernel;
211 | using Grasshopper.Kernel.Data;
212 | using Grasshopper.Kernel.Types;
213 | using Rhino.Collections;
214 |
215 | private void RunScript(Brep brep, List attractors, int num, int ite, double attractor_rad, double attractor_pow, ref object A)
216 | {
217 | var points = new Point3dList();
218 |
219 | if(brep != null){
220 | var attracts = new Point3dList(attractors);
221 | var rnd = new Random();
222 | var bbox = brep.GetBoundingBox(true);
223 |
224 | for(int i = 0; i < num; i++){
225 |
226 | if(points.Count == 0){
227 | var rndpt = CreateRandomPoint(rnd, brep, bbox);
228 | points.Add(rndpt);
229 | }else{
230 |
231 | double fdist = -1;
232 | Point3d fpos = new Point3d();
233 | for(int t = 0; t < Math.Max(Math.Min(ite, i), 10); t++){
234 | var nrndpt = CreateRandomPoint(rnd, brep, bbox);
235 | var nindex = points.ClosestIndex(nrndpt);
236 | var npos = points[nindex];
237 |
238 | // Create attractor weight.
239 | var nattractid = attracts.ClosestIndex(nrndpt);
240 | var nattractpos = attracts[nattractid];
241 | var mindist = attractor_rad;
242 | var pow = attractor_pow;
243 | var nattractdist = Math.Pow(Remap(Math.Min(nattractpos.DistanceTo(nrndpt), mindist), 0, mindist, 0, 1.0), pow);
244 |
245 | // Multipy distance with attractor weight.
246 | var ndist = npos.DistanceTo(nrndpt) * nattractdist;
247 |
248 | if(fdist < ndist){
249 | fdist = ndist;
250 | fpos = nrndpt;
251 | }
252 | }
253 | points.Add(fpos);
254 | }
255 | }
256 | }
257 |
258 | A = points;
259 | }
260 |
261 | //
262 | double Remap(double val, double smin, double smax, double tmin, double tmax){
263 | return (val - smin) / (smax - smin) * (tmax - tmin) + tmin;
264 | }
265 |
266 | Point3d CreateRandomPoint(Random rnd, Brep brep, BoundingBox bbox){
267 | var x = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.X, bbox.Max.X);
268 | var y = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.Y, bbox.Max.Y);
269 | var z = Remap(rnd.NextDouble(), 0.0, 1.0, bbox.Min.Z, bbox.Max.Z);
270 |
271 | return brep.ClosestPoint(new Point3d(x, y, z));
272 | }
273 | }
274 |
275 | ```
276 |
277 | ## Create a design with this cutom tool
278 |
279 | 
280 |
281 | 
282 |
283 | 
284 |
285 |
286 | ## Extra: Extend components to accept multiple attractor distances and powers
287 |
288 | 
289 |
--------------------------------------------------------------------------------
/0005 Load Grasshopper file with compute.rhino3d Unity/GrasshopperLoader/Assets/Scenes/SampleScene.unity:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!29 &1
4 | OcclusionCullingSettings:
5 | m_ObjectHideFlags: 0
6 | serializedVersion: 2
7 | m_OcclusionBakeSettings:
8 | smallestOccluder: 5
9 | smallestHole: 0.25
10 | backfaceThreshold: 100
11 | m_SceneGUID: 00000000000000000000000000000000
12 | m_OcclusionCullingData: {fileID: 0}
13 | --- !u!104 &2
14 | RenderSettings:
15 | m_ObjectHideFlags: 0
16 | serializedVersion: 9
17 | m_Fog: 0
18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19 | m_FogMode: 3
20 | m_FogDensity: 0.01
21 | m_LinearFogStart: 0
22 | m_LinearFogEnd: 300
23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26 | m_AmbientIntensity: 1
27 | m_AmbientMode: 0
28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
30 | m_HaloStrength: 0.5
31 | m_FlareStrength: 1
32 | m_FlareFadeSpeed: 3
33 | m_HaloTexture: {fileID: 0}
34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35 | m_DefaultReflectionMode: 0
36 | m_DefaultReflectionResolution: 128
37 | m_ReflectionBounces: 1
38 | m_ReflectionIntensity: 1
39 | m_CustomReflection: {fileID: 0}
40 | m_Sun: {fileID: 705507994}
41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 11
47 | m_GIWorkflowMode: 0
48 | m_GISettings:
49 | serializedVersion: 2
50 | m_BounceScale: 1
51 | m_IndirectOutputScale: 1
52 | m_AlbedoBoost: 1
53 | m_EnvironmentLightingMode: 0
54 | m_EnableBakedLightmaps: 1
55 | m_EnableRealtimeLightmaps: 0
56 | m_LightmapEditorSettings:
57 | serializedVersion: 12
58 | m_Resolution: 2
59 | m_BakeResolution: 40
60 | m_AtlasSize: 1024
61 | m_AO: 0
62 | m_AOMaxDistance: 1
63 | m_CompAOExponent: 1
64 | m_CompAOExponentDirect: 0
65 | m_ExtractAmbientOcclusion: 0
66 | m_Padding: 2
67 | m_LightmapParameters: {fileID: 0}
68 | m_LightmapsBakeMode: 1
69 | m_TextureCompression: 1
70 | m_FinalGather: 0
71 | m_FinalGatherFiltering: 1
72 | m_FinalGatherRayCount: 256
73 | m_ReflectionCompression: 2
74 | m_MixedBakeMode: 2
75 | m_BakeBackend: 1
76 | m_PVRSampling: 1
77 | m_PVRDirectSampleCount: 32
78 | m_PVRSampleCount: 500
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 500
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 2
83 | m_PVRDenoiserTypeDirect: 0
84 | m_PVRDenoiserTypeIndirect: 0
85 | m_PVRDenoiserTypeAO: 0
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 0
90 | m_PVRCulling: 1
91 | m_PVRFilteringGaussRadiusDirect: 1
92 | m_PVRFilteringGaussRadiusIndirect: 5
93 | m_PVRFilteringGaussRadiusAO: 2
94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5
95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2
96 | m_PVRFilteringAtrousPositionSigmaAO: 1
97 | m_ExportTrainingData: 0
98 | m_TrainingDataDestination: TrainingData
99 | m_LightingDataAsset: {fileID: 0}
100 | m_UseShadowmask: 1
101 | --- !u!196 &4
102 | NavMeshSettings:
103 | serializedVersion: 2
104 | m_ObjectHideFlags: 0
105 | m_BuildSettings:
106 | serializedVersion: 2
107 | agentTypeID: 0
108 | agentRadius: 0.5
109 | agentHeight: 2
110 | agentSlope: 45
111 | agentClimb: 0.4
112 | ledgeDropHeight: 0
113 | maxJumpAcrossDistance: 0
114 | minRegionArea: 2
115 | manualCellSize: 0
116 | cellSize: 0.16666667
117 | manualTileSize: 0
118 | tileSize: 256
119 | accuratePlacement: 0
120 | debug:
121 | m_Flags: 0
122 | m_NavMeshData: {fileID: 0}
123 | --- !u!1 &705507993
124 | GameObject:
125 | m_ObjectHideFlags: 0
126 | m_CorrespondingSourceObject: {fileID: 0}
127 | m_PrefabInstance: {fileID: 0}
128 | m_PrefabAsset: {fileID: 0}
129 | serializedVersion: 6
130 | m_Component:
131 | - component: {fileID: 705507995}
132 | - component: {fileID: 705507994}
133 | m_Layer: 0
134 | m_Name: Directional Light
135 | m_TagString: Untagged
136 | m_Icon: {fileID: 0}
137 | m_NavMeshLayer: 0
138 | m_StaticEditorFlags: 0
139 | m_IsActive: 1
140 | --- !u!108 &705507994
141 | Light:
142 | m_ObjectHideFlags: 0
143 | m_CorrespondingSourceObject: {fileID: 0}
144 | m_PrefabInstance: {fileID: 0}
145 | m_PrefabAsset: {fileID: 0}
146 | m_GameObject: {fileID: 705507993}
147 | m_Enabled: 1
148 | serializedVersion: 9
149 | m_Type: 1
150 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
151 | m_Intensity: 1
152 | m_Range: 10
153 | m_SpotAngle: 30
154 | m_InnerSpotAngle: 21.80208
155 | m_CookieSize: 10
156 | m_Shadows:
157 | m_Type: 2
158 | m_Resolution: -1
159 | m_CustomResolution: -1
160 | m_Strength: 1
161 | m_Bias: 0.05
162 | m_NormalBias: 0.4
163 | m_NearPlane: 0.2
164 | m_CullingMatrixOverride:
165 | e00: 1
166 | e01: 0
167 | e02: 0
168 | e03: 0
169 | e10: 0
170 | e11: 1
171 | e12: 0
172 | e13: 0
173 | e20: 0
174 | e21: 0
175 | e22: 1
176 | e23: 0
177 | e30: 0
178 | e31: 0
179 | e32: 0
180 | e33: 1
181 | m_UseCullingMatrixOverride: 0
182 | m_Cookie: {fileID: 0}
183 | m_DrawHalo: 0
184 | m_Flare: {fileID: 0}
185 | m_RenderMode: 0
186 | m_CullingMask:
187 | serializedVersion: 2
188 | m_Bits: 4294967295
189 | m_RenderingLayerMask: 1
190 | m_Lightmapping: 1
191 | m_LightShadowCasterMode: 0
192 | m_AreaSize: {x: 1, y: 1}
193 | m_BounceIntensity: 1
194 | m_ColorTemperature: 6570
195 | m_UseColorTemperature: 0
196 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
197 | m_UseBoundingSphereOverride: 0
198 | m_ShadowRadius: 0
199 | m_ShadowAngle: 0
200 | --- !u!4 &705507995
201 | Transform:
202 | m_ObjectHideFlags: 0
203 | m_CorrespondingSourceObject: {fileID: 0}
204 | m_PrefabInstance: {fileID: 0}
205 | m_PrefabAsset: {fileID: 0}
206 | m_GameObject: {fileID: 705507993}
207 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
208 | m_LocalPosition: {x: 0, y: 3, z: 0}
209 | m_LocalScale: {x: 1, y: 1, z: 1}
210 | m_Children: []
211 | m_Father: {fileID: 0}
212 | m_RootOrder: 1
213 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
214 | --- !u!1 &963194225
215 | GameObject:
216 | m_ObjectHideFlags: 0
217 | m_CorrespondingSourceObject: {fileID: 0}
218 | m_PrefabInstance: {fileID: 0}
219 | m_PrefabAsset: {fileID: 0}
220 | serializedVersion: 6
221 | m_Component:
222 | - component: {fileID: 963194228}
223 | - component: {fileID: 963194227}
224 | - component: {fileID: 963194226}
225 | m_Layer: 0
226 | m_Name: Main Camera
227 | m_TagString: MainCamera
228 | m_Icon: {fileID: 0}
229 | m_NavMeshLayer: 0
230 | m_StaticEditorFlags: 0
231 | m_IsActive: 1
232 | --- !u!81 &963194226
233 | AudioListener:
234 | m_ObjectHideFlags: 0
235 | m_CorrespondingSourceObject: {fileID: 0}
236 | m_PrefabInstance: {fileID: 0}
237 | m_PrefabAsset: {fileID: 0}
238 | m_GameObject: {fileID: 963194225}
239 | m_Enabled: 1
240 | --- !u!20 &963194227
241 | Camera:
242 | m_ObjectHideFlags: 0
243 | m_CorrespondingSourceObject: {fileID: 0}
244 | m_PrefabInstance: {fileID: 0}
245 | m_PrefabAsset: {fileID: 0}
246 | m_GameObject: {fileID: 963194225}
247 | m_Enabled: 1
248 | serializedVersion: 2
249 | m_ClearFlags: 2
250 | m_BackGroundColor: {r: 0.1699448, g: 0.5115197, b: 0.6320754, a: 0}
251 | m_projectionMatrixMode: 1
252 | m_GateFitMode: 2
253 | m_FOVAxisMode: 0
254 | m_SensorSize: {x: 36, y: 24}
255 | m_LensShift: {x: 0, y: 0}
256 | m_FocalLength: 50
257 | m_NormalizedViewPortRect:
258 | serializedVersion: 2
259 | x: 0
260 | y: 0
261 | width: 1
262 | height: 1
263 | near clip plane: 0.3
264 | far clip plane: 10000
265 | field of view: 60
266 | orthographic: 0
267 | orthographic size: 5
268 | m_Depth: -1
269 | m_CullingMask:
270 | serializedVersion: 2
271 | m_Bits: 4294967295
272 | m_RenderingPath: -1
273 | m_TargetTexture: {fileID: 0}
274 | m_TargetDisplay: 0
275 | m_TargetEye: 3
276 | m_HDR: 1
277 | m_AllowMSAA: 1
278 | m_AllowDynamicResolution: 0
279 | m_ForceIntoRT: 0
280 | m_OcclusionCulling: 1
281 | m_StereoConvergence: 10
282 | m_StereoSeparation: 0.022
283 | --- !u!4 &963194228
284 | Transform:
285 | m_ObjectHideFlags: 0
286 | m_CorrespondingSourceObject: {fileID: 0}
287 | m_PrefabInstance: {fileID: 0}
288 | m_PrefabAsset: {fileID: 0}
289 | m_GameObject: {fileID: 963194225}
290 | m_LocalRotation: {x: -0.23096795, y: 0.7504865, z: -0.33138183, w: -0.5230774}
291 | m_LocalPosition: {x: 1806.9908, y: 1258.6267, z: 1175.0378}
292 | m_LocalScale: {x: 1, y: 1, z: 1}
293 | m_Children: []
294 | m_Father: {fileID: 0}
295 | m_RootOrder: 0
296 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
297 | --- !u!1 &1968882984
298 | GameObject:
299 | m_ObjectHideFlags: 0
300 | m_CorrespondingSourceObject: {fileID: 0}
301 | m_PrefabInstance: {fileID: 0}
302 | m_PrefabAsset: {fileID: 0}
303 | serializedVersion: 6
304 | m_Component:
305 | - component: {fileID: 1968882986}
306 | - component: {fileID: 1968882985}
307 | m_Layer: 0
308 | m_Name: GHLoader
309 | m_TagString: Untagged
310 | m_Icon: {fileID: 0}
311 | m_NavMeshLayer: 0
312 | m_StaticEditorFlags: 0
313 | m_IsActive: 1
314 | --- !u!114 &1968882985
315 | MonoBehaviour:
316 | m_ObjectHideFlags: 0
317 | m_CorrespondingSourceObject: {fileID: 0}
318 | m_PrefabInstance: {fileID: 0}
319 | m_PrefabAsset: {fileID: 0}
320 | m_GameObject: {fileID: 1968882984}
321 | m_Enabled: 1
322 | m_EditorHideFlags: 0
323 | m_Script: {fileID: 11500000, guid: ada223993d6dcdb47bb79e1c014c6969, type: 3}
324 | m_Name:
325 | m_EditorClassIdentifier:
326 | ghFile: stickyball.gh
327 | serviceUrl: http://localhost:8081
328 | meshObjPrefab: {fileID: 7271443733234122731, guid: efa9fb3f7b0c0c24eba7379d5dee1213,
329 | type: 3}
330 | --- !u!4 &1968882986
331 | Transform:
332 | m_ObjectHideFlags: 0
333 | m_CorrespondingSourceObject: {fileID: 0}
334 | m_PrefabInstance: {fileID: 0}
335 | m_PrefabAsset: {fileID: 0}
336 | m_GameObject: {fileID: 1968882984}
337 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
338 | m_LocalPosition: {x: 0, y: 0, z: 0}
339 | m_LocalScale: {x: 1, y: 1, z: 1}
340 | m_Children: []
341 | m_Father: {fileID: 0}
342 | m_RootOrder: 2
343 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
344 |
--------------------------------------------------------------------------------
/Live-0001 Getting Started with Grasshopper Modeling with C#/README.md:
--------------------------------------------------------------------------------
1 | # Getting Started with Grasshopper Modeling using C#
2 | Meetupで開催しているTokyo AEC Industry Dev Groupのハンズオンの資料置き場となります。
3 | 本ハンズオンではC#コンポーネントを使ってRhinoCommon APIを利用してGrasshopperのモデリングをする際の基礎を教えます。このドキュメントはそのレジュメです。
4 |
5 | This is a file repo for the hand on lecture held on a group called Tokyo AEC Industry Dev Group on Meetup. I'll teach a basics of Grasshopper modeling using C# with RhinoCommon API in this hands on lecture. This document is a resume for your reference.
6 |
7 | ## 必要なもの / Requirements
8 |
9 | - Rhino 6
10 | - Grasshopperの多少の経験 / A little bit of experience with Grasshopper
11 |
12 | ## レファレンス / References
13 |
14 | - Rhino Developer Docs: https://developer.rhino3d.com/
15 | - RhinoCommon Guides: https://developer.rhino3d.com/guides/rhinocommon/
16 | - Grasshopper Guides: https://developer.rhino3d.com/guides/grasshopper/
17 | - RhinoCommon API: https://developer.rhino3d.com/api/RhinoCommon/html/R_Project_RhinoCommon.htm
18 |
19 | ## なぜコーディングでモデリング? / Why do modeling using code?
20 |
21 | 人によって理由はそれぞれだと思いますが、自分が考えられる点としては次のようなものが考えられます。
22 |
23 | - パラメトリックモデルをパッケージ化できる
24 | - プラグイン化してコンポーネント化もできる
25 | - ビジュアルネットワークと比べてすっきりするので見やすい
26 | - 便利なコーディング技術が使える(クラスとか)
27 | - Anemoneのようなプラグインなしでループや条件分岐ができる
28 | - フラクタル形状などをつくるのに利用する再帰計算もプラグインなしでできる
29 | - データの管理がしやすい
30 | - 必要であればC#の外部ライブラリが使える(Math.NETとか)
31 | - 書き方によってはビジュアルプログラミングよりも速い計算結果を得られる
32 | - 外部のアプリからRhinoのモデリング関数を利用したいとき必要(compute.rhino3dやRhino.Insideなどを利用するとき)
33 |
34 | ---
35 |
36 | - Parametric models can be packaged.
37 | - You can create your own plugin with your parametric model component.
38 | - It's tend to be easier to see because it's cleaner than a visual network.
39 | - You can use some useful coding concepts (like classes).
40 | - You can use loop and conditions without plugins like Anemone.
41 | - You can also do recursion without plugins which can used to create fractals shapes.
42 | - It's easy to manage data.
43 | - You can use an external C# library if you need to (like Math.NET).
44 | - In some cases you can get faster results than visual programming.
45 | - Required when you want to use Rhino's modeling functions from an external app (when using compute.rhino3d, Rhino.Inside, etc.)
46 |
47 | ## でもなんでRhinoCommon API? / But why RhinoCommon API?
48 |
49 | Grasshopperでコーディングを利用する際、まずPythonかC#を選ぶことになります。PythonはRhinoCommonのAPIとは別に、RhinoCommonの機能を使いやすいように組み合わせてScriptSyntaxという形で新しい関数を提供しています。そういう意味でPythonのほうが手軽です。C#では基本的にはRhinoCommon APIしか使えないので、Pythonで書いていた同じコードが使えないということはありえます。同じことをやるにしてもより複雑な書き方にもなりえます。なので、入りはPythonでもいいと思っています。ただ、結局Pythonも背後で利用している関数はRhinoCommonのもので、より汎用性の高い関数となっています。つまり細かいジオメトリックな操作をしたい場合はRhinoCommonを結局のところ知っておく必要があるということです。
50 |
51 | When using coding in Grasshopper, the first choice is either Python or C#. Python provides a new function in the form of ScriptSyntax that combines RhinoCommon's features in an easy-to-use way, apart from RhinoCommon's API. In this sense, it's easier to use Python, because you can only use RhinoCommon API for C#, so it's possible that you won't be able to use the same code you wrote in Python. It can also be a more complicated way to write the code even if you are doing the same thing. Thus it's okay to use Python as an entry point. However, the functions that Python uses are based on RhinoCommon's API. This means that if you want to do more complicated and controlled geometric manipulation, you ultimately need to know RhinoCommon API.
52 |
53 | ## まずは作りたいものを探す / Look for what you want to create
54 |
55 | コーディングを使ったモデリングの練習として、コーディングによるモデリングが比較的かんたんなモチーフを探します。ルールが抽出しやすい形がいいかと思います。自分がよくやる方法としては、Pinterestのような画像の連想検索サービスを使って興味あるものをブックマークしていきます。今回自分が選んだのは下記URLのシャンデリアの画像です。
56 |
57 | As an exercise in modeling with coding, we look for motifs that are relatively easy to model with coding. It would be nice if you could extract the rule from the form. The way I often do it is to use an image association search service like Pinterest to bookmark things that interests me. I chose the image of the chandelier at the following URL this time.
58 |
59 | https://www.pinterest.jp/pin/170785010858059762/
60 |
61 | ## Step 0: Grasshopperでまずモデリング / Modeling with Grasshopper
62 |
63 | コーディングがはじめての人はまずGrasshopperだけでモデリングを完結してみるのがいいです。基本的にはコードでやることはこのGrasshopperで作ったネットワークの流れをなぞっていくということになるからです。
64 |
65 | If you are new to coding, you should try to complete the modeling with Grasshopper first. Basically, all you have to do with the code is to follow the flow of the network you created with Grasshopper.
66 |
67 | 
68 | 
69 |
70 |
71 | ## Step 1: ポイントをふたつ作る / Create two points
72 |
73 | 
74 |
75 | ```csharp
76 | private void RunScript(Point3d pos, double dist, ref object A)
77 | {
78 | // Create two points in a list.
79 | var pts = new List(){
80 | pos,
81 | pos + new Point3d(dist, 0, 0)
82 | };
83 |
84 | // output points.
85 | A = pts;
86 | }
87 | ```
88 |
89 | ## Step 2: ポイントをふたつ作る / Create two points
90 |
91 | 
92 |
93 | ```csharp
94 | private void RunScript(Point3d pos, double dist, int num, ref object A)
95 | {
96 | // Create empty list.
97 | var pts = new List();
98 |
99 | // Use loop to continuously create points inbetween two points.
100 | for(int i = 0; i < num; i++){
101 | var newpos = pos + new Vector3d(dist * i / (num - 1.0), 0, 0);
102 | pts.Add(newpos);
103 | }
104 |
105 | A = pts;
106 | }
107 | ```
108 |
109 | ## Step 3: ポイントを回転して螺旋を作る / Rotate points to create spiral
110 |
111 | 
112 |
113 | ```csharp
114 | private void RunScript(Point3d pos, double dist, int num, double ang, ref object A)
115 | {
116 | var pts = new List();
117 | for(int i = 0; i < num; i++){
118 | // Convert integer i to t in a range 0.0-1.0.
119 | double t = i / (num - 1.0);
120 |
121 | var newpos = pos + new Vector3d(dist * t, 0, 0);
122 |
123 | // Create Point geometry from Point3d (location information).
124 | var newpt = new Point(newpos);
125 | // Rotate Point geometry iteratively.
126 | newpt.Rotate(t * ang, Vector3d.ZAxis, pos);
127 |
128 | pts.Add(newpt);
129 | }
130 |
131 | A = pts;
132 | }
133 | ```
134 |
135 | ## Step 4: 螺旋形状を変形する / Modify spiral shape
136 |
137 | 
138 |
139 | ```csharp
140 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, ref object A)
141 | {
142 | var pts = new List();
143 | for(int i = 0; i < num; i++){
144 | double t = i / (num - 1.0);
145 |
146 | var newpos = pos + new Vector3d(dist * t, 0, 0);
147 | var newpt = new Point(newpos);
148 |
149 | // User power function to modify t value.
150 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
151 |
152 | pts.Add(newpt);
153 | }
154 |
155 | A = pts;
156 | }
157 | ```
158 |
159 | ## Step 5: ポイントから曲線を作る / Create interpolate curve from points
160 |
161 | 
162 |
163 | ```csharp
164 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, ref object Rail)
165 | {
166 | var pts = new List();
167 | for(int i = 0; i < num; i++){
168 | double t = i / (num - 1.0);
169 |
170 | var newpos = pos + new Vector3d(dist * t, 0, 0);
171 | var newpt = new Point(newpos);
172 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
173 |
174 | pts.Add(newpt.Location);
175 | }
176 |
177 | // create interpolate curve from list of points.
178 | var crv = Curve.CreateInterpolatedCurve(pts, 3);
179 |
180 | // output curve.
181 | Rail = crv;
182 | }
183 | ```
184 |
185 | ## Step 6: 曲線を均等に分割する / Divide curve equally
186 |
187 | 
188 |
189 | ```csharp
190 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, ref object Rail, ref object A)
191 | {
192 | var pts = new List();
193 | for(int i = 0; i < num; i++){
194 | double t = i / (num - 1.0);
195 |
196 | var newpos = pos + new Vector3d(dist * t, 0, 0);
197 | var newpt = new Point(newpos);
198 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
199 |
200 | pts.Add(newpt.Location);
201 | }
202 |
203 | var crv = Curve.CreateInterpolatedCurve(pts, 3);
204 |
205 | // create new list to store divided points.
206 | var newpts = new List();
207 |
208 | // divide curve to get curve parameters.
209 | var divs = crv.DivideByCount(num - 1, true);
210 | for(int i = 0; i < divs.Length; i++){
211 | // get point location using curve parameter.
212 | var newpos = crv.PointAt(divs[i]);
213 | newpts.Add(newpos);
214 | }
215 |
216 | Rail = crv;
217 |
218 | // output divided points.
219 | A = newpts;
220 | }
221 | ```
222 |
223 | ## Step 7: 曲線を下方向に移動する / Move curve downward
224 | 
225 |
226 | ```csharp
227 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, double topoffset, ref object Rail, ref object A)
228 | {
229 | var pts = new List();
230 | for(int i = 0; i < num; i++){
231 | double t = i / (num - 1.0);
232 |
233 | var newpos = pos + new Vector3d(dist * t, 0, 0);
234 | var newpt = new Point(newpos);
235 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
236 |
237 | pts.Add(newpt.Location);
238 | }
239 |
240 | var crv = Curve.CreateInterpolatedCurve(pts, 3);
241 |
242 | var newpts = new List();
243 | var divs = crv.DivideByCount(num - 1, true);
244 | for(int i = 0; i < divs.Length; i++){
245 | var newpos = crv.PointAt(divs[i]);
246 | double t = i / (divs.Length - 1.0);
247 |
248 | // create offset value and move points downward.
249 | double offset = topoffset * t;
250 | newpos += new Vector3d(0, 0, -offset);
251 |
252 | newpts.Add(newpos);
253 | }
254 | crv = Curve.CreateInterpolatedCurve(newpts, 3);
255 |
256 | Rail = crv;
257 | A = newpts;
258 | }
259 | ```
260 |
261 | ## Step 8: ラインを作る / Create lines
262 | 
263 |
264 | ```csharp
265 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, double topoffset, double minlength, double maxlength, double lengthpow, ref object Rail, ref object Lines)
266 | {
267 | var pts = new List();
268 | for(int i = 0; i < num; i++){
269 | double t = i / (num - 1.0);
270 |
271 | var newpos = pos + new Vector3d(dist * t, 0, 0);
272 | var newpt = new Point(newpos);
273 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
274 |
275 | pts.Add(newpt.Location);
276 | }
277 |
278 | var crv = Curve.CreateInterpolatedCurve(pts, 3);
279 |
280 | // create empty list to store line curves.
281 | var lines = new List();
282 |
283 | var newpts = new List();
284 | var divs = crv.DivideByCount(num - 1, true);
285 | for(int i = 0; i < divs.Length; i++){
286 | var newpos = crv.PointAt(divs[i]);
287 | double t = i / (divs.Length - 1.0);
288 | double offset = topoffset * t;
289 | newpos += new Vector3d(0, 0, -offset);
290 | newpts.Add(newpos);
291 |
292 | // calculate line length based on t value together with min / max line length params.
293 | var len = minlength + (maxlength - minlength) * (1.0 - Math.Pow(t, lengthpow));
294 | // create LineCurve object from two points.
295 | var lc = new LineCurve(newpos, newpos + new Vector3d(0, 0, -len));
296 | lines.Add(lc);
297 | }
298 | crv = Curve.CreateInterpolatedCurve(newpts, 3);
299 |
300 | Rail = crv;
301 |
302 | // output lines.
303 | Lines = lines;
304 | }
305 | ```
306 |
307 | ## Step 9: ラインからパイプを作る / Create pipe from lines
308 | 
309 |
310 | ```csharp
311 | private void RunScript(Point3d pos, double dist, int num, double ang, double angpow, double topoffset, double minlength, double maxlength, double lengthpow, double thickness, ref object Rail, ref object Pipes)
312 | {
313 | var pts = new List();
314 | for(int i = 0; i < num; i++){
315 | double t = i / (num - 1.0);
316 |
317 | var newpos = pos + new Vector3d(dist * t, 0, 0);
318 | var newpt = new Point(newpos);
319 | newpt.Rotate(Math.Pow(t, angpow) * ang, Vector3d.ZAxis, pos);
320 |
321 | pts.Add(newpt.Location);
322 | }
323 |
324 | var crv = Curve.CreateInterpolatedCurve(pts, 3);
325 |
326 | var lines = new List();
327 |
328 | var newpts = new List();
329 | var divs = crv.DivideByCount(num - 1, true);
330 |
331 | // calculate pipe diameter
332 | var sepdist = crv.GetLength() / num;
333 | // create empty list to store pipes.
334 | var pipeList = new List();
335 |
336 | for(int i = 0; i < divs.Length; i++){
337 | var newpos = crv.PointAt(divs[i]);
338 | double t = i / (divs.Length - 1.0);
339 | double offset = topoffset * t;
340 | newpos += new Vector3d(0, 0, -offset);
341 | newpts.Add(newpos);
342 |
343 | var len = minlength + (maxlength - minlength) * (1.0 - Math.Pow(t, lengthpow));
344 | var lc = new LineCurve(newpos, newpos + new Vector3d(0, 0, -len));
345 | lines.Add(lc);
346 |
347 | // create pipe geometry from line curve
348 | var pipes = Brep.CreatePipe(lc, sepdist * 0.5 * thickness, true, PipeCapMode.None, true, 0.01, 0.01);
349 | pipeList.AddRange(pipes);
350 | }
351 | crv = Curve.CreateInterpolatedCurve(newpts, 3);
352 | var rail = Brep.CreatePipe(crv, sepdist * 0.5 * thickness, true, PipeCapMode.Round, true, 0.01, 0.01);
353 |
354 | Rail = rail;
355 | Pipes = pipeList;
356 | }
357 | ```
358 |
359 | ## Tokyo AEC Industry Dev Group
360 | https://www.meetup.com/Tokyo-AEC-Industry-Dev-Group/
361 |
362 | ## Youtube Link
363 | https://youtu.be/K4mApjtdPBg
364 |
--------------------------------------------------------------------------------