# Entwine and TreeBranch

hello everyone, i have a problem with making an “if expression” seperate my final results in a code,
as you see in this gh code i want to make change the results through checking the data in if expression (if x> R) and have two different ways (multiplication or division) due to their expression result.
is anyone here helping me with this?Entwine and TreeBranch.gh (7.0 KB)

See attached (if I got correctly(?) what you want to do)

Entwine and TreeBranch_V1.gh (10.9 KB)

thanks but i didn’t understand why you used “cull pattern” and “split tree”
anyway, list length of the expression and the two output of split tree doesn’t match, is it okey?

Well … you want to apply the filtering (via the expression) to some “derivant” trees (entwine) or not? If so the cull is also filtering the tree due to entwine . Split is used in order to see separately the results.

1 Like

what i really want is to make a seperation by the “if expression” like this:
if the numbers are lower than 6,divide them by 2,
if not, make a multiplication by 7,

so if we take a series of (0,1,2,…,9) to the input, the result should be:
0, 0.5, 1, 1.5, 2, 2.5, 42, 49, 56, 72Entwine and TreeBranch_V1.gh (11.9 KB)

You just need sift and combine.

SiftCombine.gh (10.1 KB)

1 Like

thanks, and how can i combine it with an " if expression"?

anyway i want to use “entwine” because i want to use some components written in my algorithm, not just making a mathematical function, it was just an example