Rails work

This commit is contained in:
sixteenmillimeter 2020-07-01 18:04:03 -04:00
parent 4db3ce8b88
commit 5258fcbf30
2 changed files with 77 additions and 0 deletions

53
scad/2020_profile.scad Normal file
View File

@ -0,0 +1,53 @@
/*
***INFO***
Author: slurked
Email: slurked@starlid.com
Version: 1.0
License: Creative Commons Zero (https://creativecommons.org/publicdomain/zero/1.0)
***TO INSTALL***
To use, place this file in your OpenSCAD libraries directory. If you don't know where this is on your computer, go to the file menu and select "Show Library Folder" or check https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries
***USAGE EXAMPLE***
This generates a 75mm tall 2020 extrusion:
use <2020_profile.scad>
linear_extrude(height=75) 2020_profile();
***NOTES***
Please be aware that there are many different variations in real world aluminum extrusions. Differences in tolerances, minor details like corner bevels, and even major variations in the interior cross section are common. This particular model is very basic with square edges.
This is a trivial item, so I have elected to release it into the public domain via the Creative Commons Zero license. No credit, attribution, or permission is needed from me to use this work. Although I would still enjoy hearing about what you put it to use for!
*/
module 2020_profile(){
difference(){
square([20,20],center=true);
square([17,17],center=true);
square([40,5.26],center=true);
rotate([0,0,90]) square([40,5.26],center=true);
}
difference(){
union(){
square([7.32,7.32],center=true);
rotate([0,0,45]) square([1.5,25],center=true);
rotate([0,0,-45]) square([1.5,25],center=true);
}
circle(d=5,$fn=16);
}
translate([7.9975,7.9975,0]) square([4.005,4.005],center=true);
translate([-7.9975,7.9975,0]) square([4.005,4.005],center=true);
translate([7.9975,-7.9975,0]) square([4.005,4.005],center=true);
translate([-7.9975,-7.9975,0]) square([4.005,4.005],center=true);
}

24
scad/rails_2020.scad Normal file
View File

@ -0,0 +1,24 @@
use <2020_profile.scad>
//translate([-35, 0, -25]) linear_extrude(height=175) 2020_profile();
translate([35, 0, -25]) linear_extrude(height=175) 2020_profile();
module rounded_cube (c, d) {
r = d / 2;
scaled = [c[0] - d, c[1] - d, c[2] - d];
minkowski() {
cylinder(r = r, h = r, center = true);
cube(scaled, center = true);
}
}
$fn = 100;
difference () {
rounded_cube([120, 60, 40], d=10);
//rails
translate([-35, 0, 0]) cube([21, 21, 40 + 1], center = true);
translate([35, 0, 0]) cube([21, 21, 40 + 1], center = true);
//threaded rods
translate([0, 0, 0])cylinder(r = 5, h = 40 + 1, center = true);
//translate([-10, 0, 0])cylinder(r = 5, h = 40 + 1, center = true);
}