Trying to figure out how to work with empty data tree

Hello everyone.

I’m trying to make a pavilion where the top of it kinetic, so you can imagine it as a sort of kinetic facade whose area of openings correspond to the sun, but instead of facade it becomes the roof. The basic surface of the roof itself is morphed and not flat. So, the way I made it is there will be these surfaces that rotate to each of its axis, and the angle of rotation is proportional to the distance of each panel’s center point to the intersection point (which works as the attractor point) of the line that connects the sun to the center of the pavilion and the pavilion surface. Only reason I made it this way and not simply have the attractor point be the sun is because my surface is morphed, so when the sun is on top of the morphed area (which goes down), the distance of the bottom of the morphed area to the sun will not be remapped to something close to zero, even though when the sun is on top of it it’s supposed to close.

My problem here is that when the sun isn’t on top of the surface, and the line doesn’t intersect with the surface top, there will be no intersection point and thus all the lofts are gone. I want it so that when the sun isn’t on top of it, the surfaces will just rotate all the way to its max possible angle, but that would mean I have to make it so that it happens only when the attractor point container is empty, and I’m not sure how to go about doing that. I hope I’m making myself clear enough.

Any help would be greatly appreciated, though I would prefer it if anybody can explain how I can do the aforementioned thing and not rebuild my definition because I want to learn how to do it should I come across such case again in the future.
Thank you in advance!
Sunshade pavilion (28.7 KB)

you can simply set a condition: if there is no intersection, the value of rotation is a constant amount for all (maybe 0). I don’t get your point by saying the lofts ar gone. because in your definition, the lofts are independent of the intersection point.

Hello Mahan,

thank you for replying. I just found out about the “null item” component whose output is true/false and that’s one of the things I needed apparently. Now I need to figure out what component to use to decide which condition gets through to the rotate axis component, but I’m not sure how to do it.

Also, I’m sorry for the confusion, but what I meant by “loft” on my original post I mean the surfaces on the “sunshade” container on the right end of the definition. The loft components indeed are independent of the intersection point.

Then you can use “Sift pattern” to make different operation on nulls.

Hello Mahan,

once again thank you very much for replying. I tried using sift pattern and was clueless as to how it’d help me, but when I was searching the internet for a solution I stumbled upon the expression component which proved to be more intuitive.
Thank you for the help. Cheers! :grinning: