Escalating problems
-
This is one which gets more complicated the more you get into it....a real challenge that I'll need to treat as a WIP.
I'm intending to parametrize some escalators I previously modelled. They need to extend sideways in 3" increments, as per the real thing...so the sides need to be separate from the treads. No real problem there.
At the same time, they need to be scaleable height-wise, to suit differing floor heights. Clearly, this requires an approach similar to that of a window; the two ends will be constant components and have a central, single tread/handrail component that will form a diagonal array as you pull the whole thing higher. However, the stair treads need to go up incrementally, while the overall height of the escalator need to be infinitely scaleable, as there is no fixed or incremental difference between stories.
Any discrepancy between the two is not much of a problem on the treads themselves...you just end up with one that has less of a drop than all the rest, as if it is appearing/disappearing into the mechanism at either end. However, you can't have the same sudden discrepancy in the length of handrail that accompanies it. It's a different problem than with stairs, which all tend to have a fixed rise and run. Escalators, on the other hand, have a fixed angle of ascent with a varying rise and run at either end.
You can get around this problem by allowing the last section of handrail in the array to partly overlap the previous one. As the edges are already hidden it works fine; you don't even get any z-fighting. The killer is that many such escalators have smoked glass sides...and where such panels overlap, the glass is twice as opaque as on the rest of the side.
In short, I need to produce an effect as if the whole thing is extending telescopically upwards, adding stairs as it goes. To ensure that the final stair is correct, I need to work out a function that will add a full new stair as soon as the previous stair has been completed. The new stair will initially start out at the same height as the previous one, but will slowly rise to its full extent during the last phase of the resize, as the top section of the escalator is pulled up to the level of the upper floor. So the more you see of the tread on the top stair appearing from underneath the footplate, the higher that stair will need to be.
You wouldn't need to do this manually, of course. There will simply be a preset range of inputs for width and an open input for height, but the model will still need to make those calculations for the placement of the topmost stair. Lots of "IF"s in there, methinks.Like I said...it's get trickier the more you study it. I reckon I'll know just about everything there is to know about DCs by the time I've cracked this one.
I've given up on the idea of actually animating the whole thing as well...uber-cool though that would be. I guess it might not be too difficult to animate a fixed-size one though. How about that for the next DC Challenge?
-
My feeling is that you might have problems getting an escalator to work as a DC, to many variables to make the escalator fully parametric.
Although more for the Ruby forum:
I already have an escalator plugin which displays the setout dynamically as you go for flr/flr height, width and number of lead in steps. What I want from Sketchup is a way of tapping into the DC dialogs to set parameters but using my ruby code to draw the escalator.Any thoughts from the guys at Google?
-
Bill,
You can read and write the attributes of a DC using Ruby. They are stored in an attribute dictionary attached to the DC named "dynamic_attributes".
In addition, it appears you can write your own custom Ruby callbacks for onClick, although I haven't been 100% sucessful in doing it; AdamB has said he added this to his LightUp plugin.
-
It's looking like you can get it to work as a DC, after all. James has managed to get it to scale ok. The parametric widths ought to be a piece of cake after that.
-
@jim said:
Bill,
In addition, it appears you can write your own custom Ruby callbacks for onClick, although I haven't been 100% sucessful in doing it; AdamB has said he added this to his LightUp plugin.This sounds very interesting. I was wondering about that the other day.
Advertisement