[OpenSCAD] Problems making a negative space

Jordan Brown openscad at jordan.maileater.net
Mon Oct 21 19:45:16 EDT 2019

On 10/21/2019 4:08 PM, Hans L via Discuss wrote:
> 6) You have these weird patterns of expression all around your code: 
> sqrt(pow(X,2) * Y)  OR   sqrt(pow(X,2) / Y)
> sqrt(pow(X,2) * Y)  ==  ( X * sqrt(Y) ) since your X expression is
> always positive anyways.  So they can be simplified for better
> readability.

Especially when X and Y are constants and all of the expressions are the
same, as they are in this case - those sqrt(pow(C,2)*2)/2 expressions
could all be collapsed into one

CC = C * sqrt(2) / 2;

and then use CC throughout.  (I'd use a more meaningful name, except I
haven't figured out what the value really represents.)

It looks like, for all the math that's going on, there are really only
maybe five or six values that are calculated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191021/fe9ca166/attachment.html>

More information about the Discuss mailing list