BOSL2 icon indicating copy to clipboard operation
BOSL2 copied to clipboard

[BUG] Wrong alignment on attach(inside=true) with set align

Open Gultak opened this issue 1 month ago • 1 comments

Describe the bug When using inside=true together with align=* on attach() the object is positioned unexpectedly.

Code To Reproduce Bug

cube([50,10,50]) {
  attach(FRONT,BOTTOM,align=BOTTOM+LEFT,inset=5)
    recolor("red") cube(10);
  attach(FRONT,BOTTOM,align=BOTTOM+RIGHT,inset=5,
         inside=true)
    recolor("blue") cube(10);
}

For me it looks like a mismatch between the rotational anchor and the positioning (i.e. it looks like the anchor for positioning is swapped in all directions, not only the "attached" one).

For reference, align() handles the same situation as I'd expect.

Expected behavior The blue cube should be positioned inside of the yellow cube on the bottom right side.

Additional context Add any other context about the problem here.

  • OpenSCAD Version: 2021.01
  • Other libraries used: none

Gultak avatar May 26 '24 12:05 Gultak