openscad icon indicating copy to clipboard operation
openscad copied to clipboard

Animation should support both half-open and closed intervals

Open awwright opened this issue 10 months ago • 1 comments

I am attempting to animate a range of motion on a part, such that 0 is fully retracted and 1 is fully extended. However the animation feature doesn't seem to allow a part to be animated all the way to 1, it stops one frame short, at 0.9 in a 10-frame sequence, for example. As a result, I cannot animate my part fully closing.

It's possible this may be preferred for animating loops, but offering the closed interval, every value from 0 to 1 inclusive, is still correct. While someone looking to animate on a closed interval for a non-cyclic animation has no way to, I can animate a loop by rendering an animation on the closed interval and skipping or discarding the last frame.

awwright avatar May 13 '25 15:05 awwright

As you already mention, the half-open interval has it's uses too. So we should rephrase this to allow both half-open intervals for looping animations and closed interval for ping-pong or single-shot animations.

Just changing to closed interval is not going to happen as that would potentially all existing animation cases.

t-paul avatar May 13 '25 18:05 t-paul