POV-Ray : Newsgroups : povray.bugreports : Cannot predeclare spline for function : Re: Cannot predeclare spline for function Server Time
6 Nov 2025 04:56:50 EST (-0500)
  Re: Cannot predeclare spline for function  
From: Bald Eagle
Date: 4 Nov 2025 06:20:00
Message: <web.6909e0e4672aec271f9dae3025979125@news.povray.org>
"Leroy" <whe### [at] gmailcom> wrote:

> #declare S_PX2 = function {
>         spline{
>          linear_spline
>          #for(S_K, 0, S_NSites2D-1)
>              S_K, A1D_V_P2D[S_K].x,
>          #end
>      }}

Yes and that is indeed what I did.

However it seems to be bad behaviour by the parser, and locks the spline into a
single-use object.

IIRC, I can use pre-declared splines in sphere_sweep without a problem.

The inability falls under the "contrary to user expectation", and that's why
it's in this section.

Thank you, of course, for providing the workaround.
I wonder how many other things we have like this lurking around in the source.

- BE


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.