1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-12 10:23:58 +02:00

Added chamfer option to poly_cylinder().

This commit is contained in:
Chris Palmer
2020-09-11 12:36:37 +01:00
parent afac5f9737
commit 6b0132c32e
2 changed files with 6 additions and 2 deletions

View File

@@ -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;