discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] function defined by recursion (How not to ...)

U
ufomorace
Thu, Aug 20, 2015 8:02 PM

Is there a way to change the recursion limit? in a CFG file or something? I
have seen it mentioned and i cannot find an option for it.

--
View this message in context: http://forum.openscad.org/function-defined-by-recursion-How-not-to-tp4299p13566.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Is there a way to change the recursion limit? in a CFG file or something? I have seen it mentioned and i cannot find an option for it. -- View this message in context: http://forum.openscad.org/function-defined-by-recursion-How-not-to-tp4299p13566.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Thu, Aug 20, 2015 8:18 PM

On 08/20/2015 10:02 PM, ufomorace wrote:

Is there a way to change the recursion limit? in a CFG file or something? I
have seen it mentioned and i cannot find an option for it.

No, there is no configuration for that. OpenSCAD tries to limit recursion
according to the available stack space, trying to maximize the nesting
level.

There is basic support for tail-call-elimination which turns specific cases
of recursion calls into loops. This currently cuts out at 1000000 iterations
to prevent infinite loops.
(see https://en.wikipedia.org/wiki/Tail_call)

ciao,
Torsten.

On 08/20/2015 10:02 PM, ufomorace wrote: > Is there a way to change the recursion limit? in a CFG file or something? I > have seen it mentioned and i cannot find an option for it. > No, there is no configuration for that. OpenSCAD tries to limit recursion according to the available stack space, trying to maximize the nesting level. There is basic support for tail-call-elimination which turns specific cases of recursion calls into loops. This currently cuts out at 1000000 iterations to prevent infinite loops. (see https://en.wikipedia.org/wiki/Tail_call) ciao, Torsten.