revarbat / BOSL

The Belfry OpenScad Library - A library of tools, shapes, and helpers to make OpenScad easier to use.
https://github.com/revarbat/BOSL/wiki
BSD 2-Clause "Simplified" License
571 stars 62 forks source link

list_range(n,s,e) should return n items spaced exactly from s to e #48

Closed adrianVmariano closed 5 years ago

adrianVmariano commented 5 years ago

The behavior of list_range when you give n, s, and e is bizzare. It uses the step size (default 1), starts at s, and goes until either reaching e or getting to n items. It's hard to see a use for this behavior.

Meanwhile, the very useful case of spanning exactly from e to s with n items seems to be missing. (Is it somewhere else?)

revarbat commented 5 years ago

I can see the merit in this.

revarbat commented 5 years ago

Implemented in 7c305fed0f5d8a8bf180b58d8c8e11f5c9eeed1c