From 7d2c2b9d099e155f2c4dd756e76e4914886e37de Mon Sep 17 00:00:00 2001 From: mattmcw Date: Mon, 15 Apr 2024 09:42:25 -0600 Subject: [PATCH] Use common.scad, change all cylinder entries --- scad/canon_rf_ACME_bellows_adapter.scad | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scad/canon_rf_ACME_bellows_adapter.scad b/scad/canon_rf_ACME_bellows_adapter.scad index e172a61..96f7672 100644 --- a/scad/canon_rf_ACME_bellows_adapter.scad +++ b/scad/canon_rf_ACME_bellows_adapter.scad @@ -1,3 +1,5 @@ +include <../common/common.scad>; + PlateHeight = 101; PlateWidth = 65.5; PlateDepth = 6.3; @@ -23,7 +25,7 @@ module bellows_mount_plate () { $fn = 60; difference () { cube([PlateWidth, PlateHeight, PlateDepth], center = true); - cylinder(r = CenterVoidD / 2, h = PlateDepth + 1, center = true, $fn = 120); + cylinder(r = R(CenterVoidD), h = PlateDepth + 1, center = true, $fn = 120); translate([0, BoltY / 2, 0]) cylinder(r = BoltVoidD / 2, h = PlateDepth + 1, center = true); translate([0, -BoltY / 2, 0]) cylinder(r = BoltVoidD / 2, h = PlateDepth + 1, center = true); translate([-(PlateWidth / 2) + 5, (PlateHeight / 2) + 5.5, 0]) rotate([0, 0, 30]) cube([28.5, 28.5, PlateDepth + 1], center = true); @@ -37,7 +39,7 @@ module camera_mount_plate () { $fn = 60; difference () { cube([PlateWidth, PlateHeight, PlateDepth], center = true); - cylinder(r = CenterVoidD / 2, h = PlateDepth + 1, center = true, $fn = 120); + cylinder(r = R(CenterVoidD), h = PlateDepth + 1, center = true, $fn = 120); bolt_slot([0, BoltY / 2, 0]); bolt_slot([0, -BoltY / 2, 0]); translate([-(PlateWidth / 2) + 5, (PlateHeight / 2) + 5.5, 0]) rotate([0, 0, 30]) cube([28.5, 28.5, PlateDepth + 1], center = true); @@ -55,13 +57,13 @@ module canon_rf_body_cap () { rotate([0, 0, -15]) translate([2.6, -6.5, 2]) { color("red") import("../stl/Canon-EOS-RF-body-cap.stl"); } - cylinder(r = 64 / 2, h = 40, center = true, $fn = 120); + cylinder(r = R(64), h = 40, center = true, $fn = 120); } cylinder(r = CenterVoidD / 2, h = 20, center = true, $fn = 120); } difference () { - translate([0, 0, 9 / 2]) cylinder(r = 64 / 2, h = 9, center = true, $fn = 120); - translate([0, 0, 9 / 2]) cylinder(r = CenterVoidD / 2, h = 9 + 1, center = true, $fn = 120); + translate([0, 0, 9 / 2]) cylinder(r = R(64), h = 9, center = true, $fn = 120); + translate([0, 0, 9 / 2]) cylinder(r = R(CenterVoidD), h = 9 + 1, center = true, $fn = 120); } //translate([0, 37, 8/2]) cube([5, 5, 8], center = true); @@ -71,7 +73,7 @@ module canon_rf_ACME_bellows_adapter () { canon_rf_body_cap(); } -PART = "canon_rf_ACME_bellows_adapter"; +PART = "canon_rf_ACME_mount_plate"; if (PART == "canon_rf_ACME_bellows_adapter") { canon_rf_ACME_bellows_adapter();