[OpenSCAD] got a problem with variables and setting values

r.d. terramir terramircomputers at gmail.com
Sat Apr 28 22:27:08 EDT 2018


here's my code I wanted to make the code parametric so I needed
various possible  values but I hit a snag.

bearings=10;
//for smooth rods put in diameter in mm
smooth=10;
// for z-screw 5 for 5mm 8 for 8mm and 8.5 for acme
z_screw=5;
// for mechanical z=probe use 1 for yes 0 for no 2 for i3 type probe
z_probe = 1;
wall=4;
lmd=1;
lml=1;
echo(bearings,smooth,z_screw);
if (bearings==10){lmd=19.05;lml=29.05;}
   echo(lmd,lml);

lmd and lml return 1 even though I thought I was assigning the actual
values with the if statement.




Respectfully,
R. Daniel Borkan
727 S. Coronado St. 201
Los Angeles, CA 90057
C: (213) 271-6721
All written content of this e-mail is confidential and only intended for
the named recipient. This message is subject to copyright and is
intellectual property of the sender. All rights reserved (c) 2018



More information about the Discuss mailing list