Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve paths when returning a tree #271

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/compute.geometry/GrasshopperDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ public Schema Solve()
outputTree.ParamName = kvp.Key;

var volatileData = param.VolatileData;
for (int p = 0; p < volatileData.PathCount; p++)
foreach (var path in volatileData.Paths)
{
var resthopperObjectList = new List<ResthopperObject>();
foreach (var goo in volatileData.get_Branch(p))
foreach (var goo in volatileData.get_Branch(path))
{
if (goo == null)
continue;
Expand Down Expand Up @@ -768,7 +768,7 @@ public Schema Solve()
}
}

GhPath path = new GhPath(new int[] { p });
// preserve paths when returning data
outputTree.Add(path.ToString(), resthopperObjectList);
}

Expand Down