Collection

This commit is contained in:
George Dorn 2022-08-07 15:21:43 -07:00
parent 71d5da4117
commit 0cf4eecbe0
83 changed files with 79594 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View file

@ -0,0 +1,54 @@
sidePoints = [[0,-10], [0,133], [-60.7,260], [-10,280], [130,260], [80,10]];
module frame(points, depth=7, width=15) {
difference() {
linear_extrude(depth) polygon(points);
translate([0,0,-1]) linear_extrude(depth+2) offset(r=-width) polygon(points);
}
}
include <voronoi.scad>;
module sideFrame() {
minkowski() {
$fn = 8;
frame(sidePoints);
sphere(3);
}
translate([0,0,5.77]) intersection(){
linear_extrude(4) polygon(sidePoints);
translate([50,172,-1]) rotate([0,0,90]) scale(2) voronoi(5);
}
}
include <eurorack.scad>;
module railSetNutInsets() {
translate(supportOffset) {
nutInset();
translate([0,122.5]) {
nutInset();
}
}
}
module nutInset() {
translate([0,0,5]) cylinder(r=4.25, h=5, $fn=6);
}
difference() {
sideFrame();
translate([2,-2,0]) {
translate([0,0,6]) railRectSet(100, 1.04);
translate([0,0,-10]) railSupportSet(100);
}
translate([-1,140,0]) rotate([0,0,25.5]) {
translate([0,0,6]) railRectSet(100, 1.04);
translate([0,0,-10]) railSupportSet(100);
}
translate([-10,272]) { rodHole(); nutInset(); }
translate([121,253]) { rodHole(); nutInset(); }
translate([74,17]) { rodHole(); nutInset(); }
}

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -0,0 +1,53 @@
module railRect(height) {
cube([12.7, 7.4, height]);
}
module railSlot(height) {
translate([1.85, 1.12, -1]) cube([2.64, 5.16, height+2]);
translate([0, 2.2, -1]) cube([5.77, 3, height+2]);
}
supportOffset = [9,3.85];
module railSupportCavity(height) {
translate(supportOffset) cylinder(r=2.25, h=height, $fn=32);
}
module railWithHoles(height) {
difference(){
railRect(height);
railSlot(height);
railSupportCavity(height);
}
}
module railSet(height) {
railWithHoles(height);
translate([0,122.5]) {
railWithHoles(height);
}
}
module railRectSet(height, scale=1) {
scale(scale) railRect(height);
translate([0,122.5]) {
scale(scale) railRect(height);
}
}
module railSupportSet(height) {
railSupportCavity(height);
translate([0,122.5]) {
railSupportCavity(height);
}
}
module rodHole() {
translate([0,0,-5]) cylinder(r=2.25, h=20, $fn=24);
}

View file

