Gene Pool component

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)