Hi Chris,
after a test on my file I got this error message :
source : rhinoScript
Error : Type mismatch in parameter. String requiered.
Line : 50
Char : 3
any idea why ?
Thanks
Paul
Added by paulcoudamy at 4:13am on February 1, 2013
a default VB script component:
Dim images As New List(Of Bitmap)
For i As Int32 = 0 To 9
Dim img As New Bitmap(50, 50, Imaging.PixelFormat.Format32bppArgb)
Dim G As Graphics = Graphics.FromImage(img)
G.Clear(Color.Transparent)
G.FillEllipse(Brushes.DarkRed, i * 2, i * 2, 16, 16)
images.Add(img)
Next
A = images
You'll get a list of 10 bitmaps that can be processed by any component that uses Generic data. So that bit of the request is already possible.
The hard part is how this data interacts with the rest of Grasshopper. Data Types in GH are very complicated classes, because they have to play nice with the rest of the system. They must be able to format themselves correctly, serialize and deserialize to and from GHX files, they must be able to convert themselves to other types (if this makes sense) and instantiate themselves from other types (again, if this makes sense), they must sometimes be able to draw themselves in the Rhino viewports, and bake themselves into the Rhino document.
Somehow you'd have to define these behaviours without writing any code, that sounds very difficult to me indeed. It's also very tricky to add custom types without putting additional responsibility on component developers.
I can see why this would be useful, but I honestly don't see a solution, or even a glimmer of an approach on how to tackle this. Sorry to rain on your parade.
--
David Rutten
david@mcneel.com
Seattle, WA…
Added by David Rutten at 8:49am on October 29, 2010
ns would be handy for Permutation Animations where multiple variables can be sequenced for better visualizations
Say we have 3 variables, A = 1- 100 : B = 50 - 600 : C = 100-200
Animation start with A=1, B=50 and C goes from 100-200 : then A=1, B=51 and C = 100-200 and once B gets to 600, A turns to 2... and so forth
And doing this manually takes a lot of time...
…
omponent.I need a little help to obtain a preview of a sub-set of these 50 items, via GH components, without using Rhino command "selection" because the items may intersect each other.eg I'd like a preview of items defined in rows #1 and #2. Then I'd like a preview of items defined in rows #3 and #4, ... and so on ...till rows 9 and 10.
Is it possible obtain these different sub-sets via GH components? managing a slider? the "cull" component?
My following target is to bake separately these sub-sets and copy them in different layers.See the attachment. Thanks.…
generations of 50 individuals) of the same model that I got NaN's on before. As far as I can tell, it shouldn't be a division by zero problem, I'm solving the following formula: (a/10*b)-(c*d)-(e*f)-(g*h). I did save the text outcome of the run but I'm not sure which gene is what so I'm not sure how to recreate the exact situation... Is there something you want me to try?
BTW, what is a collision?
cheers,
wim
Genome[24], Fitness=-300.29, Genes [3% · 33% · 98% · 7%]
{
Record: Point Mutation at index 3: 0.0465 -> 0.0497
}
Genome[25], Fitness=NaN, Genes [3% · 33% · 98% · 9%]
{
Record: Genome was mutated to avoid collision…
ole size)
The problem I am seeing from what I hope to achieve is that there are too many holes. It seems the script continues until I can't fit in any more circles. Can we limit the overal number as a percentage or a maximum number of circles that can be generated = say 50 or 100. Can that be dynamically controlled?…