If Statements and Decisions

Hi There. I am working on creating something I have been sketching by hand for a while and want to see how I can iterate it with GH by just moving the initial points and changing the border. I’m a novice with GH and figured this is a good way to learn, but I am at a standstill.

Geom Sketch 001.3dm (43.3 KB)

See attachment for steps. I am stuck at Step 4.
I can make the red shape with all rounded corners using Nurbs Curves or Splines, but what I think I need to do is analyze the angle of the lines generated from Step 2 and use that to determine whether the corner is rounded or sharp. The rule I have made for myself that I think could be an IF statement is: If the interior angle is <= 90 deg then it is rounded with a Nurbs Curve. If it the interior angle is > 90 deg then it is sharp as shown.

I have found tools to analyze the angles, but have not found any ways to make GH use that to make a decision between the two options. I have tried kinky curve but have not had much luck. I have looked into If Statements in GH, but the examples I’ve found don’t let me tell GH “If this angle, then make this. Else make this.”

Thank you!

several ways of doing an ‘if’ statement. logically one of the betters ones is to use a ‘>’ or “<” comparison, coupled with a ‘dispatch’, this works well for simple comparisons. another way, you can use ‘expression’ to actually do an IF THEN ELSE

Have a try this way.

Conditional_Fillet_re.gh (16.1 KB)

Thank you! I will give these a shot and let you know. The solution by HS_Kim looks very close.