-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning for modules that shouldn't have children. #41
Comments
@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");
}
|
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. |
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 |
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:
The text was updated successfully, but these errors were encountered: