diff --git a/readme.md b/readme.md index 5bdaac1..98beca9 100644 --- a/readme.md +++ b/readme.md @@ -5860,7 +5860,7 @@ The module provides `poly_circle()`, `poly_cylinder()` and `poly_ring()` that is |:--- |:--- | | ```drill(r, h = 100, center = true)``` | Make a cylinder for drilling holes suitable for CNC routing, set h = 0 for circle | | ```poly_circle(r, sides = 0)``` | Make a circle adjusted to print the correct size | -| ```poly_cylinder(r, h, center = false, sides = 0)``` | Make a cylinder adjusted to print the correct size | +| ```poly_cylinder(r, h, center = false, sides = 0, chamfer = false)``` | Make a cylinder adjusted to print the correct size | | ```poly_drill(r, h = 100, center = true)``` | Make a cylinder for drilling holes suitable for CNC routing if cnc_bit_r is non zero, otherwise a poly_cylinder. | | ```poly_ring(or, ir, sides = 0)``` | Make a 2D ring adjusted to have the correct internal radius | | ```poly_tube(or, ir, h, center = false)``` | Make a tube adjusted to have the correct internal radius | diff --git a/utils/core/polyholes.scad b/utils/core/polyholes.scad index dcf5d53..82ec71f 100644 --- a/utils/core/polyholes.scad +++ b/utils/core/polyholes.scad @@ -32,10 +32,14 @@ module poly_circle(r, sides = 0) { //! Make a circle adjusted to print the corre circle(r = corrected_radius(r,n), $fn = n); } -module poly_cylinder(r, h, center = false, sides = 0) //! Make a cylinder adjusted to print the correct size +module poly_cylinder(r, h, center = false, sides = 0, chamfer = false) {//! Make a cylinder adjusted to print the correct size extrude_if(h, center) poly_circle(r, sides); + if(h && chamfer) + poly_cylinder(r + layer_height, center ? layer_height * 2 : layer_height, center, sides = sides ? sides : sides(r)); +} + module poly_ring(or, ir, sides = 0) { //! Make a 2D ring adjusted to have the correct internal radius cir = corrected_radius(ir, sides); filaments = (or - cir) / extrusion_width;