Simplified dogbone rectangles.

This commit is contained in:
Martin Budden 2020-12-22 10:34:45 +00:00
parent 69da4c1c23
commit 782deccf6b
1 changed files with 4 additions and 6 deletions

View File

@ -41,20 +41,18 @@ module dogbone_square(size, r = cnc_bit_r, center = true, x_offset, y_offset) //
} }
} }
module dogbone_rectangle(size, r = cnc_bit_r, center = true, xy_center = true) //! Rectangle with cylinders at the corners module dogbone_rectangle(size, r = cnc_bit_r, center = true, xy_center = true, x_offset, y_offset) //! Rectangle with cylinders at the corners
{ {
extrude_if(h = size.z, center = center) extrude_if(h = size.z, center = center)
dogbone_square([size.x, size.y], r, xy_center); dogbone_square([size.x, size.y], r, xy_center, x_offset, y_offset);
} }
module dogbone_rectangle_x(size, r = cnc_bit_r, center = true, xy_center = true) //! Rectangle with cylinders at the corners, offset in the x direction module dogbone_rectangle_x(size, r = cnc_bit_r, center = true, xy_center = true) //! Rectangle with cylinders at the corners, offset in the x direction
{ {
extrude_if(h = size.z, center = center) dogbone_rectangle(size = size, r = r, center = center, x_offset = 0, y_offset = r);
dogbone_square([size.x, size.y], r, xy_center, x_offset = 0, y_offset = r);
} }
module dogbone_rectangle_y(size, r = cnc_bit_r, center = true, xy_center = true) //! Rectangle with cylinders at the corners, offset in the y direction module dogbone_rectangle_y(size, r = cnc_bit_r, center = true, xy_center = true) //! Rectangle with cylinders at the corners, offset in the y direction
{ {
extrude_if(h = size.z, center = center) dogbone_rectangle(size = size, r = r, center = center, x_offset = r, y_offset = 0);
dogbone_square([size.x, size.y], r, xy_center, x_offset = r, y_offset = 0);
} }