algorithmic modeling for Rhino
The attached script seems to work. It's a bit proof-of-concept. It always exports the "Perspective" viewport, and always at the same size as the viewport. Also the names of the exported images are just incremental numbers, rather than showing the slider values.
Also please note that it will iterate over all possible slider values, so if you have 6 sliders that go from 0.0 to 10.0 with 3 decimal places, then you'll have to wait for (10x1000)6 = 1 septillion solutions.
--
David Rutten
david@mcneel.com
Improvement:
// We've just got a new valid permutation. Solve the new solution.
e.Document.NewSolution(false);
Rhino.RhinoDoc.ActiveDoc.Views.Redraw();
if (e.Document.SolutionState == GH_ProcessStep.Aborted)
return;
This will cancel the entire permutation run if the user aborts a single solution.
--
David Rutten
david@mcneel.com
Hi David,
Is there anyway that any output can be set at the end of the solution? In SolveInstance I have set the output but it cannot set correctly bec the solution hasn't started yet and not collecting any data yet. myOutTree is a global variable,
Thank you,
// Call the method
doc.SolutionEnd += OnSolutionEnd;
}
// Set the data tree
DA.SetDataTree(0, myOutTree); // This cannot be set correctly
Impressive, the maths blew my mind a bit, thinking about how many permutations my current definition has.
10 to the power of the number of decimals each slider has, multiplied by the range of the slider, then all sliders multiplied together.
--
David Rutten
david@mcneel.com
Hello everybody,
Is there a way to apply the permutations for a selection of sliders only?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by