From 0e6a1eb919137e301e3a80c1cc332284ed6f79a9 Mon Sep 17 00:00:00 2001 From: Jochen Vothknecht <jochen3120@gmail.com> Date: Thu, 23 Sep 2021 23:23:27 +0200 Subject: [PATCH] Fix vertical center calculation --- HeatSink.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HeatSink.scad b/HeatSink.scad index 5fb06b2..dd542fd 100644 --- a/HeatSink.scad +++ b/HeatSink.scad @@ -366,14 +366,14 @@ module crossNPipe(width, height, length, radius, strength, N, center=false) { epsilon = 0.001; // TODO: may need adjustment - tz = center ? -l/2 : 0; + tz = center ? h/2 : 0; - difference() { - for (rz=[0:360/N:360]) rotate([-90, 0, rz]) translate([0, 0, tz]) linear_extrude(l) { + translate([0, 0, tz]) difference() { + for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l) { roundRect(w, h, r); } - for (rz=[0:360/N:360]) rotate([-90, 0, rz])translate([0, 0, tz]) linear_extrude(l + epsilon) { + for (rz=[0:360/N:360]) rotate([-90, 0, rz]) linear_extrude(l + epsilon) { roundRect(w - _str*2, h - _str*2, r - _str); } } -- GitLab