I have a question about the Gene Pool component. I find it pretty usefull that you can set different values for each item. But let’s say that we have more than one branch. For example we have 3 branches and each of these branches contain 10 different items. Is there a way to create separate sliders for each item on each branch?
I don’t think so. because Gene Pool is really meant for Galapagos. Although many use it also as a kind of easier manageable group of sliders. You could always do stuff like partitioning.
Hi Michael
I think I just found a way to do it. But one needs Heteroptera’s Geen Pool Controller. You need to flatten the tree, count the list lenght, do whatever you want to do and then unflatten the tree. At this point is the only option which is working. But hey, at least there is a way
Or if there is a way to select one item, change its input, then go to another item, change that input and so on?
You mean different „domains“/„bounding“ for each slider in the genepool?
The trouble with the genepool is that you can’t input starting values easilly or generate the amount of sliders automatically without coding in C or one plug-in or another. So I am wondering if there is an easy way to have a slider which can change a specific index then store the change then move to the next index, change that value, store it, etc…
Let’s say I have to generate 3 curve netwroks, but I want to be able to manually define the angle between the U & V lines individually for each curve netwrok. They will stay on 3 branches. I can flatten the tree and after the said manipulations I can unfalletn it again if needed. The trouble is how to use the index and the value I want to input in such way that after I change to the next index, the manual value is stored.
Just for reference: it is actually pretty straightforward/terse to populate/manipulate genepools using one of the scripting components (admittedly one will need to know some C#/VB/Python). Here’s an example using GHPython:
I was looking at your earlier scripts. It does the job almoust perfectly.
150410_UpdateGenepool_GHPython.gh (6.8 KB)
Any idea how to publish the Gene Pool to the Remote Panel?
See point 6 in the thread above
Sorry, I was just leaving work and responded before I had the time to see things in detail. Is there anything you haven’t done already
Amazing guy!
Let’s say I have to generate 3 curve netwroks, but I want to be able to manually define the angle between the U & V lines individually for each curve netwrok
photoshop clipping path
spam or is there any question?
hi @davidsmavrov and @Mahdiyar @AndersDeleuran
how can we add RANGE, Decimal to these components?
Genepool.gh (12.2 KB)
from System import Decimal
if GenePool and Values :
# Check input values exist
if Values[0]:
# Get genepool input parameter (must be first input in this case)
gp = ghenv.Component.Params.Input[0].Sources[0]
# Update and reset genepool
if int(gp.Count) != len(Values) or Reset:
# Set gene pool count and values
gp.Count = len(Values)
for i in range(gp.Count):
gp[i] = Decimal(Values[i])
# Update gene pool
gp.ExpireSolution(True)
from System import Decimal
if genePool and values:
if values[0]:
gp = ghenv.Component.Params.Input[0].Sources[0]
if gp.Decimals <> decimals or gp.Maximum <> interval.Max or gp.Minimum <> interval.Min or gp.Count <> len(values):
gp.Decimals = decimals
gp.Maximum = interval.Max
gp.Minimum = interval.Min
gp.Count = len(values)
for i in range(gp.Count):
gp[i] = Decimal(values[i])
gp.ExpireSolution(True)
GenePool.gh (5.9 KB)
Thanks and greatly
i add some features (reset to variant value)
GenePool (1).gh (19.5 KB)
from System import Decimal
if genePool and values and decimals and interval:
if values[0]:
gp = ghenv.Component.Params.Input[0].Sources[0]
if gp.Decimals <> decimals or gp.Maximum <> interval.Max or gp.Minimum <> interval.Min or gp.Count <> len(values) or Reset:
gp.Decimals = decimals
gp.Maximum = interval.Max
gp.Minimum = interval.Min
gp.Count = len(values)
for i in range(gp.Count):
gp[i] = Decimal(values[i])
gp.ExpireSolution(True)
@AndersDeleuran and @Mahdiyar this is very used and I wish I found this earlier.
What needs to be done so the script runs in the new Python 3 component?
I asked Copilot but it couldn’t provide a solution that works.
Try posting a non-working example. I doubt any LLM would be trained on information regarding the new scripting components. And even if it were they are still under heavy development. Anywho, it’s likely related to the CPython Python.NET
interop breaking existing IronPython code, in any case @eirannejad might know.