Nabble has removed Mailing-list integration.
Posts created here DO NOT GET SENT TO THE MAILING LIST.
Mailing-list emails DO NOT GET POSTED TO THE FORUM.
So basically the Forum is now out of date, we are looking into migrating the history.
Hello together,
I'm a beginner in OpenSad and I'm really confused about the result of this simple example: Code: Size=3; if (5>2) {Size=6; echo("Size=",Size);} echo("Size=",Size); Result: ECHO: "Size=", 6 ECHO: "Size=", 3 Why is the latest echo 3 and not 6? It seems to me that in 'if' condition variables cannot be set. Best regards and thank you in advane for your help! Sven ----- I'm using OpenScad Version 2019.05 -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I'm using OpenScad Version 2019.05
|
I suggest that you read https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables and after that bring your doubts here. I will be glad to answer them. Em seg., 25 de mai. de 2020 às 16:22, SNT <[hidden email]> escreveu: Hello together, _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by SNT
No the Size you define inside braces is a different version and does not last outside the braces. Use something like this. Size = 5 > 2 ? 6 : 3; echo(Size); On Mon, 25 May 2020 at 16:22, SNT <[hidden email]> wrote: Hello together, _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
In reply to this post by Ronaldo
Thank you pretty much Ronaldo! I didn’t read this topic so far. Now It‘s clear to me and I can proceed! Best regards Sve (SNT) Von: Discuss <[hidden email]> Im Auftrag von Ronaldo Persiano I suggest that you read https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables and after that bring your doubts here. I will be glad to answer them. Em seg., 25 de mai. de 2020 às 16:22, SNT <[hidden email]> escreveu:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I'm using OpenScad Version 2019.05
|
In reply to this post by nophead
This is a behavior that seems to surprise a lot of people new to OpenSCAD. The language looks like a procedural language (something like C or Java), but it isn't. Once you realize that these aren't statements, that are executed one after another, the issue makes more sense. The best explanation I have found is the one from kevfquinn in this thread: https://www.thingiverse.com/groups/openscad/forums/general/topic:31166 Regards, Jan On Mon, May 25, 2020 at 12:30 PM nop head <[hidden email]> wrote:
Jan Wieck Principal Database Engineer _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org |
Hello together, After some challenges with 'too long rendering time' ( obviously a typical beginner argument), mainly based on lots of extrude of dxf file commands, I easily fixed the time problem by closing the lines in the dxf file and the use of $fa instead of $fn. In the meanwhile I feel pretty much fine and for me its not a problem to wait one or two hours on the rendering. Thank you very much again for the support I got in this forum! Greetings from Sven (SNT)
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
I'm using OpenScad Version 2019.05
|
Free forum by Nabble | Edit this page |