瀏覽代碼

Round X+/Y± corners of cap to match case body

ZiB 4 月之前
父節點
當前提交
a9882021ea
共有 1 個文件被更改,包括 4 次插入 和 3 次删除
  1. 4 3
      cable_cap.scad

+ 4 - 3
cable_cap.scad

@@ -151,12 +151,13 @@ module cable_cap() {
 
 
     translate([case_w - CAP_ENGAGE + CAP_EXPLODE, 0, 0]){
     translate([case_w - CAP_ENGAGE + CAP_EXPLODE, 0, 0]){
     difference() {
     difference() {
-        // Outer shell: hull between two square profiles
+        // Outer shell: flat rectangle at open end, rounded rectangle at closed end
         hull() {
         hull() {
             cube([0.01, _cap_bore_w + 2 * CAP_WALL, _cap_bore_h + CAP_WALL]);
             cube([0.01, _cap_bore_w + 2 * CAP_WALL, _cap_bore_h + CAP_WALL]);
 
 
-            translate([CAP_ENGAGE + CAP_WALL - 0.01, 0, 0])
-                cube([0.01, _cap_bore_w + 2 * CAP_WALL, _cap_bore_h + CAP_WALL]);
+            for (dy = [CORNER_R, _cap_bore_w + 2*CAP_WALL - CORNER_R])
+                translate([CAP_ENGAGE + CAP_WALL - CORNER_R, dy, 0])
+                    cylinder(r=CORNER_R, h=_cap_bore_h + CAP_WALL);
         }
         }
 
 
         // Rounded bore
         // Rounded bore