From 38f898394e494f1425cd499708bb9461d473733f Mon Sep 17 00:00:00 2001 From: Richard Milewski Date: Wed, 13 Dec 2023 13:24:18 -0800 Subject: [PATCH] Update hinges.scad Enforceed minimum $fn in snap_lock() and snap_socket() --- hinges.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hinges.scad b/hinges.scad index 671a868..40647e5 100644 --- a/hinges.scad +++ b/hinges.scad @@ -508,8 +508,8 @@ module snap_lock(thick, snaplen=5, snapdiam=5, layerheight=0.2, foldangle=90, hi attachable(anchor,spin,orient, size=size) { back(snap_x) { cube([snaplen, snapdiam, snapdiam/2+thick], anchor=BOT) { - attach(TOP) xcyl(l=snaplen, d=snapdiam); - attach(TOP) xcopies(snaplen-snapdiam/4/3) xscale(0.333) sphere(d=snapdiam*0.8); + attach(TOP) xcyl(l=snaplen, d=snapdiam, $fn = max(16,segs(snapdiam/2) - segs(snapdiam/2) % 4)); + attach(TOP) xcopies(snaplen-snapdiam/4/3) xscale(0.333) sphere(d=snapdiam*0.8, $fn = max(12,segs(snapdiam/2) - segs(snapdiam/2) % 4)); } } children(); @@ -550,8 +550,8 @@ module snap_socket(thick, snaplen=5, snapdiam=5, layerheight=0.2, foldangle=90, zrot_copies([0,180], r=snaplen+get_slop()) { diff("divot") cube([snaplen, snapdiam, snapdiam/2+thick], anchor=BOT) { - attach(TOP) xcyl(l=snaplen, d=snapdiam); - tag("divot") attach(TOP) left((snaplen+snapdiam/4/3)/2) xscale(0.333) sphere(d=snapdiam*0.8); + attach(TOP) xcyl(l=snaplen, d=snapdiam, $fn=max(16,segs(snapdiam/2) - segs(snapdiam/2) % 4)); + tag("divot") attach(TOP) left((snaplen+snapdiam/4/3)/2) xscale(0.333) sphere(d=snapdiam*0.8, $fn = max(12,segs(snapdiam/2) - segs(snapdiam/2) % 4)); } } }