Open WillAdams opened 2 years ago
@WillAdams Well, it's actually a feature.
This allows you to position objects relatively. i.e:
cube([1,1,1])
translate([0,0,1]cube([2,2,2])
translate([0,0,2])cube([3,3,3]);
I admit it probably doesn't make sense for writeln, I guess it could emit a warning.
writeln("c") {
writeln("a");
writeln("b");
}
Warning: nested writeln will output in hierarchical order
Oh. I would have put all those in groups using {} if writing things out by hand.
The warning makes a lot of sense --- feel free to close this ticket or leave it open as a reminder to implement that.
I would have put all those in groups using {} if writing things out by hand.
Yes this is probably clearer.
cube([1,1,1]) {
translate([0,0,1]cube([2,2,2]) {
translate([0,0,2])cube([3,3,3]);
}
}
But I have to support both for it to work consistently. The idea is inspired by so called relativity.scad
: https://github.com/davidson16807/relativity.scad
If one has modules such as "setupcut" and "gcut" in https://github.com/WillAdams/gcodepreview/blob/main/gcodepreviewing.scad
and one calls them using a file such as:
the text appears out-of-order in the console:
and in the file.
Adding the semicolon:
Outputs things as expected: