There has been a lot of discussion about summing up something in OpenSCAD.
Wouldn't it be worth to add feature request for a sum(list) primitive to
OpenSCAD? Especially newbies, who aren't running their own libs or writing
functions, would appreciate this.
Not having a sum(), is like not having a len() function and having to
implement it on your own:
echo(len([1,2,3, 7]));
function len(X=[],i=0) = X[i]== undef?0:1+len(X,i+1);
I mean we have functions like cross(), norm(), abs(), min(), max(), floor(),
ceil(), sign(), sqrt() - to name the most prominent ones - which could all
be implemented by the users as well, so why is sum() missing?
Personally I also wouldn't be unhappy with a basic set of file functions,
like fopen(), fecho(), to eventually leave the medieval darkness OpenSCAD is
self-restricting itself ;-)
--
Sent from: http://forum.openscad.org/
I am in favour of sum, and some sort of file io. It would be nice to be
able to add users pace support for new file formats. The
fopen/fread/fwrite/fclose/ftell/fseek set is complete, at least
On Thu, 25 Jun 2020, 09:08 Parkinbot, rudolf@digitaldocument.de wrote:
There has been a lot of discussion about summing up something in OpenSCAD.
Wouldn't it be worth to add feature request for a sum(list) primitive to
OpenSCAD? Especially newbies, who aren't running their own libs or writing
functions, would appreciate this.
Not having a sum(), is like not having a len() function and having to
implement it on your own:
echo(len([1,2,3, 7]));
function len(X=[],i=0) = X[i]== undef?0:1+len(X,i+1);
I mean we have functions like cross(), norm(), abs(), min(), max(),
floor(),
ceil(), sign(), sqrt() - to name the most prominent ones - which could all
be implemented by the users as well, so why is sum() missing?
Personally I also wouldn't be unhappy with a basic set of file functions,
like fopen(), fecho(), to eventually leave the medieval darkness OpenSCAD
is
self-restricting itself ;-)
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org