Skip to content

Commit 243bfd7

Browse files
committed
fixed wrong openscad function syntax in examples/scad_to_include.scad
1 parent 49988f2 commit 243bfd7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

solid/examples/scad_to_include.scad

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ function scad_points() = [[0,0], [1,0], [0,1]];
1717

1818
// In Python, calling this function without an argument would be an error.
1919
// Leave this here to confirm that this works in OpenSCAD.
20-
function optional_nondefault_arg(arg1){
21-
s = arg1 ? arg1 : 1;
22-
cube([s,s,s]);
23-
}
20+
function optional_nondefault_arg(arg1) =
21+
let(s = arg1 ? arg1 : 1) cube([s,s,s]);
2422

2523
echo("This text should appear only when called with include(), not use()");

0 commit comments

Comments
 (0)