[OpenSCAD] Functional OpenSCAD, working with vertex data

doug moen doug at moens.org
Thu Jan 25 16:49:47 EST 2018


Marius said:
> Not sure it's worth using as it may make code less readable for people
not used to this syntax.
> We should design such features in a better way.

v.x is the first element of vector v, same as v[0].

Another way of designing this feature is to provide built-in global
variables
 X = 0
 Y = 1
 Z = 2
and then you can write v[X] to get the first element of v.

On 25 January 2018 at 16:28, Marius Kintel <marius at kintel.net> wrote:

> The dot notation shortcut isn't really documented, except through source
> code:
> https://github.com/openscad/openscad/blob/master/src/expr.cc#L393
>
> Not sure it's worth using as it may make code less readable for people not
> used to this syntax.
> We should design such features in a better way.
>
>  -Marius
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180125/cfd2fab0/attachment-0002.html>


More information about the Discuss mailing list