R
runsun
Fri, Dec 9, 2016 2:25 AM
- $fn failed to be set in a module call:
module Cylinder(pq,$fn=4)
{
echo(str("In Cylinder, $fn= ", $fn ));
}
module Line(pq, $fn=5)
{
echo(str("In Line, $fn= ", $fn ));
Cylinder(pq=pq, $fn=$fn); // <=== unabled to set $fn here
}
Cylinder([]); // "In Cylinder, $fn= 4"
Cylinder([], $fn=10); // "In Cylinder, $fn= 10"
Line( pq=[] );
//ECHO: "In Line, $fn= 5"
//ECHO: "In Cylinder, $fn= 4" // <=== should have been 5
Line( pq=[], $fn=30 );
// ECHO: "In Line, $fn= 30"
// ECHO: "In Cylinder, $fn= 4" // <=== should have been 30
- Same issue happens in function call:
function f($fn=4)= $fn;
function g($fn=5)= f($fn);
echo( f() ); // 4
echo( f(30) ); // 30
echo( g() ); // expect 5, got 4
echo( g(30) ); // expect 30, got 4
- But if $ is used in common variable, say $a, it doesn't have this issue:
function f2($a=4)= $a;
function g2($a=5)= f($a);
echo( f2() ); // 4
echo( f2(30) ); // 30
echo( g2() ); // 5
echo( g2(30) ); // 30
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ), support_tools
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
1) $fn failed to be set in a module call:
> module Cylinder(pq,$fn=4)
> {
> echo(str("In Cylinder, $fn= ", $fn ));
> }
>
> module Line(pq, $fn=5)
> {
> echo(str("In Line, $fn= ", $fn ));
> Cylinder(pq=pq, $fn=$fn); // <=== unabled to set $fn here
> }
>
> Cylinder([]); // "In Cylinder, $fn= 4"
> Cylinder([], $fn=10); // "In Cylinder, $fn= 10"
>
> Line( pq=[] );
> //ECHO: "In Line, $fn= 5"
> //ECHO: "In Cylinder, $fn= 4" // <=== should have been 5
>
> Line( pq=[], $fn=30 );
> // ECHO: "In Line, $fn= 30"
> // ECHO: "In Cylinder, $fn= 4" // <=== should have been 30
2) Same issue happens in function call:
> function f($fn=4)= $fn;
> function g($fn=5)= f($fn);
>
> echo( f() ); // 4
> echo( f(30) ); // 30
> echo( g() ); // expect 5, got 4
> echo( g(30) ); // expect 30, got 4
3) But if $ is used in common variable, say $a, it doesn't have this issue:
> function f2($a=4)= $a;
> function g2($a=5)= f($a);
>
> echo( f2() ); // 4
> echo( f2(30) ); // 30
> echo( g2() ); // 5
> echo( g2(30) ); // 30
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ), support_tools
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
T
thehans
Mon, Dec 12, 2016 3:56 AM
What version are you using? I don't see any such errors in the nightly build
nor OpenSCAD 2014.01.29 on Ubuntu 14.04
Output from your code:
ECHO: "In Cylinder, $fn= 4"
ECHO: "In Cylinder, $fn= 10"
ECHO: "In Line, $fn= 5"
ECHO: "In Cylinder, $fn= 5"
ECHO: "In Line, $fn= 30"
ECHO: "In Cylinder, $fn= 30"
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19543.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
What version are you using? I don't see any such errors in the nightly build
nor OpenSCAD 2014.01.29 on Ubuntu 14.04
Output from your code:
ECHO: "In Cylinder, $fn= 4"
ECHO: "In Cylinder, $fn= 10"
ECHO: "In Line, $fn= 5"
ECHO: "In Cylinder, $fn= 5"
ECHO: "In Line, $fn= 30"
ECHO: "In Cylinder, $fn= 30"
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19543.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Dec 12, 2016 4:08 AM
version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is a
new issue.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ), support_tools
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19544.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is a
new issue.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ), support_tools
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19544.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Mon, Dec 12, 2016 4:43 AM
2016.11.11 Windows 64
ECHO: "In Cylinder, $fn= 4"
ECHO: "In Cylinder, $fn= 10"
ECHO: "In Line, $fn= 5"
ECHO: "In Cylinder, $fn= 5"
ECHO: "In Line, $fn= 30"
ECHO: "In Cylinder, $fn= 30"
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19545.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
2016.11.11 Windows 64
ECHO: "In Cylinder, $fn= 4"
ECHO: "In Cylinder, $fn= 10"
ECHO: "In Line, $fn= 5"
ECHO: "In Cylinder, $fn= 5"
ECHO: "In Line, $fn= 30"
ECHO: "In Cylinder, $fn= 30"
ECHO: 4
ECHO: 30
ECHO: 5
ECHO: 30
-----
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19545.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Mon, Dec 12, 2016 5:11 AM
On Dec 11, 2016, at 23:08, runsun runsun@gmail.com wrote:
version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is a
new issue.
I believe this was fixed ca. October 28th.
-Marius
> On Dec 11, 2016, at 23:08, runsun <runsun@gmail.com> wrote:
>
> version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is a
> new issue.
>
I believe this was fixed ca. October 28th.
-Marius
NH
nop head
Mon, Dec 12, 2016 11:53 AM
Where did you get that version. Do you build it yourself?
On 12 December 2016 at 05:11, Marius Kintel marius@kintel.net wrote:
On Dec 11, 2016, at 23:08, runsun runsun@gmail.com wrote:
version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is
>2016.11.11 Windows 64
Where did you get that version. Do you build it yourself?
On 12 December 2016 at 05:11, Marius Kintel <marius@kintel.net> wrote:
> > On Dec 11, 2016, at 23:08, runsun <runsun@gmail.com> wrote:
> >
> > version 2016.10.04 (git 7e0935d) on Windows. I did suspect that this is
> a
> > new issue.
> >
> I believe this was fixed ca. October 28th.
>
> -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
M
MichaelAtOz
Mon, Dec 12, 2016 12:31 PM
Where did you get that version. Do you build it yourself?
nophead wrote
>>2016.11.11 Windows 64
> Where did you get that version. Do you build it yourself?
http://files.openscad.org/snapshots/
-----
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19548.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Mon, Dec 12, 2016 12:33 PM
Specifically:
http://files.openscad.org/snapshots/OpenSCAD-2016.11.11-x86-64.zip
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19549.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Specifically:
http://files.openscad.org/snapshots/OpenSCAD-2016.11.11-x86-64.zip
-----
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
View this message in context: http://forum.openscad.org/fn-bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19549.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Mon, Dec 12, 2016 1:00 PM
Oh I see, the website download page is out of date then. I thought it
always showed the latest snapshot.
On 12 December 2016 at 12:33, MichaelAtOz oz.at.michael@gmail.com wrote:
Oh I see, the website download page is out of date then. I thought it
always showed the latest snapshot.
On 12 December 2016 at 12:33, MichaelAtOz <oz.at.michael@gmail.com> wrote:
> Specifically:
> http://files.openscad.org/snapshots/OpenSCAD-2016.11.11-x86-64.zip
>
>
>
>
> -----
> Admin - PM me if you need anything, or if I've done something stupid...
>
> Unless specifically shown otherwise above, my contribution is in the
> Public Domain; to the extent possible under law, I have waived all
> copyright and related or neighbouring rights to this work. Obviously
> inclusion of works of previous authors is not included in the above.
>
> The TPP is no simple “trade agreement.” Fight it!
> http://www.ourfairdeal.org/ time is running out!
> --
> View this message in context: http://forum.openscad.org/fn-
> bug-fn-failed-to-be-set-in-the-argument-of-a-call-tp19512p19549.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
TP
Torsten Paul
Mon, Dec 12, 2016 5:47 PM
Oh I see, the website download page is out of date
then. I thought it always showed the latest snapshot.
Those are still a bit inofficial as there's a build issue
that needs to be solved (related to reading compressed
files). I currently have no time to spend on that.
If that's solved, the website will track latest builds
again.
ciao,
Torsten.
Von: "nop head" <nop.head@gmail.com>
> Oh I see, the website download page is out of date
> then. I thought it always showed the latest snapshot.
>
Those are still a bit inofficial as there's a build issue
that needs to be solved (related to reading compressed
files). I currently have no time to spend on that.
If that's solved, the website will track latest builds
again.
ciao,
Torsten.