mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-12 04:54:00 +02:00
Fixed alignment error with square() when rounding is used.
This commit is contained in:
@@ -46,9 +46,9 @@
|
|||||||
module square(size=1, center, rounding=0, chamfer=0, anchor, spin=0) {
|
module square(size=1, center, rounding=0, chamfer=0, anchor, spin=0) {
|
||||||
size = is_num(size)? [size,size] : point2d(size);
|
size = is_num(size)? [size,size] : point2d(size);
|
||||||
anchor = get_anchor(anchor, center, FRONT+LEFT, FRONT+LEFT);
|
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) {
|
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();
|
children();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,174];
|
BOSL_VERSION = [2,0,175];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
Reference in New Issue
Block a user