diff --git a/CHANGELOG.md b/CHANGELOG.md index c4b8bb23..d25d2f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +Please see [here](https://github.com/hrntsm/Tunny/releases) for the data released for each version. + +## [0.1.1] -2022-04-17 + +### Fixed + +- If there is no modelmesh input and use restore function, gh is crashed bug. + ## [0.1.0] -2022-04-14 ### Added diff --git a/Tunny/Tunny.csproj b/Tunny/Tunny.csproj index 701360c7..33c5607e 100644 --- a/Tunny/Tunny.csproj +++ b/Tunny/Tunny.csproj @@ -2,7 +2,7 @@ net48 - 1.0 + 0.1.1 Tunny Tunny is an optimization component wrapped in optuna. .gha diff --git a/Tunny/UI/OptimizationWindow.cs b/Tunny/UI/OptimizationWindow.cs index 704ae764..e75e526b 100644 --- a/Tunny/UI/OptimizationWindow.cs +++ b/Tunny/UI/OptimizationWindow.cs @@ -124,7 +124,7 @@ private void RestoreButton_Click(object sender, EventArgs e) var modelMesh = new GH_Structure(); var variables = new GH_Structure(); var objectives = new GH_Structure(); - IEnumerable nickName = _component.GhInOut.Sliders.Select(x => x.NickName); + var nickName = _component.GhInOut.Sliders.Select(x => x.NickName).ToArray(); var optuna = new Optuna(_component.GhInOut.ComponentFolder); string studyName = studyNameTextBox.Text; @@ -164,6 +164,10 @@ private static void SetObjectives(GH_Structure objectives, ModelResul private static void SetModelMesh(GH_Structure modelMesh, ModelResult model) { + if (model.Draco == string.Empty) + { + return; + } var mesh = (Mesh)DracoCompression.DecompressBase64String(model.Draco); modelMesh.Append(new GH_Mesh(mesh), new GH_Path(0, model.Number)); }