You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The documentation states that OpenSCAD will give a warning if the same variable is assigned twice, e.g. WARNING: wheel_radius was assigned on line 3 but was overwritten on line 17. However, this warning does not occur in all cases.
To Reproduce
Steps to reproduce the behavior:
Execute the script given below in the UI, and observe the console output.
This is what I get:
Parsing design (AST generation)...
Saved backup file: C:/Users/tyler/OneDrive/Documents/OpenSCAD/backups/tut1-backup-VcHabsyn.scad
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 6
Geometry cache size in bytes: 46840
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 2 elements!
Compile and preview finished.
Total rendering time: 0:00:00.165
Expected behavior
Expecting the console to display a warning message that wheel_rad was multiply assigned.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment and Version info (please complete the following information):
OS: Windows 11
System: 64-bit Acer PC
OpenSCAD Version: 2024.02.10 (git 662e590) from OpenSCAD website downloads page. Also observed issue with production release 2021.01
Remarks
I have seen this warning in other scripts. I don't know what the general rule is to reproduce the issue, but suspect it may have to do with nesting or indentation.
The text was updated successfully, but these errors were encountered:
Here is the corrected document: https://en.wikibooks.org/wiki/OpenSCAD_Tutorial/Chapter_2#Parameterizing_parts_of_your_model
I think people start with the tutorial more than they do the manual. Having introduced them to variables and curly braces, it seems only fair to warn them why the variable they assigned at some point might not work anymore later in the script.
Describe the bug
The documentation states that OpenSCAD will give a warning if the same variable is assigned twice, e.g. WARNING: wheel_radius was assigned on line 3 but was overwritten on line 17. However, this warning does not occur in all cases.
To Reproduce
Steps to reproduce the behavior:
Execute the script given below in the UI, and observe the console output.
This is what I get:
Expected behavior
Expecting the console to display a warning message that wheel_rad was multiply assigned.
Code reproducing the issue
Screenshots
If applicable, add screenshots to help explain your problem.
Environment and Version info (please complete the following information):
Remarks
I have seen this warning in other scripts. I don't know what the general rule is to reproduce the issue, but suspect it may have to do with nesting or indentation.
The text was updated successfully, but these errors were encountered: