RailClone > RailClone Pro (*)

Divide Y size in half for sliding sash


I've been over a few versions of this today, and this is the neatest I've got so far, but I'm not quite there because of a stmbling block, namely calling dividing my Y size in half, in order that I can stack two of the sashes over each other.

Any suggesions or tutorials on how to make this work? End goal is a sliding sash where the X and Y base objects extend to the perimter of the window, with the top sash able to slide down via a parameter, and mullions and transoms adjustable with a parameter.

I realise I can probably just use the same array for top and bottom sashes, as the 'nibs' will just stick into the cill and not be visible, but it's how to call the half heigh of the window. I tried using a shorted Y spline, but it didn't feel good having to guess where the end of it should be.

I see there's a Y spline variable' macro, but can't figure out how to use it to call the Y spline length and put this into an arithmetic node.

I guess I could have two sets of X and Y splines, but this feels messy.

So I got it working last night using a mess of sequence and transform nodes. Haven't added the sliding sash functionality yet, that'll make it even more messy.

Would be much neater if I could call that Y height and divide it in half. Can't seem to export Y size from an 2D array but can from a transform node, so one idea is to create a (dummy) 2D array with blank segments, wire it in to a transform node and export the Y size from that into the 2D generators.

Any better methods?

Paul Roberts:

hanks for the question. I find the easiest solution is to next the segments inside a 2D generator instead of a 1D generator. In that way you can access the Y Size of the array and use it to control the attributes of any attached generators. For example, if the end generator is an A2S called top_sash, I can access the Y Size and divide it by two using the expression return top_sash.YSplineLength/2;

In the attached file I've used this technique to set the size of the top and bottom sashes. I've also added a Constant node to control the size of the overlap in the middle and for good measure, used the same value with a multiplier to allow you to open the top and bottom sashes.

I hope that helps, please let me know if any aspect needs further explanation.

All the best,

Check it out, really handy expression that I'm probably going to use a lot. Thanks!

I see what you're saying about nesting in a 2D array too....I think. going to try setting it up from scratch now & will check out that other functionality you added later.

Thanks again!


[0] Message Index

Go to full version