-
Notifications
You must be signed in to change notification settings - Fork 181
[BUG] and/or inaccurate documentation in Attachments Tutorial, with respect to attach() #1949
Description
Describe the bug
Sample code from the Attachments tutorial at the following link generates errors, and does not work as documented.
https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Attachment-Attach
Behavior is the same in both versions 2101.01 and 2026.03.22 (git d0c22917)
Code To Reproduce Bug
Example from the aforementioned URL follows, exactly as published.
include <BOSL2/std.scad>
module thing(){
color_this("orange")
prismoid([8,8],[6,6],shift=-[1,1],h=8) {
attach(TOP,BOT) anchor_arrow(color=[0,1,0],s=12);
attach(FWD,BOT) anchor_arrow(s=12);
}
}
prismoid([50,50],[35,35],h=25,anchor=BOT){
attach(TOP,BOT,align=FRONT) thing();
attach(RIGHT,BOT,align=BOT) thing();
attach(RIGHT,BACK,align=FRONT) thing();
attach(FRONT,BACK,align=BOT,spin=45) thing();
attach(TOP,RIGHT,align=RIGHT,spin=90) thing();
}
Expected behavior
Expected behavior is documented in the aforementioned tutorial, along with a screenshot of the expected behavior, which has been reproduced below. Specifically, attach() is documented to provide an "align" parameter that does not appear to be implemented in the versions that I tested.
Observed behavior
Compiling design (CSG Tree generation)...
[WARNING: variable align not specified as parameter in file BOSL2, line 10](filename redacted)
[WARNING: variable align not specified as parameter in file BOSL2, line 11](filename redacted)
[WARNING: variable align not specified as parameter in file BOSL2, line 12](filename redacted)
[WARNING: variable align not specified as parameter in file BOSL2, line 13](filename redacted)
[WARNING: variable spin not specified as parameter in file BOSL2, line 13](filename redacted)
[WARNING: variable align not specified as parameter in file BOSL2, line 14](filename redacted)
[WARNING: variable spin not specified as parameter in file BOSL2, line 14](filename redacted)
Compiling design (CSG Products generation)...
Geometries in cache: 13
Geometry cache size in bytes: 24496
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized tree has 46 elements!
Compile and preview finished.
Total rendering time: 0:00:00.489
See also screenshot below.
Screenshots
Expected behavior, per the tutorial:
Observed behavior in OpenSCAD v 2101.01:
Observed behavior in OpenSCAD v 2026.03.22:
Additional context
- OpenSCAD Version: 2101.01 and 2026.03.22 (git d0c22917)
- Other libraries used: none