From f402c09e8fe63f38f7c31c7b6cc51abd2a5dd012 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Mon, 30 Jan 2023 16:18:22 -0500 Subject: [PATCH] Fix cheese some head types for consistent design when $fn is odd, and ensure facets match --- screws.scad | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screws.scad b/screws.scad index 97ebfab..38ff9fc 100644 --- a/screws.scad +++ b/screws.scad @@ -1406,9 +1406,11 @@ module screw_head(screw_info,details=false, counterbore=0,flat_height,oversize=0 head=="cheese" ? .7 * head_height : 0.1 * head_height; // round and button head_size2 = head=="cheese" ? head_size-2*tan(5)*head_height : head_size; // 5 deg slope on cheese head - cyl(l=base, d1=head_size, d2=head_size2,anchor=BOTTOM) + segs = segs(head_size); + cyl(l=base, d1=head_size, d2=head_size2,anchor=BOTTOM, $fn=segs) attach(TOP) - rotate_extrude() + zrot(180) // Needed to align facets when $fn is odd + rotate_extrude($fn=segs) // ensure same number of segments for cap as for head body intersection(){ arc(points=[[-head_size2/2,0], [0,-base+head_height * (head=="button"?4/3:1)], [head_size2/2,0]]); square([head_size2, head_height-base]);