Skip to content

Require openscad_cpp_evaluator 0.41.0 - #281

Merged
revarbat merged 1 commit into
mainfrom
eval-0.40.0
Aug 22, 2026
Merged

Require openscad_cpp_evaluator 0.41.0#281
revarbat merged 1 commit into
mainfrom
eval-0.40.0

Conversation

@revarbat

@revarbat revarbat commented Aug 22, 2026

Copy link
Copy Markdown
Member

Brings BelfrySCAD/openscad_cpp_evaluator#107 and #108.

children() takes a vector or range

children([3:1:5])    // children 3, 4, 5
children([3:-1:1])   // children 3, 2, 1 -- in that order
children([2,2,2])    // child 2, three times

Before, a vector or range was accepted syntactically and then silently ignored — every such form rendered child 0, with no warning of any kind.

Backwards ranges warn, but only for an implicit step

for (x=[3:1])      // WARNING: begin is greater than the end, but step is positive
for (x=[3:-1:1])   // silent
for (x=[1:3])      // silent
for (x=[1:1:3])    // silent

Spelling out the step is taken as deliberate. This is a divergence from OpenSCAD, which warns for the explicit forms as well — recorded in the wiki's Differences from OpenSCAD table, with the full rule on Language-Syntax → Backwards ranges.

The warning belongs to the range, not the loop, so this reports too:

r = [5:0];         // warns, even though nothing iterates r

That matches where the reference puts it, and is a case the first attempt at this feature missed entirely.

Release hygiene

The first uv lock after publishing caught only 5 of 7 files — the same PyPI simple-index propagation race that has bitten this process twice before. Re-locked after confirming the index listed all 7, then verified against the published wheel rather than a local build, under both engines:

VM=0 and VM=1, byte-identical:
WARNING: ... line 5     <- r = [5:0], never iterated
WARNING: ... line 1     <- for (x=[3:1])
ECHO: "c3" "c2" "c1"    <- children([3:-1:1])

Version bump only, 0.76.6 → 0.77.0.

🤖 Generated with Claude Code

Brings two evaluator changes (openscad_cpp_evaluator#107, #108).

children() takes a vector or range index. children([3:1:5]) is children(3);
children(4); children(5), and children([3:-1:1]) runs them in that order.
Before, a vector or range was accepted and then silently ignored -- every
such form rendered child 0, with no warning.

Backwards ranges now warn, but only when the step was not written:

    for (x=[3:1])      // WARNING: begin is greater than the end...
    for (x=[3:-1:1])   // silent
    for (x=[1:3])      // silent
    for (x=[1:1:3])    // silent

Spelling out the step is taken as deliberate. That is a divergence from
OpenSCAD, which warns for the explicit forms too, and it is recorded on the
wiki's Language-Reference "Differences from OpenSCAD" table.

The warning belongs to the range rather than to the loop, so `r = [5:0];`
reports even though nothing iterates r -- matching where the reference puts
it, which is a case we previously missed entirely.

Locked after confirming the PyPI simple index listed all 7 files: the first
lock attempt caught only 5, the same propagation race that has bitten this
release process twice before. Verified against the published wheel rather
than a local build, under both engines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@revarbat revarbat changed the title Require openscad_cpp_evaluator 0.40.0 Require openscad_cpp_evaluator 0.41.0 Aug 22, 2026
@revarbat
revarbat merged commit 820366d into main Aug 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant