Fixed alignment error with square() when rounding is used.

This commit is contained in:
Revar Desmera 2020-03-09 19:13:13 -07:00
parent 2551f19939
commit 8d3ea6b727
2 changed files with 3 additions and 3 deletions

View file

@ -46,9 +46,9 @@
module square(size=1, center, rounding=0, chamfer=0, anchor, spin=0) {
size = is_num(size)? [size,size] : point2d(size);
anchor = get_anchor(anchor, center, FRONT+LEFT, FRONT+LEFT);
pts = square(size=size, rounding=rounding, chamfer=chamfer, center=false);
pts = square(size=size, rounding=rounding, chamfer=chamfer, center=true);
attachable(anchor,spin, two_d=true, size=size) {
translate(-size/2) polygon(pts);
translate(-size/2) polygon(move(size/2,p=pts)); // Extraneous translation works around fine grid quantizing.
children();
}
}

View file

@ -8,7 +8,7 @@
//////////////////////////////////////////////////////////////////////
BOSL_VERSION = [2,0,174];
BOSL_VERSION = [2,0,175];
// Section: BOSL Library Version Functions