@ -0,0 +1,3 @@
include <rail_profile.scad>;
rotate([0,-90,-135]) rail(400);

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,24 @@
railProfilePoints = [[0,0],[0,2.2],
[1.85,2.2],[1.85,1.12],[1.85+2.64,1.12],
[5.77,2.2],[5.77,2.2+3],
[1.85+2.64,7.4-1.12],[1.85,7.4-1.12],[1.85,7.4-2.2],
[0,7.4-2.2],
[0,7.4],[12.7,7.4],[12.7,0]];
module railProfile() {
polygon(railProfilePoints);
}
supportOffset = [9,3.85];
module railSupportCavity(height) {
translate(supportOffset) cylinder(r=2.25, h=height, $fn=32);
}
module rail(height) {
difference() {
linear_extrude(height) railProfile();
railSupportCavity(height);
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,139 @@
panelThickness = 2;
panelHp=6;
holeCount=4;
holeWidth = 5.08; //If you want wider holes for easier mounting. Otherwise set to any number lower than mountHoleDiameter. Can be passed in as parameter to eurorackPanel()
walls=true;
two_walls=false;
wall_size=5;
threeUHeight = 133.35; //overall 3u height
panelOuterHeight =128.5;
panelInnerHeight = 110; //rail clearance = ~11.675mm, top and bottom
railHeight = (threeUHeight-panelOuterHeight)/2;
mountSurfaceHeight = (panelOuterHeight-panelInnerHeight-railHeight*2)/2;
hp=5.08;
mountHoleDiameter = 3.2;
mountHoleRad =mountHoleDiameter/2;
hwCubeWidth = holeWidth-mountHoleDiameter;
offsetToMountHoleCenterY=mountSurfaceHeight/2;
offsetToMountHoleCenterX=hp;//1hp margin on each side
echo(offsetToMountHoleCenterY);
echo(offsetToMountHoleCenterX);
module eurorackPanel(panelHp, mountHoles=2, hw = holeWidth, ignoreMountHoles=false)
{
//mountHoles ought to be even. Odd values are -=1
difference()
{
cube([hp*panelHp,panelOuterHeight,panelThickness]);
if(!ignoreMountHoles)
{
eurorackMountHoles(panelHp, mountHoles, holeWidth);
}
}
}
module eurorackMountHoles(php, holes, hw)
{
holes = holes-holes%2;//mountHoles ought to be even for the sake of code complexity. Odd values are -=1
eurorackMountHolesTopRow(php, hw, holes/2);
eurorackMountHolesBottomRow(php, hw, holes/2);
}
module eurorackMountHolesTopRow(php, hw, holes)
{
//topleft
translate([offsetToMountHoleCenterX,panelOuterHeight-offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
if(holes>1)
{
translate([(hp*php)-hwCubeWidth-hp,panelOuterHeight-offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
}
if(holes>2)
{
holeDivs = php*hp/(holes-1);
for (i =[1:holes-2])
{
translate([holeDivs*i,panelOuterHeight-offsetToMountHoleCenterY,0]){
eurorackMountHole(hw);
}
}
}
}
module eurorackMountHolesBottomRow(php, hw, holes)
{
//bottomRight
translate([(hp*php)-hwCubeWidth-hp,offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
if(holes>1)
{
translate([offsetToMountHoleCenterX,offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
}
if(holes>2)
{
holeDivs = php*hp/(holes-1);
for (i =[1:holes-2])
{
translate([holeDivs*i,offsetToMountHoleCenterY,0]){
eurorackMountHole(hw);
}
}
}
}
module eurorackMountHole(hw)
{
mountHoleDepth = panelThickness+2; //because diffs need to be larger than the object they are being diffed from for ideal BSP operations
if(hwCubeWidth<0)
{
hwCubeWidth=0;
}
translate([0,0,-1]){
union()
{
cylinder(r=mountHoleRad, h=mountHoleDepth, $fn=20);
translate([0,-mountHoleRad,0]){
cube([hwCubeWidth, mountHoleDiameter, mountHoleDepth]);
}
translate([hwCubeWidth,0,0]){
cylinder(r=mountHoleRad, h=mountHoleDepth, $fn=20);
}
}
}
}
eurorackPanel(panelHp, holeCount,holeWidth);
if (walls) {
size = [2,panelOuterHeight-20,wall_size];
translate([0,10,1]){
cube(size);
}
if (two_walls) {
translate([hp*panelHp-2,10,1]){
cube(size);
}
}
}

View file

@ -0,0 +1,173 @@
panelThickness = 2;
panelHp=12;
holeCount=4;
holeWidth = 10.16; // If you want wider holes for easier mounting. Otherwise set to any number lower than mountHoleDiameter. Can be passed in as parameter to eurorackPanel()
holeOffset = 0.5;
jackHoles = true;
deepJackHoles = true;
jackHoleDiameter = 3.85; // If you want wider jack holes to compensate for your printer's precision. Or make it 3.4mm and use a 3.5mm drill bit to get proper hole sizes
jackHoleRows = 10;
jackHoleColumns = 5;
jackHoleDepth = 10;
threeUHeight = 133.35; // overall 3u height
panelOuterHeight =128.5;
panelInnerHeight = 110; // rail clearance = ~11.675mm, top and bottom
railHeight = (threeUHeight-panelOuterHeight)/2;
mountSurfaceHeight = (panelOuterHeight-panelInnerHeight-railHeight*2)/2;
panelInnerOffset = (panelOuterHeight-panelInnerHeight)/2;
echo("railHeight: ", railHeight);
echo("mountSurfaceHeight",mountSurfaceHeight);
hp=5.08;
mountHoleDiameter = 3.2;
mountHoleRad =mountHoleDiameter/2;
hwCubeWidth = holeWidth-mountHoleDiameter;
offsetToMountHoleCenterY=mountSurfaceHeight/2;
offsetToMountHoleCenterX = hp - holeOffset; // 1 hp from side to center of hole, with a precision give to the side
echo("offsetToMountHoleCenterY: ", offsetToMountHoleCenterY);
echo("offsetToMountHoleCenterY: ", offsetToMountHoleCenterX);
module eurorackPanel(panelHp, jackHoles, mountHoles=2, hw = holeWidth, ignoreMountHoles=false)
{
// mountHoles ought to be even. Odd values are -=1
difference()
{
union()
{
cube([hp*panelHp,panelOuterHeight,panelThickness]);
if (deepJackHoles) {
translate([0,panelInnerOffset,-jackHoleDepth])
{
cube([hp*panelHp,panelInnerHeight,jackHoleDepth]);
}
}
}
if(!ignoreMountHoles)
{
eurorackMountHoles(panelHp, mountHoles, holeWidth);
}
if (jackHoles)
{
jackStorageHoles();
}
}
}
module jackStorageHoles()
{
verticalJackHoleSpacing = (panelInnerHeight - jackHoleRows * jackHoleDiameter) / (jackHoleRows);
horizontalJackHoleSpacing = (hp*panelHp - jackHoleColumns * jackHoleDiameter) / (jackHoleColumns + 1);
echo("verticalJackHoleSpacing: ", verticalJackHoleSpacing);
echo("horizontalJackHoleSpacing: ", horizontalJackHoleSpacing);
for(verticalOffset = [panelInnerOffset + verticalJackHoleSpacing/2 + jackHoleDiameter/2 : verticalJackHoleSpacing + jackHoleDiameter : panelInnerHeight + jackHoleDiameter])
{
for(horizontalOffset = [horizontalJackHoleSpacing + jackHoleDiameter / 2 : jackHoleDiameter + horizontalJackHoleSpacing : hp*panelHp - horizontalJackHoleSpacing])
{
jackStorageHole(horizontalOffset, verticalOffset, jackHoleDiameter);
}
}
}
module jackStorageHole(horizontalOffset, verticalOffset, diameter)
{
translate([horizontalOffset,verticalOffset,panelThickness - 4 - jackHoleDepth])
{
cylinder(r=diameter/2, h=jackHoleDepth+5, $fn=20);
}
}
module eurorackMountHoles(php, holes, hw)
{
holes = holes-holes%2;// mountHoles ought to be even for the sake of code complexity. Odd values are -=1
eurorackMountHolesTopRow(php, hw, holes/2);
eurorackMountHolesBottomRow(php, hw, holes/2);
}
module eurorackMountHolesTopRow(php, hw, holes)
{
//topleft
translate([offsetToMountHoleCenterX,panelOuterHeight-offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
if(holes>1)
{
translate([(hp*php)-hwCubeWidth-hp,panelOuterHeight-offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
}
if(holes>2)
{
holeDivs = php*hp/(holes-1);
for (i =[1:holes-2])
{
translate([holeDivs*i,panelOuterHeight-offsetToMountHoleCenterY,0]){
eurorackMountHole(hw);
}
}
}
}
module eurorackMountHolesBottomRow(php, hw, holes)
{
//bottomRight
translate([(hp*php)-hwCubeWidth-hp,offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
if(holes>1)
{
translate([offsetToMountHoleCenterX,offsetToMountHoleCenterY,0])
{
eurorackMountHole(hw);
}
}
if(holes>2)
{
holeDivs = php*hp/(holes-1);
for (i =[1:holes-2])
{
translate([holeDivs*i,offsetToMountHoleCenterY,0]){
eurorackMountHole(hw);
}
}
}
}
module eurorackMountHole(hw)
{
mountHoleDepth = panelThickness+2; // because diffs need to be larger than the object they are being diffed from for ideal BSP operations
if(hwCubeWidth<0)
{
hwCubeWidth=0;
}
translate([0,0,-1]){
union()
{
cylinder(r=mountHoleRad, h=mountHoleDepth, $fn=20);
translate([0,-mountHoleRad,0]){
cube([hwCubeWidth, mountHoleDiameter, mountHoleDepth]);
}
translate([hwCubeWidth,0,0]){
cylinder(r=mountHoleRad, h=mountHoleDepth, $fn=20);
}
}
}
}
//Samples
//eurorackPanel(4, 2,holeWidth);
eurorackPanel(panelHp, jackHoles, holeCount, holeWidth);
//eurorackPanel(60, 8,holeWidth);

View file

@ -0,0 +1,157 @@
/* [Default values] */
// Line segments for circles
FN = 100; // [1:1:360]
// Unit size (mm)
U = 44.45;
// Horizontal pitch size (mm)
HP = 5.07; // 5.07 for a little bit of margin
$fn=FN;
/* [Panel] */
// Height of module (mm) - Would not change this if you are using Eurorack
height = 128.5; // A little less then 3U
// Thickness of module (mm) - Would not change this if you are using Eurorack
thickness = 2; // Website specifies a thickness of 2mm
// Width of module (HP)
width = 24; // [1:1:84]
/* [Holes] */
// Four hole threshold (HP)
four_hole_threshold = 10;
// Center two holes
two_holes_type = "opposite"; // [center, opposite, mirror]
// Hole radius (mm)
hole_r = 1.7;
// Hole distance from the side (HP)
hole_dist_side = hp_mm(1.5);
// Hole distance from the top (mm)
hole_dist_top = 2.5;
union() {
difference(){
panel(width);
translate([50, 60, 0]) audio_jack_3_5mm();
//translate([15, 15, 0]) toggle_switch_6_8mm();
translate([50, 50, 0]) pot_wh148();
}
translate([50, 38, 0]) label("[FOO]", size=6);
translate([hole_dist_side+2, hole_dist_top+2, 0]) wall(h=25, w=height-hole_dist_top*2-4);
}
// h[p]
module panel(h) {
width_mm = hp_mm(h);
difference() {
cube(size = [width_mm, height, thickness]);
if (h < four_hole_threshold) {
if (two_holes_type == "center") {
translate([width_mm/2, hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([width_mm/2, height-hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
} else if (two_holes_type == "opposite") {
translate([hole_dist_side, hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([width_mm - hole_dist_side, height-hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
} else if (two_holes_type == "mirror") {
translate([hole_dist_side, hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([hole_dist_side, height-hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
}
} else {
translate([hole_dist_side, hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([hole_dist_side, height - hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([width_mm - hole_dist_side, hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
translate([width_mm - hole_dist_side, height - hole_dist_top, -1])
cylinder(r=hole_r, h=thickness*2);
}
}
}
// http://www.rean-connectors.com/en/products/din-chassis-connectors/nys325
module nys325_midi_socket() {
cylinder(r=7.55, h=thickness*2+1);
translate([0, 11.3, -1])
cylinder(r=1.6, h=thickness*2+1);
translate([0, -11.3, -1])
cylinder(r=1.6, h=thickness*2+1);
}
module audio_jack_3_5mm() {
translate([0, 0, -1]) cylinder(r=3, h=thickness*2+1);
}
module toggle_switch_6_8mm() {
translate([0, 0, -1]) cylinder(r=3.4, h=thickness*2+1);
}
// http://www.mouser.com/ds/2/414/Datasheet_RotaryPanelPot_P160series-1133272.pdf
module pot_p160() {
translate([0, 0, -1]) cylinder(r=3.75, h=thickness*2);
translate([7.8, 0, -1]) cylinder(r=1.5, h=thickness*2);
}
module pot_wh148() {
translate([0, 0, -1]) cylinder(r=3.6, h=thickness*2);
translate([7.8, 0, -1]) cylinder(r=1.3, h=thickness+.5);
}
module label(string, size=4, halign="center") {
color([1,0,0])
linear_extrude(thickness+1)
text(string, size, halign=halign);
}
// draw a "vertical" wall to mount a circuit board sideways on
// h = z height, e.g. height of the board
module wall(h, w) {
translate([0, 0, -h]) cube(size = [thickness, w, h]);
}
// https://www.elfa.se/Web/Downloads/_t/ds/els-511sygwa-s530-e1_eng_tds.pdf
module x1_7seg_14_22mm_display() {
cube([12.25, 19.25, thickness]);
}
module x2_7seg_14_22mm_display() {
cube([25, 19.25, thickness]);
}
// https://www.elfa.se/Web/Downloads/2e/wa/qmCC56-12EWA.pdf
module x4_7seg_14_22mm_display() {
cube([50.5, 19.25, thickness]);
}
// https://cdn.sparkfun.com/datasheets/Components/Switches/MX%20Series.pdf
module cherry_mx_button() {
union(){
cube([14,14,thickness]);
translate([-1,1,0])
cube([14+2*1,thickness,thickness]);
translate([-1,14-1-3,0])
cube([14+2*1,3,thickness]);
}
}
// 1U = 1.75" = 44.45mm
// 1HP = 1/5" = 5.08mm
// u[nits]
function units_mm(u) = u * U;
// h[p]
function hp_mm(h) = h * HP;

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -0,0 +1,227 @@
//////////////////////////
// Customizable settings
//////////////////////////
// Diameter of the hole on the bottom (in mm).
HoleDiameter = 6;
// Depth of the hole in the bottom (in mm). If you want the hole to go all the way through then set this to a number larger than the total height of the object.
HoleDepth = 10;
// If you want a D-shaped hole, set this to the thickness of the flat side (in mm). Larger values for the flat make the hole smaller.
HoleFlatThickness = 0;
// Height (in mm). If dome cap is selected, it is not included in height. The shaft length is also not counted.
KnobHeight = 20;
// Diameter of base of round part of knob (in mm). (Knurled ridges are not included in this measurement.)
KnobDiameter = 20;
// Shape of top of knob. "Recessed" type can be painted.
CapType = 1; // [0:Flat, 1:Recessed, 2:Dome]
// Do you want a large timer-knob style pointer?
TimerKnob=0; // [0:No, 1:Yes]
// Would you like a divot on the top to indicate direction?
Pointer1 = 0; // [0:No, 1:Yes]
// Would you like a line (pointer) on the front to indicate direction?
Pointer2 = 1; // [0:No, 1:Yes]
// Do you want finger ridges around the knob?
Knurled = 1; // [0:No, 1:Yes]
// 0 = A cylindrical knob, any other value will taper the knob.
TaperPercentage = 20; // [0:0%, 10:10%, 20:20%, 30:30%, 40:40%, 50:50%]
// Width of "dial" ring (in mm). Set to zero if you don't want the ring.
RingWidth = 0;
// The number of markings on the dial. Set to zero if you don't want markings. (RingWidth must be non-zero.)
RingMarkings = 10;
// diameter of the hole for the setscrew (in mm). If you don't need a hole, set this to zero.
ScrewHoleDiameter = 3;
// Length of the shaft on the bottom of the knob (in mm). If you don't want a shaft, set this value to zero.
ShaftLength = 0;
// Diameter of the shaft on the bottom of the knob (in mm). (ShaftLength must be non-zero.)
ShaftDiameter = 10;
// Would you like a notch in the shaft? It can be used for a press-on type knob (rather than using a setscrew). (ShaftLength must be non-zero.)
NotchedShaft = 0; // [0:No, 1:Yes]
//////////////////////////
//Advanced settings
//////////////////////////
RingThickness = 5*1;
DivotDepth = 1.5*1;
MarkingWidth = 1.5*1;
DistanceBetweenKnurls = 3*1;
TimerKnobConst = 1.8*1;
//////////////////////////
//Calculations
//////////////////////////
PI=3.14159265*1;
KnobMajorRadius = KnobDiameter/2;
KnobMinorRadius = KnobDiameter/2 * (1 - TaperPercentage/100);
KnobRadius = KnobMinorRadius + (KnobMajorRadius-KnobMinorRadius)/2;
KnobCircumference = PI*KnobDiameter;
Knurls = round(KnobCircumference/DistanceBetweenKnurls);
Divot=CapType;
TaperAngle=asin(KnobHeight / (sqrt(pow(KnobHeight, 2) +
pow(KnobMajorRadius-KnobMinorRadius,2)))) - 90;
DivotRadius = KnobMinorRadius*.4;
union()
{
translate([0, 0, (ShaftLength==0)? 0 : ShaftLength-0.001])
difference()
{
union()
{
// Primary knob cylinder
cylinder(h=KnobHeight, r1=KnobMajorRadius, r2=KnobMinorRadius,
$fn=50);
if (Knurled)
for (i=[0 : Knurls-1])
rotate([0, 0, i * (360/Knurls)])
translate([KnobRadius, 0, KnobHeight/2])
rotate([0, TaperAngle, 0]) rotate([0, 0, 45])
cube([2, 2, KnobHeight+.001], center=true);
if (RingMarkings>0)
for (i=[0 : RingMarkings-1])
rotate([0, 0, i * (360/RingMarkings)])
translate([KnobMajorRadius + RingWidth/2, 0, 1])
cube([RingWidth*.5, MarkingWidth, 2], center=true);
if (Pointer2==1)
translate([KnobRadius, 0, KnobHeight/2-2])
rotate([0, TaperAngle, 0])
cube([8, 3, KnobHeight], center=true);
if (RingWidth>0)
translate([0, 0, RingThickness/2])
cylinder(r1=KnobMajorRadius + RingWidth, r2=KnobMinorRadius,
h=RingThickness, $fn=50, center=true);
if (Divot==2)
translate([0, 0, KnobHeight])
difference()
{
scale([1, 1, 0.5])
sphere(r=KnobMinorRadius, $fn=50, center=true);
translate([0, 0, 0-(KnobMinorRadius+.001)])
cube([KnobMinorRadius*2.5, KnobMinorRadius*2.5,
KnobMinorRadius*2], center=true);
}
if (TimerKnob==1) intersection()
{
translate([0, 0, 0-(KnobDiameter*TimerKnobConst) + KnobHeight])
sphere(r=KnobDiameter*TimerKnobConst, $fn=50, center=true);
translate([0-(KnobDiameter*TimerKnobConst)*0.1, 0,
KnobHeight/2])
scale([1, 0.5, 1])
cylinder(h=KnobHeight, r=(KnobDiameter*TimerKnobConst) *
0.8, $fn=3, center=true);
}
}
// Pointer1: Offset hemispherical divot
if (Pointer1==1)
translate([KnobMinorRadius*.55, 0, KnobHeight + DivotRadius*.6])
sphere(r=DivotRadius, $fn=40);
// Divot1: Centered cylynrical divot
if (Divot==1)
translate([0, 0, KnobHeight])
cylinder(h=DivotDepth*2, r=KnobMinorRadius-1.5, $fn=50,
center=true);
if (ShaftLength==0)
{
// Hole for shaft
translate([0, 0, HoleDepth/2 - 0.001])
difference()
{
cylinder(r=HoleDiameter/2, h=HoleDepth, $fn=20,
center=true);
// Flat for D-shaped hole
translate([(0-HoleDiameter)+HoleFlatThickness, 0, 0])
cube([HoleDiameter, HoleDiameter, HoleDepth+.001],
center=true);
}
// Hole for setscrew
if (ScrewHoleDiameter>0)
translate([0 - (KnobMajorRadius+RingWidth+1)/2, 0,
HoleDepth/2])
rotate([0, 90, 0])
cylinder(h=(KnobMajorRadius+RingWidth+1),
r=ScrewHoleDiameter/2, $fn=20, center=true);
}
// Make sure bottom ends at z=0
translate([0, 0, -10])
cube([(KnobMajorRadius+RingWidth) * 3,
(KnobMajorRadius+RingWidth) * 3, 20], center=true);
}
if (ShaftLength>0)
difference()
{
translate([0, 0, ShaftLength/2])
cylinder(h=ShaftLength, r=ShaftDiameter/2, $fn=20,
center=true);
if (NotchedShaft==1)
{
cube([HoleDiameter/2, ShaftDiameter*2, ShaftLength],
center=true);
}
// Hole for shaft
translate([0, 0, HoleDepth/2 - 0.001])
difference()
{
cylinder(r=HoleDiameter/2, h=HoleDepth, $fn=20,
center=true);
// Flat for D-shaped hole
translate([(0-HoleDiameter)+HoleFlatThickness, 0, 0])
cube([HoleDiameter, HoleDiameter, HoleDepth+.001],
center=true);
}
// Hole for setscrew
if (ScrewHoleDiameter>0)
translate([0 - (KnobMajorRadius+RingWidth+1)/2, 0,
HoleDepth/2])
rotate([0, 90, 0])
cylinder(h=(KnobMajorRadius+RingWidth+1),
r=ScrewHoleDiameter/2, $fn=20, center=true);
}
}

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,417 @@
/*
Knob Factory
Version 1.2
© 2012 Steve Cooley ( http://sc-fa.com , http://beatseqr.com , http://hapticsynapses.com )
© 2021 Matthias Ansorg ( https://ma.juii.net )
Description
===========
A parametric OpenSCAD design that allows to generate all kinds of knobs. Examples: small knobs for potentiometer inputs;
knobs for turning the extruder or an axis of the 3D printer manually; water spout knobs etc.. It's a good idea to print
only the lower 5 mm at first and then abort the print, to test if the hole diamater fits well on the shaft or if the measures
have to be tuned further.
Licence
=======
Knob Factory is licensed under a Creative Commons Attribution 3.0 Unported License according to
the licence note found at https://www.thingiverse.com/thing:20513 . Based on a work at sc-fa.com.
Permissions beyond the scope of this license may be available at http://sc-fa.com/blog/contact .
You can view the terms of the license here: http://creativecommons.org/licenses/by/3.0/
Version History
===============
1.2 2021-01-03 Option to generate knobs with stems. Major refactorings. Republished as remix on Thingiverse.
1.1 2012-04-12 Fixed the arrow indicator code to be more robust and easier to adjust parameters for.
1.0 2012-03-?? Initial release at https://www.thingiverse.com/thing:20513 .
Open Tasks
==========
* @todo Adjust $fn based on the quality parameter so that if 30 faces on the circumference are specified, the shape
will be made "round", using the current quality setting.
* @todo Change the assembly order so that the external indicator is not cut by the cone indents even if they cut to the very bottom.
* @todo Add a horizontal cylinder around the setscrew hole, providing sufficient thread length where thin stems walls don't.
* @todo Add support for melt-in nuts that can be used for the setscrew hole, as seen at https://www.thingiverse.com/thing:3475324
* @todo Provide an option to chamfer rather than round along the top, to allow printing without support when flipped over.
* @todo Refactor the top_rounding() module.
* @todo Make the top_rounding() operation faster. Everything else is already fast enough to navigate fluently in preview mode.
* @todo Add a printer_hole_scale parameter (or similar) to scale holes so that printing them offsets any printer calibration
error. This keeps local calibration issues separate form the shafthole_radius parameter, which is good for sharing configurations.
* @todo Add support for more shaft shapes (rectangular, gear shaped etc.).
* @todo Support knurling of the knob circumference.
* @todo Add support for cutouts that leave spokes between the hub and circumference.
* @todo Some more "@todo" items as available inside the source code.
* @todo Add a mode where the sphere and cone indents can be rendered, to get an idea how to adapt them if they do not cut anything.
*/
// (1) CUSTOMIZER PARAMETERS
// ======================================================================
/* [Basic Parameters] */
// ---------------------
// Degree of detail in the output to allow faster previews. Influences segments for a full circle. NOT IMPLEMENTED YET.
quality = "preview"; // ["fast preview", "preview", "rendering", "final rendering"]
// Top radius of the main (cylindrical or conical) shape. [mm]
knob_radius_top = 16;
// Bottom radius of the main (cylindrical or conical) shape. [mm]
knob_radius_bottom = 14;
// Height of the main (cylindrical or conical) knob shape, without the stem. [mm]
knob_height = 5;
// Number of faces on the circumference of the knob, as on a regular polygon. 30 means "round, using current quality setting".
knob_faces = 7;
// Radius (at the widest point) of the shaft to which the knob is mounted. [mm]
shafthole_radius = 2.65;
// Depth of the hole for the shaft. If the knob is stopped by something mounted to the shaft, you can be generous with this measure, allowing it to catch debris from mounting without stopping the knob before its final position. [mm]
shafthole_height = 12;
// Number of faces on the cylindrical edge of the shaft hole, allowing to create holes for square, hexagonal etc. shafts. 30 means "round, using current quality setting".
shafthole_faces = 20;
// How much to cut off to create a D-shaped shafthole cross-section. 0 to keep it round. [mm]
shafthole_cutoff_arc_height = 0.35;
/* [Stem (optional)] */
// --------------------
// Whether to place the knob on a stem to form a mushroom shape.
enable_stem = false;
// Radius of the stem. [mm]
stem_radius = 5;
// Height of the stem. [mm]
stem_height = 10;
// Number of faces on the cylindrical part of the stem. 30 means "round, using current quality setting".
stem_faces = 30;
// Height of the section where the stem radius adapts, as part of the stem height. [mm]
stem_transition_height = 5;
// Radius to which the stem radius adapts at the top of the stem. [mm]
stem_transition_radius = 8.8;
/* [Setscrew Hole (optional)] */
// -------------------------
// Create a hole for a set screw, as required by some potentiometer or motor shafts to have their knobs affixed.
enable_setscrew_hole = false;
// Radius of the set screw hole. [mm]
setscrew_hole_radius = 1.01;
// Height of the set screw hole's center over the base of the knob. [mm]
setscrew_hole_height = 4;
// Number of faces on the cylindrical edge of the set screw hole. 30 means "round, using current quality setting".
setscrew_hole_faces = 20;
/* [Top Rounding (optional)] */
// ---------------------------------
// Enable rounding of the top edge. (Other "top rounding *" parameters are only relevant if checked.)
enable_top_rounding = false;
// Radius to use for rounding teh top edge. [mm]
top_rounding_radius = 8;
// Cylinder faces to use for the cylinder having the rounded top edge. 30 means "round, using current quality setting".
top_rounding_faces = 30;
/* [Engraved Indicator (optional)] */
// -------------------------------
// Whether to create an engraved indicator arrow on the top surface, or not.
enable_engraved_indicator = false;
// Scale factor for the overall arrow size.
engraved_indicator_scale = 1.01;
// Scale factor for the arrow's head size.
engraved_indicator_head_scale = 2.1;
// Scale factor for the arrow's shaft size.
engraved_indicator_shaft_scale = 1.5;
// How much to move the arrow into its pointing direction. Positive or negative. [mm]
engraved_indicator_move_forward = 3.1;
// Engraving depth. [mm]
engraved_indicator_depth = 4.2;
/* [External Indicator (optional)] */
// ------------------------------
// Whether to create a dial, protruding from the bottom of the knob's circumference.
enable_external_indicator = false;
// Height of the dialhand, from the bottom of the knob body. [mm]
external_indicator_height = 11;
// Length of the dialhand protruding over the bottom radius of the knob main shape. [mm]
external_indicator_length = 3;
/* [Sphere Indents (optional)] */
// --------------------------------------
// Whether to create cutouts around the top edge or circumference using spheres (or rather regular polyhedra) arranged in a circle.
enable_sphere_indents = false;
// Number of indenting spheres.
sphere_indents_count = 7;
// Radius of the indenting spheres. [mm]
sphere_indents_radius = 3;
// Number of faces around the outer circumference of the indenting spheres. 30 means "round, using current quality setting".
sphere_indents_faces = 16;
// Distance of the indenting spheres' centers from the centerline of the knob. [mm]
sphere_indents_center_distance = 12;
// Maximum depth cut by the indenting spheres, measured from the top surface of the knob. [mm]
sphere_indents_cutdepth = 3;
// Rotation offset of all spheres. Allows to align the indentations with the indicator, setscrew or outer faces. [degrees]
sphere_indents_offset_angle = 0;
/* [Cone Indents (optional)] */
// ------------------------------------
// Whether to create cutouts around the top edge or circumference using cones or cylinders arranged in a circle. When using many narrow cylinders you can create a serrating effect for better grip on the circumference surface.
enable_cone_indents = false;
// Number of indenting cones.
cone_indents_count = 7;
// Number of faces around the outer circumference of the indenting cones. 30 means "round, using current quality setting".
cone_indents_faces = 30;
// Height of the indenting cones. [mm]
cone_indents_height = 5.1;
// Top radius of the indenting cones. [mm]
cone_indents_top_radius = 3.1;
// Bottom radius of the indenting cones. [mm]
cone_indents_bottom_radius = 7.2;
// Distance of the indenting cones' centerlines from the centerline of the knob. [mm]
cone_indents_center_distance = 16.1;
// Maximum depth cut by the indenting cones, measured from the top surface of the knob. [mm]
cone_indents_cutdepth = 5.1;
// Rotation offset of all cones. Allows to align the indentations with the indicator, setscrew or outer faces. [degrees]
cone_indents_offset_angle = 0;
// (2) FIXED AND DERIVED MEASURES
// ======================================================================
// Prevent anything following from showing up as Customizer parameters.
/* [Hidden] */
// Small amount of overlap for unions and differences, to prevent z-fighting.
nothing = 0.01;
// Degrees per fragment of a circle. Used only where users want round outlines by specifying 30 faces.
$fa =
(quality == "final rendering") ? 1 :
(quality == "rendering") ? 3 :
(quality == "preview") ? 6 :
(quality == "fast preview") ? 12 : 12; // The OpenSCAD default.
// Minimum size of circle fragments in mm.
$fs =
(quality == "final rendering") ? 0.1 :
(quality == "rendering") ? 0.25 :
(quality == "preview") ? 0.5 :
(quality == "fast preview") ? 2 : 2; // The OpenSCAD default.
// (3) MAIN MODULE
// ======================================================================
knob(); // Entry point of the program.
module knob() {
difference() {
difference() {
difference() {
difference() {
union() {
translate([0, 0, enable_stem ? stem_height : 0]) {
difference() {
knob_base();
if (enable_top_rounding) top_rounding();
}
if (enable_external_indicator) external_indicator();
}
if (enable_stem) stem();
}
shafthole();
}
if (enable_setscrew_hole) setscrew_hole();
}
if (enable_engraved_indicator) engraved_indicator();
if (enable_sphere_indents) sphere_indents();
if (enable_cone_indents) cone_indents();
}
}
}
// (4) SUBMODULES
// ======================================================================
module knob_base() {
// Align a face with the setscrew hole for aesthetic reasons, providing an arc above the setscrew hole in case of a round
// stem base and polygonal widening part of the stem. In OpenSCAD, polygons ("cylinders") are created so that a corner
// is placed on the +x axis. For uneven corner numbers, naturally a face is then centered around the -x axis. By rotating +90°,
// we move that face to be centered around the -y axis, where the setscrew hole has to be placed because it is the "back".
rotate([0, 0, 90])
// Knob base shape without any modifications or additions.
cylinder(r1 = knob_radius_bottom, r2 = knob_radius_top, h = knob_height, $fn = knob_faces);
}
// @todo Calculate the convexity values based on the number of sphere and cone indents. Because a higher-than-necessary value
// hurts preview mode performance.
module top_rounding() {
// Thanks to http://www.iheartrobotics.com/ for the articles that helped implement this.
ct = -0.1; // circle translate? not sure.
circle_radius = knob_radius_top; // just match the top edge radius
circle_height = 1; // actually.. I don't know what this does.
pad = 0.2; // Padding to maintain manifold
render(convexity = 5)
translate([0, 0, knob_height])
rotate([180, 0, 0])
difference() {
rotate_extrude(convexity = 5, $fn = top_rounding_faces)
translate([circle_radius - ct - top_rounding_radius + pad, ct - pad, 0])
square(top_rounding_radius + pad, top_rounding_radius + pad);
rotate_extrude(convexity = 5, $fn = top_rounding_faces)
translate([circle_radius - ct - top_rounding_radius, ct + top_rounding_radius, 0])
circle(r = top_rounding_radius, $fn = top_rounding_faces);
}
}
module stem() {
// Straight basic stem.
cylinder(h = stem_height + nothing, r = stem_radius, $fn = stem_faces);
// Widening part at the top.
rotate([0, 0, 90]) // To align a face with the setscrew hole; see knob_base().
translate([0, 0, stem_height - stem_transition_height])
cylinder(h = stem_transition_height, r1 = stem_radius, r2 = stem_transition_radius, $fn = knob_faces);
}
module shafthole() {
difference() {
// Create a round shafthole base shape.
translate([0, 0, -1])
cylinder(r = shafthole_radius, h = shafthole_height, $fn = shafthole_faces);
// Adapt to a D-shaped shafthole if desired.
if(shafthole_cutoff_arc_height != 0) {
cutoff_size = [
2 * shafthole_radius + 2 * nothing,
shafthole_cutoff_arc_height + 2 * nothing,
shafthole_height + 2 * nothing
];
translate([-nothing, shafthole_cutoff_arc_height/2 - shafthole_radius - nothing, shafthole_height / 2])
cube(cutoff_size, center = true);
}
}
}
module setscrew_hole() {
hole_depth = max(knob_radius_top, knob_radius_bottom, stem_radius) + nothing;
translate([0, -hole_depth / 2, setscrew_hole_height])
rotate([90, 0, 0])
cylinder(r = setscrew_hole_radius, h = hole_depth, center = true, $fn = setscrew_hole_faces);
}
// @todo Refactor the scaling algorithm and parameters to be more understandable. Default scale should be 1.
// @todo Fix that engraved_indicator_depth has not yet the desired effect because it is scaled with the rest of the arrow.
module engraved_indicator() {
translate([0, engraved_indicator_move_forward, knob_height + (enable_stem ? stem_height : 0)])
rotate([90, 0, 45])
scale([engraved_indicator_scale * 0.3, engraved_indicator_scale * 0.3, engraved_indicator_scale * 0.3])
union() {
rotate([90, 45, 0])
scale([engraved_indicator_head_scale, engraved_indicator_head_scale, 1])
// Arrowhead triangle as a cylinder with 3 faces.
cylinder(r = 8, h = engraved_indicator_depth * 2, $fn = 3, center = true);
rotate([90, 45, 0])
translate([-10, 0, 0])
scale([engraved_indicator_shaft_scale, engraved_indicator_shaft_scale, 1])
cube(size = [15, 10, engraved_indicator_depth * 2], center = true);
}
}
module external_indicator() {
// The diagonal of the square used as indicator is sqrt(2*knob_radius_bottom²). First we move it back from that
// most outward position to point at the center, then to point at the circumference of the knob, then to point out as specified.
translate([0, -sqrt(2 * knob_radius_bottom * knob_radius_bottom) + knob_radius_bottom + external_indicator_length, 0])
rotate([0, 0, 45])
cube([knob_radius_bottom, knob_radius_bottom, external_indicator_height], center = false);
}
module sphere_indents() {
z_position = sphere_indents_radius + (enable_stem ? stem_height : 0) + knob_height - sphere_indents_cutdepth;
for (z = [0 : sphere_indents_count]) {
// 90° base rotation angle to align the spheres with corners of the base shape. See knob_base().
rotate([0, 0, 90 + sphere_indents_offset_angle + ((360 / sphere_indents_count) * z)])
translate([sphere_indents_center_distance, 0, z_position])
sphere(r = sphere_indents_radius, $fn = sphere_indents_faces);
}
}
module cone_indents() {
height = cone_indents_height + 2 * nothing;
z_position = height / 2 + (enable_stem ? stem_height : 0) + knob_height - cone_indents_cutdepth;
for (z = [0 : cone_indents_count]) {
// 90° base rotation angle to align the cones with corners of the base shape. See knob_base().
rotate([0, 0, 90 + cone_indents_offset_angle + ((360 / cone_indents_count) * z)])
translate([cone_indents_center_distance, 0, z_position - nothing])
cylinder(
r1 = cone_indents_bottom_radius,
r2 = cone_indents_top_radius,
h = height,
center = true,
$fn = cone_indents_faces
);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
3D Printing/Pot_Knobs/Pot1.STL Executable file

Binary file not shown.

BIN
3D Printing/Pot_Knobs/Pot2.STL Executable file

Binary file not shown.

BIN
3D Printing/Pot_Knobs/Pot3.STL Executable file

Binary file not shown.

BIN
3D Printing/Pot_Knobs/Pot4.STL Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

32
3D Printing/Pot_Knobs/knob.scad Executable file
View file

@ -0,0 +1,32 @@
/* [Basic] */
//Diametre du bouton
Knob_Diameter=13; //[10:30]
//Hauteur du bouton
Knob_Height=15;//[10:20]
//Longueur de l'axe
Axis_Lenght=10;//[5:15]
//Arrondis
Rounded=2;//[1:3]
//Ajustement
Ajustment=0.2;//[0,0.1,0.2,0.3]
/* [Hidden] */
$fn=50;
difference() {
union() {
cylinder(r=Knob_Diameter/2,h=Knob_Height-Rounded);
translate([0,0,Knob_Height-Rounded]) cylinder(r=Knob_Diameter/2-Rounded,h=Rounded);
translate([0,0,Knob_Height-Rounded]) rotate_extrude(convexity = 10) translate([Knob_Diameter/2-Rounded,0,0]) circle(r=Rounded);
}
translate([0,0,Knob_Height]) rotate([-90,0,0]) cylinder(r=0.5,h=Knob_Diameter/2);
translate([0,0,Knob_Height]) sphere(r=0.5);
for (i=[22.5:45:360]) translate([(Knob_Diameter+0.6)*sin(i)/2,(Knob_Diameter+0.6)*cos(i)/2,3]) cylinder(r=0.7,h=Knob_Height);
difference() {
translate([0,0,2]) cylinder(r=3.1+Ajustment,h=Axis_Lenght-2);
translate([-5,-6.6-Ajustment,2]) cube([10,5,Axis_Lenght-2]);
}
difference() {
cylinder(r=3+Ajustment,h=2);
translate([-5,-6.5-Ajustment,0]) cube([10,5,Axis_Lenght-2]);
}
}

View file

@ -0,0 +1,58 @@
// preview[view:northwest, tilt:bottomdiagonal]
/* [default values for el-cheapo hotpoint gas dryer timer potentiometer knob] */
// min width of the plastic walls.
clf_wall = 2; // plastic walls are 2mm
clf_shaft_diameter = 6.3; // the larger diameter of the potentiometer shaft
clf_shaft_notch_diameter = 5.0; // the diameter measuring 90degrees on the shaft notch (if it is a D shaped shaft. enter the same as above if not)
// height does not matter much for the male part, as it will pass trhu the whole part. So just enter a good height so that it reaches the latch on the bottom.
clf_partHeight = 35;
clf_diameter = 55;
clf_handle_height = 30;
clf_handle_diameter = 40;
clf_indicator_angle_from_notch = 0; // 0 if indicator faces notch, 180 if it faces away and so on.
use <knurledFinishLib_v2.scad>
clf_main();
module clf_main(){
// body - hole
difference(){
// handle + rest of body
union(){
// regular handle
cylinder( h=clf_partHeight, r=clf_handle_diameter/2);
// knurled handle (requires https://www.thingiverse.com/thing:32122 )
//knurl(k_cyl_hg=clf_partHeight, k_cyl_od=clf_handle_diameter, e_smooth=clf_wall*3);
//knurled_cyl( clf_partHeight, clf_handle_diameter, 2, 2, 2, true, 10 );
difference(){
// base
base_height=clf_partHeight-clf_handle_height;
cylinder( h=base_height, r=clf_diameter/2);
// notch
color("green") rotate(clf_indicator_angle_from_notch) translate([0,(clf_diameter/2)-(clf_wall*2),base_height])
cube( clf_wall*2, center=true);
}
}
// the hole
color("red") translate([0,0,-clf_wall])
union(){
// the hole is a cylinder with a notch removed from it
difference(){
// the main hole format
union(){
cylinder( h=clf_partHeight, r=clf_shaft_diameter/2 );
}
// the D shape "removed" from the hole
union(){
cs1=clf_shaft_diameter - clf_shaft_notch_diameter;
color("green") translate( [ -clf_shaft_diameter/2, (clf_shaft_diameter/2)-cs1, 0] )
cube( [clf_shaft_diameter, cs1, clf_partHeight], center=false);
}
}
}
}
}

View file

@ -0,0 +1,42 @@
/* [Basic] */
//Diametre du bouton
Knob_Diameter=13; //[10:30]
//Hauteur du bouton
Knob_Height=15;//[10:20]
//Longueur de l'axe
Axis_Lenght=10;//[5:15]
//Arrondis
Rounded=2;//[1:3]
//Ajustement
Ajustment=0.2;//[0,0.1,0.2,0.3]
/* [Hidden] */
$fn=50;
difference() {
union() {
// body
cylinder(r=Knob_Diameter/2,h=Knob_Height-Rounded);
// cap inner bit
translate([0,0,Knob_Height-Rounded]) cylinder(r=Knob_Diameter/2-Rounded,h=Rounded);
// cap rounded (donut)
translate([0,0,Knob_Height-Rounded]) rotate_extrude(convexity = 10) translate([Knob_Diameter/2-Rounded,0,0]) circle(r=Rounded);
}
// indicator
translate([0,0,Knob_Height]) rotate([-90,0,0]) cylinder(r=0.5,h=Knob_Diameter/2);
translate([0,0,Knob_Height]) sphere(r=0.5);
// knurl grooves
for (i=[22.5:45:360]) translate([(Knob_Diameter+0.6)*sin(i)/2,(Knob_Diameter+0.6)*cos(i)/2,3]) cylinder(r=0.7,h=Knob_Height);
difference() {
// hole
translate([0,0,2]) cylinder(r=3.1+Ajustment,h=Axis_Lenght-2);
// key insert
translate([-5,-6.6-Ajustment,2]) cube([10,5,Axis_Lenght-2]);
}
difference() {
translate([0,0,-1]) cylinder(r=3+Ajustment,h=3);
translate([-5,-6.5-Ajustment,0]) cube([10,5,Axis_Lenght-2]);
}
}

View file

@ -0,0 +1,181 @@
/*
* knurledFinishLib_v2.scad
*
* Written by aubenc @ Thingiverse
*
* This script is licensed under the Public Domain license.
*
* http://www.thingiverse.com/thing:31122
*
* Derived from knurledFinishLib.scad (also Public Domain license) available at
*
* http://www.thingiverse.com/thing:9095
*
* Usage:
*
* Drop this script somewhere where OpenSCAD can find it (your current project's
* working directory/folder or your OpenSCAD libraries directory/folder).
*
* Add the line:
*
* use <knurledFinishLib_v2.scad>
*
* in your OpenSCAD script and call either...
*
* knurled_cyl( Knurled cylinder height,
* Knurled cylinder outer diameter,
* Knurl polyhedron width,
* Knurl polyhedron height,
* Knurl polyhedron depth,
* Cylinder ends smoothed height,
* Knurled surface smoothing amount );
*
* ...or...
*
* knurl();
*
* If you use knurled_cyl() module, you need to specify the values for all and
*
* Call the module ' help(); ' for a little bit more of detail
* and/or take a look to the PDF available at http://www.thingiverse.com/thing:9095
* for a in depth descrition of the knurl properties.
*/
module knurl( k_cyl_hg = 12,
k_cyl_od = 25,
knurl_wd = 3,
knurl_hg = 4,
knurl_dp = 1.5,
e_smooth = 2,
s_smooth = 0)
{
knurled_cyl(k_cyl_hg, k_cyl_od,
knurl_wd, knurl_hg, knurl_dp,
e_smooth, s_smooth);
}
module knurled_cyl(chg, cod, cwd, csh, cdp, fsh, smt)
{
cord=(cod+cdp+cdp*smt/100)/2;
cird=cord-cdp;
cfn=round(2*cird*PI/cwd);
clf=360/cfn;
crn=ceil(chg/csh);
echo("knurled cylinder max diameter: ", 2*cord);
echo("knurled cylinder min diameter: ", 2*cird);
if( fsh < 0 )
{
union()
{
shape(fsh, cird+cdp*smt/100, cord, cfn*4, chg);
translate([0,0,-(crn*csh-chg)/2])
knurled_finish(cord, cird, clf, csh, cfn, crn);
}
}
else if ( fsh == 0 )
{
intersection()
{
cylinder(h=chg, r=cord-cdp*smt/100, $fn=2*cfn, center=false);
translate([0,0,-(crn*csh-chg)/2])
knurled_finish(cord, cird, clf, csh, cfn, crn);
}
}
else
{
intersection()
{
shape(fsh, cird, cord-cdp*smt/100, cfn*4, chg);
translate([0,0,-(crn*csh-chg)/2])
knurled_finish(cord, cird, clf, csh, cfn, crn);
}
}
}
module shape(hsh, ird, ord, fn4, hg)
{
x0= 0; x1 = hsh > 0 ? ird : ord; x2 = hsh > 0 ? ord : ird;
y0=-0.1; y1=0; y2=abs(hsh); y3=hg-abs(hsh); y4=hg; y5=hg+0.1;
if ( hsh >= 0 )
{
rotate_extrude(convexity=10, $fn=fn4)
polygon(points=[ [x0,y1],[x1,y1],[x2,y2],[x2,y3],[x1,y4],[x0,y4] ],
paths=[ [0,1,2,3,4,5] ]);
}
else
{
rotate_extrude(convexity=10, $fn=fn4)
polygon(points=[ [x0,y0],[x1,y0],[x1,y1],[x2,y2],
[x2,y3],[x1,y4],[x1,y5],[x0,y5] ],
paths=[ [0,1,2,3,4,5,6,7] ]);
}
}
module knurled_finish(ord, ird, lf, sh, fn, rn)
{
for(j=[0:rn-1])
assign(h0=sh*j, h1=sh*(j+1/2), h2=sh*(j+1))
{
for(i=[0:fn-1])
assign(lf0=lf*i, lf1=lf*(i+1/2), lf2=lf*(i+1))
{
polyhedron(
points=[
[ 0,0,h0],
[ ord*cos(lf0), ord*sin(lf0), h0],
[ ird*cos(lf1), ird*sin(lf1), h0],
[ ord*cos(lf2), ord*sin(lf2), h0],
[ ird*cos(lf0), ird*sin(lf0), h1],
[ ord*cos(lf1), ord*sin(lf1), h1],
[ ird*cos(lf2), ird*sin(lf2), h1],
[ 0,0,h2],
[ ord*cos(lf0), ord*sin(lf0), h2],
[ ird*cos(lf1), ird*sin(lf1), h2],
[ ord*cos(lf2), ord*sin(lf2), h2]
],
triangles=[
[0,1,2],[2,3,0],
[1,0,4],[4,0,7],[7,8,4],
[8,7,9],[10,9,7],
[10,7,6],[6,7,0],[3,6,0],
[2,1,4],[3,2,6],[10,6,9],[8,9,4],
[4,5,2],[2,5,6],[6,5,9],[9,5,4]
],
convexity=5);
}
}
}
module knurl_help()
{
echo();
echo(" Knurled Surface Library v2 ");
echo("");
echo(" Modules: ");
echo("");
echo(" knurled_cyl(parameters... ); - Requires a value for each an every expected parameter (see bellow) ");
echo("");
echo(" knurl(); - Call to the previous module with a set of default parameters, ");
echo(" values may be changed by adding 'parameter_name=value' i.e. knurl(s_smooth=40); ");
echo("");
echo(" Parameters, all of them in mm but the last one. ");
echo("");
echo(" k_cyl_hg - [ 12 ] ,, Height for the knurled cylinder ");
echo(" k_cyl_od - [ 25 ] ,, Cylinder's Outer Diameter before applying the knurled surfacefinishing. ");
echo(" knurl_wd - [ 3 ] ,, Knurl's Width. ");
echo(" knurl_hg - [ 4 ] ,, Knurl's Height. ");
echo(" knurl_dp - [ 1.5 ] ,, Knurl's Depth. ");
echo(" e_smooth - [ 2 ] ,, Bevel's Height at the bottom and the top of the cylinder ");
echo(" s_smooth - [ 0 ] ,, Knurl's Surface Smoothing : File donwn the top of the knurl this value, i.e. 40 will snooth it a 40%. ");
echo("");
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,279 @@
/*
Parametric Potentiometer Knob Generator
version 1.1
2012 Steve Cooley
http://sc-fa.com
http://beatseqr.com
http://hapticsynapses.com
parametric potentiometer knob generator by steve cooley is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Based on a work at sc-fa.com. Permissions beyond the scope of this license may be available at http://sc-fa.com/blog/contact.
view terms of the license here:
http://creativecommons.org/licenses/by-nc-sa/3.0/
version history
---------------
1.1 2012-04-12 fixed the arrow indicator code to be more robust and easier to adjust parameters for.
1.0 2012-03-?? initial release.
*/
//
//
// Physical attributes, basic
//
//
knob_radius_top = 10;
knob_radius_bottom = 10;
knob_height = 16;
knob_smoothness = 20;
shaft_radius = 3.25;
shaft_height = 13;
shaft_smoothness = 20;
shaft_is_flatted = true;
flat_size_adjustment = -0.0;
// you won't need to mess with this. less than 5 makes it disappear. you can, however,
// set the adjustment to be a negative decimal if you need a flat but not as big as the default.
// go positive if you need a bigger flat
flat_size = 5 + flat_size_adjustment;
// some potentiometers need to have their knobs affixed with a set screw.
set_screw = true;
set_screw_radius = 1.5;
set_screw_depth = 9;
set_screw_height = 4;
quality_of_set_screw = 20;
//
//
// Decorations
//
//
//
// top edge smoothing
// thanks to http://www.iheartrobotics.com/ for the articles!
//
smoothing = true;
smoothing_radius = 3; // tweak on this one, how much smoothing to apply
smooth = 20; // tweak on this one, Number of facets of rounding cylinder
ct = -0.1; // circle translate? not sure.
circle_radius = knob_radius_top; // just match the top edge radius
circle_height = 1; // actually.. I don't know what this does.
pad = 0.2; // Padding to maintain manifold
//
// directional indicators
//
// this is a corner edge of a cube sticking out of the cylinder at the bottom
// you can use it instead of the arrow shaped cutout in the top if you like. Or both.
pointy_external_indicator = false;
pointy_external_indicator_height = 11;
pointy_external_indicator_pokey_outey_ness = -0.0; //
pokey_outey_value = pointy_external_indicator_pokey_outey_ness - 1 - pad;
pokey_outey = [pokey_outey_value, pokey_outey_value,0];
// there's an arrow shaped hole you can have. There aren't a lot of controls for this.
// please feel free to improve on this script here.
arrow_indicator = true;
arrow_indicator_scale = 1.3;
arrow_indicator_translate = [0,1,16];
arrow_scale_head = 2;
arrow_scale_shaft = 1.5;
//
// indentations
//
// for spherical indentations, set the quantity, quality, size, and adjust the placement
indentations_sphere = false;
sphere_number_of_indentations = 12;
sphere_quality_of_indentations = 4;
size_of_sphere_indentations = 4;
// the first number in this set moves the spheres in or out. smaller is closer to the middle
// the second number in this set moves the spheres left or right
// the third number in this set moves the speheres up or down
translation_of_sphere_indentations = [10,0,15];
// in case you are using an odd number of indentations, you way want to adjust the starting angle
// so that they align to the front or set screw locations.
sphere_starting_rotation = 90;
// for cylinder indentations, set quantity, quality, radius, height, and placement
indentations_cylinder = true;
cylinder_number_of_indentations = 10;
cylinder_quality_of_indentations = 50;
radius_of_cylinder_indentations_top = 3;
radius_of_cylinder_indentations_bottom = 5;
height_of_cylinder_indentations = 12;
translation_of_cylinder_indentations = [0,8,-8];
cylinder_starting_rotation = -33.3;
// these are some setup variables... you probably won't need to mess with them.
negative_knob_radius = knob_radius_bottom*-1;
// this is the main module. It calls the submodules.
make_the_knob();
module make_the_knob()
{
difference()
{
difference()
{
difference()
{
difference()
{
union()
{
difference()
{
// main cylinder
cylinder(r1=knob_radius_bottom,r2=knob_radius_top,h=knob_height, $fn=knob_smoothness);
smoothing();
}
external_direction_indicator();
}
shaft_hole();
}
set_screw_hole();
}
arrow_indicator();
indentations();
}
}
}
module smoothing() {
// smoothing the top
if(smoothing == true)
{
translate([0,0,knob_height])
rotate([180,0,0])
difference() {
rotate_extrude(convexity=10, $fn = smooth)
translate([circle_radius-ct-smoothing_radius+pad,ct-pad,0])
square(smoothing_radius+pad,smoothing_radius+pad);
rotate_extrude(convexity=10, $fn = smooth)
translate([circle_radius-ct-smoothing_radius,ct+smoothing_radius,0])
circle(r=smoothing_radius,$fn=smooth);
}
}
}
module external_direction_indicator() {
if(pointy_external_indicator == true)
{
// outer pointy indicator
rotate([0,0,45])
translate(pokey_outey)
// cube size of 8 minimum to point out
cube(size=[knob_radius_bottom,knob_radius_bottom,pointy_external_indicator_height],center=false);
}
}
module shaft_hole() {
// shaft hole
difference()
{
// round shaft hole
translate([ 0, 0, -1 ])
cylinder(r=shaft_radius,h=shaft_height, $fn=shaft_smoothness);
if(shaft_is_flatted == true)
{
// D shaft shape for shaft cutout
rotate( [0,0,90])
translate([-7.5,-5,0])
cube(size=[flat_size,10,13],center=false);
}
}
}
module set_screw_hole() {
if(set_screw == true)
{
// set screw hole
rotate ([90,0,0])
translate([ 0, set_screw_height, 1 ])
cylinder(r=set_screw_radius,h=set_screw_depth, $fn=quality_of_set_screw);
}
}
module arrow_indicator() {
if(arrow_indicator == true)
{
translate(arrow_indicator_translate)
// begin arrow top cutout
// translate([(knob_radius/2),knob_height,knob_height])
rotate([90,0,45])
scale([arrow_indicator_scale*.3,arrow_indicator_scale*.3,arrow_indicator_scale*.3])
union()
{
rotate([90,45,0])
scale([arrow_scale_head,arrow_scale_head,1])
cylinder(r=8, h=10, $fn=3, center=true);
rotate([90,45,0])
translate([-10,0,0])
scale([arrow_scale_shaft,arrow_scale_shaft,1])
cube(size=[15,10,10],center=true);
}
}
}
module indentations() {
if(indentations_sphere == true)
{
for (z = [0:sphere_number_of_indentations])
{
rotate([0,0,sphere_starting_rotation+((360/sphere_number_of_indentations)*z)])
translate(translation_of_sphere_indentations)
sphere(size_of_sphere_indentations, $fn=sphere_quality_of_indentations);
}
}
if(indentations_cylinder == true)
{
for (z = [0:cylinder_number_of_indentations])
{
rotate([0,0,cylinder_starting_rotation+((360/cylinder_number_of_indentations)*z)])
translate([negative_knob_radius,0,knob_height])
translate(translation_of_cylinder_indentations)
cylinder(r1=radius_of_cylinder_indentations_bottom, r2=radius_of_cylinder_indentations_top, h=height_of_cylinder_indentations, center=true, $fn=cylinder_quality_of_indentations);
}
}
}

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

BIN
3D Printing/Tools/jack-wrench.stl Executable file

Binary file not shown.

BIN
Datasheets/2N3903-Motorola.pdf Executable file

Binary file not shown.

1677
Datasheets/BC546A-MCC.pdf Executable file

File diff suppressed because one or more lines are too long

5515
RadioShaek2Board.diy Executable file

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.