Just discovered that functions and modules can be defined locally within a
module. After searching the documentation and forum, can't determine if this
is an officially supported feature.
Question: Is this a feature of the language or might it go away at some
point?
...very useful!
RAS
--
Sent from: http://forum.openscad.org/
It's widely used, so won't be going anywhere.
Admin - email* 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.
Sent from: http://forum.openscad.org/
What?
You mean I can do a:
module mypart(){
module mysubpart(){
//Do stuff
}
mysubpart();
}
Mysubpart wouldn't be visible outside mypart?
That would be amazingly useful, and should definitely be documented!
--
Sent from: http://forum.openscad.org/
Yes you can do that. Also mysubpart() can access the variables in mypart().
On Thu, 10 Jan 2019 at 07:26, Troberg troberg.anders@gmail.com wrote:
What?
You mean I can do a:
module mypart(){
module mysubpart(){
//Do stuff
}
mysubpart();
}
Mysubpart wouldn't be visible outside mypart?
That would be amazingly useful, and should definitely be documented!
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Troberg wrote
That would be amazingly useful, and should definitely be documented!
Now mentioned in the wiki
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/User-Defined_Functions_and_Modules
.
Admin - email* 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.
Sent from: http://forum.openscad.org/