SolidCode / SolidPython

A python frontend for solid modelling that compiles to OpenSCAD
1.11k stars 173 forks source link

Regression from PR #65: runaway recursion #79

Closed etjones closed 5 years ago

etjones commented 7 years ago

@conorpp supplies this code, which recurses without exit after the merged operations in PR #65:

r = cube(10)
p = cube(4)
p = r * p
r -= p
scad_render(r)

Fix.

etjones commented 7 years ago

Can't duplicate. Will close before long unless I can figure out why this happened.

etjones commented 7 years ago

This is supposed to dupe:

    r = cube(10)

    r -= cube(1)  # missed step

    p = cube(10)
    p = r * p

    r -= p

    scad_render(r)

Checking

hstarmans commented 7 years ago

confirmed the current code cannot be used, get recursion errors everywhere; revert to cd2574a3b98267abef290673d4272b9d0a1c39f1

git checkout cd2574a3b98267abef290673d4272b9d0a1c39f1

nickc92 commented 5 years ago

Ok, this has been fixed. The root cause was essentially the same cause as an issue of runaway recursion that I had seen, which was introduced when a change was made that was intended to streamline the generated OpenSCAD code. The fixed version is there in git and PyPI.