Problem with selecting objects according to a criteria

This may sound a little bit complicated but i’ll try to keep it as simple as possible. I’m trying to create a tool that designs roof layers according to climate conditions. Basically, the user will input one piece of information about their climatic condition (in the attached example I’ve put in air temperature as the example input) and they should receive a selection of the most appropriate roof layer type according to their input (in the attached example, the air temperature is supposed to determine the type of insulation recommended).

So once the input has been typed in, I’ve got an expression going that categorises the numeric inputs in categories (3 categories in the attached example, represented by numbers 1, 2 and 3. 1 is for any input lower than 28, 2 is any input that equals 28, and 3 is for any input higher than 28).

My goal is that once I have obtained the category number the numeric input falls into, it’s supposed to select the correct curve that has been pre-made for the specified category (in the attached example, category 1 is supposed to select “insulation type 1”, category 2 is supposed to select “insulation type 2”, and category 3 is supposed to select “insulation type 3”).

So my problem is that I’m not sure how to go about with this. My first issue is that I don’t know how to link the obtained category number from the numeric input which the user provides with my pre-made curve containers which are supposed to represent specific categories. My second issue is that I’m not sure if this is the most effective way of achieving my goal. I’m very open to suggestions on how to make this work through other methods.

Thanks very much for reading :smile:

Example.gh (8.7 KB)

You can set up three numeric domains for your temp ranges (-100 to 27.9), (27.9 to 28.1), and (28.1 to 100). If your middle range is only a single number you’re unlikely to ever hit it exactly, better give it some width.

Once you have a list of intervals and a number, you can use the Find Domain component to get the index of the appropriate temperate range.

This index then allows you to pick one of the curves out of a list of three curves: curve selector.gh (15.9 KB)

Well … it’s not that simple.Assuming that we are talking real-life AEC stuff there’s many other factors to consider for arriving into some “safe” insulation proposal: longevity, price, water absorption (renders any insulation other than Foamglas obsolete over time), compatibility with water insulation layers, installation/availability factors … blah, blah.

PS: Most important thingy: dew point (Google that)

For instance see these types: almost anything (except Foamglas) has no place in a contemporary world (but the perfect thing costs 350+E/m3) .

Thanks for your insight Peter! For my case, insulation was only an example and only a small part of my project, not the main focus at all. But I appreciate this information regardless. Also it’s just a university project, it’s not about creating something usable in real life, more so about showing I’ve got the skills and knowledge to create something like this. :slight_smile:

Thanks David! I’ll have a look at your file and let you know if I’ve got any other questions. Much appreciated :slight_smile: