I’m not sure if my previous post came through, so here goes again…

I’m creating a script to put diagonal lines on a roof surface, and then cut the surface to use as a reference for some adaptive components.

To do this, Ive selected a surface, defined its bounding box and MinPoint and MaxPoint, and as a product from them the two other corner points. The diagonal lines need to be generated from one out of four corners, depending on an angle that’s returned by a family placed in the midpoint.

If the angle is less than 90 degrees I need to use the bottom left corner as a base point, if it’s less than 180 the top left corner, etc. So I’m feeding this logic through a cascade of Of-statements; the result of the <360 block is linked to the False input of the <270 block, its result to the False input of the <180, and the output of that to the False of the <90 block. So basically, it is checking which corner to use based on the family’s angle. From that base point the start- and end points of the lines are generated from the Math.Cos and Math.Sin node.

The lines are generated and the most appropriate point chosen from the cascading If block, but for some reason if I change the angle to generate the lines from another corner, the base point doesn’t update. This means that the diagonal lines are outside the Bounding Box. It has been a pretty interesting learning curve to get to this point, but to hit such a snag so close to where I need to be is just frustrating.

Does anyone know what causes this, and how to fix it? Using Dynamo 0.8. Help appreciated, thanks in advance. Can post screenshots if needed.