Skip to content

Commit

Permalink
Merge pull request #277 from hrntsm/fix/fish-print-by-capture-expire
Browse files Browse the repository at this point in the history
Fix/fish print by capture expire
  • Loading branch information
hrntsm authored Mar 20, 2024
2 parents b0f2cc8 + d0f5363 commit 7cae88e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Please see [here](https://github.com/hrntsm/Tunny/releases) for the data release

- DeconstructFish component output
- To support categorical optimization, the variable output was split from "Variables" into "NumberVariables" and "TextVariables".
- Move FishPrint component to Print subcategory
- Use optuna.csproj sqlite handler instead of tunny.storage
- Improve result fish output to use new storage handler
- The handler is independent from python process.
Expand Down
2 changes: 1 addition & 1 deletion Tunny.Core/Tunny.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<Version>0.11.0-beta.1</Version>
<Version>0.11.0.4</Version>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>latest-recommended</AnalysisLevel>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tunny/Component/Optimizer/OptimizerComponentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Grasshopper.Kernel.Special;

using Tunny.Component.Params;
using Tunny.Component.Util;
using Tunny.Component.Print;
using Tunny.Core.Input;
using Tunny.Core.TEnum;
using Tunny.Core.Util;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
using Tunny.Component.Params;
using Tunny.Resources;

namespace Tunny.Component.Util
namespace Tunny.Component.Print
{
public class FishPrintByCapture : GH_Component
{
public FishPrintByCapture()
: base("Fish Print by Capture", "FPCap",
"Creates a capture of the currently active viewport.",
"Tunny", "Util")
"Tunny", "Print")
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
using Tunny.Component.Params;
using Tunny.Resources;

namespace Tunny.Component.Util
namespace Tunny.Component.Print
{
public class FishPrintByPath : GH_Component
{
public FishPrintByPath()
: base("Fish Print by Path", "FPPath",
"Create Fish Print by file path.",
"Tunny", "Util")
"Tunny", "Print")
{
}

Expand Down
4 changes: 0 additions & 4 deletions Tunny/UI/OptimizeWindowTab/VisualizeTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ private static bool CheckClusteringTargets(Plot pSettings)
{
TLog.MethodStart();
bool result = true;
if (pSettings.TargetObjectiveIndex.Length > 0 && pSettings.TargetVariableIndex.Length > 0)
{
TunnyMessageBox.Show("Both variables and objects are selected, but the objects are clustered in the target.\nIf you want to target variables, deselect the objectivesThis visualization type is not supported in this study case.", "Tunny");
}
if (pSettings.TargetObjectiveName.Length == 0 && pSettings.TargetVariableName.Length == 0)
{
TunnyMessageBox.Show("Please select one or more.", "Tunny");
Expand Down
10 changes: 10 additions & 0 deletions Tunny/Util/GrasshopperInOut.cs
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,22 @@ public void NewSolution(IList<Parameter> parameters)
string[] categoryParameters = parameters.Where(p => p.HasCategory).Select(p => p.Category).ToArray();
SetSliderValues(decimalParameters);
SetCategoryValues(categoryParameters);
ExpireObjectives();
Recalculate();
SetObjectives();
SetAttributes();
SetArtifacts();
}

private void ExpireObjectives()
{
TLog.MethodStart();
foreach (IGH_Param param in _component.Params.Input[1].Sources)
{
param.ExpireSolution(false);
}
}

public string[] GetGeometryJson()
{
TLog.MethodStart();
Expand Down

0 comments on commit 7cae88e

Please sign in to comment.