Use common.scad, change all cylinder entries

This commit is contained in:
Matt McWilliams 2024-04-15 09:42:25 -06:00
parent 67a290a02a
commit 7d2c2b9d09
1 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,5 @@
include <../common/common.scad>;
PlateHeight = 101; PlateHeight = 101;
PlateWidth = 65.5; PlateWidth = 65.5;
PlateDepth = 6.3; PlateDepth = 6.3;
@ -23,7 +25,7 @@ module bellows_mount_plate () {
$fn = 60; $fn = 60;
difference () { difference () {
cube([PlateWidth, PlateHeight, PlateDepth], center = true); 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([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); 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; $fn = 60;
difference () { difference () {
cube([PlateWidth, PlateHeight, PlateDepth], center = true); 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]);
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); 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]) { rotate([0, 0, -15]) translate([2.6, -6.5, 2]) {
color("red") import("../stl/Canon-EOS-RF-body-cap.stl"); 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); cylinder(r = CenterVoidD / 2, h = 20, center = true, $fn = 120);
} }
difference () { difference () {
translate([0, 0, 9 / 2]) cylinder(r = 64 / 2, h = 9, 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 = CenterVoidD / 2, h = 9 + 1, 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); //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(); canon_rf_body_cap();
} }
PART = "canon_rf_ACME_bellows_adapter"; PART = "canon_rf_ACME_mount_plate";
if (PART == "canon_rf_ACME_bellows_adapter") { if (PART == "canon_rf_ACME_bellows_adapter") {
canon_rf_ACME_bellows_adapter(); canon_rf_ACME_bellows_adapter();