Created
December 12, 2019 17:10
-
-
Save ednisley/28ab78d336a54ae62197a106ba387fa3 to your computer and use it in GitHub Desktop.
OpenSCAD source code: Pilot V5RT pen cartridge holder for CNC 3018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Diamond Scribe in linear bearings for CNC3018 | |
// Ed Nisley KE4ZNU - 2019-08-9 | |
Layout = "Build"; // [Build, Show, Base, Mount, Plate] | |
/* [Hidden] */ | |
ThreadThick = 0.25; // [0.20, 0.25] | |
ThreadWidth = 0.40; // [0.40, 0.40] | |
/* [Hidden] */ | |
Protrusion = 0.1; // [0.01, 0.1] | |
HoleWindage = 0.2; | |
inch = 25.4; | |
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); | |
ID = 0; | |
OD = 1; | |
LENGTH = 2; | |
//- Adjust hole diameter to make the size come out right | |
module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes | |
Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2); | |
FixDia = Dia / cos(180/Sides); | |
cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides); | |
} | |
//- Dimensions | |
PenOD = 6.1; // pen refill shaft, max OD | |
Bearing = [(3.0/8.0)*inch,16.0,10.6]; // linear bearing body, ID = shaft diameter | |
BearingFlange = [Bearing[OD],17.2,1.0]; // flange around end of bearing | |
Spring = [8.5,9.5,15.5]; // compression spring around shaft, LENGTH = uncompressed | |
SpringRecess = 4*ThreadThick; | |
WallThick = 4.0; // minimum thickness / width | |
Screw = [3.0,6.75,25.0]; // holding it all together, OD = washer | |
Insert = [3.0,4.2,7.9]; // brass insert | |
//Insert = [3.0,5.0,8.0]; | |
//Insert = [4.0,6.0,10.0]; | |
Clamp = [43.2,44.0,34.0]; // tool clamp ring, OD = clearance around top | |
LipHeight = IntegerMultiple(2.0,ThreadThick); // above clamp for retaining | |
BottomExtension = 15.0; // below clamp to reach workpiece | |
MountOAL = LipHeight + Clamp[LENGTH] + BottomExtension; // total mount length | |
echo(str("Mount OAL: ",MountOAL)); | |
Plate = [PenOD + 4*ThreadWidth,Clamp[ID] - 0*2*WallThick,WallThick]; // spring reaction plate | |
echo(str("Screw length: ",Spring[LENGTH] + Plate[LENGTH] + Insert[LENGTH])); | |
NumScrews = 3; | |
ScrewBCD = Bearing[OD] + Insert[OD] + 2*WallThick; | |
echo(str("Retainer max OD: ",ScrewBCD - Screw[OD])); | |
NumSides = 9*4; // cylinder facets (multiple of 3 for lathe trimming) | |
// Basic mount shape | |
module CNC3018Base() { | |
translate([0,0,MountOAL - LipHeight]) | |
cylinder(d=Clamp[OD],h=LipHeight,$fn=NumSides); | |
translate([0,0,MountOAL - LipHeight - Clamp[LENGTH] - Protrusion]) | |
cylinder(d=Clamp[ID],h=(Clamp[LENGTH] + 2*Protrusion),$fn=NumSides); | |
cylinder(d1=Bearing[OD] + 2*WallThick,d2=Clamp[ID],h=BottomExtension + Protrusion,$fn=NumSides); | |
} | |
// Mount with holes & c | |
module Mount() { | |
difference() { | |
CNC3018Base(); | |
translate([0,0,-Protrusion]) // bearing | |
PolyCyl(Bearing[OD],2*MountOAL,NumSides); | |
translate([0,0,-Protrusion]) // bearing flanges | |
PolyCyl(BearingFlange[OD],BearingFlange[LENGTH] + Protrusion,NumSides); | |
translate([0,0,MountOAL - 1.5*BearingFlange[LENGTH]]) // sink into surface | |
PolyCyl(BearingFlange[OD],2*BearingFlange[LENGTH],NumSides); | |
for (i=[0:NumScrews - 1]) // clamp screws | |
rotate(i*360/NumScrews) | |
translate([ScrewBCD/2,0,MountOAL - Clamp[LENGTH]]) | |
rotate(180/8) | |
PolyCyl(Insert[OD],Clamp[LENGTH] + Protrusion,8); | |
} | |
} | |
module SpringPlate() { | |
difference() { | |
hull() | |
for (i=[0:NumScrews - 1]) | |
rotate(i*360/NumScrews) | |
translate([ScrewBCD/2,0,0]) | |
cylinder(d=Screw[OD] + 4*ThreadWidth,h=Plate[LENGTH],$fn=24); | |
translate([0,0,-Protrusion]) | |
PolyCyl(Plate[ID],2*MountOAL,NumSides); | |
translate([0,0,Plate[LENGTH] - SpringRecess]) // spring retainer | |
PolyCyl(Spring[OD] + 4*ThreadWidth,SpringRecess + Protrusion,NumSides); | |
for (i=[0:NumScrews - 1]) // clamp screws | |
rotate(i*360/NumScrews) | |
translate([ScrewBCD/2,0,-Protrusion]) | |
rotate(180/8) | |
PolyCyl(Screw[ID],2*MountOAL,8); | |
} | |
} | |
//----- | |
// Build it | |
if (Layout == "Base") | |
CNC3018Base(); | |
if (Layout == "Mount") | |
Mount(); | |
if (Layout == "Plate") | |
SpringPlate(); | |
if (Layout == "Show") { | |
Mount(); | |
translate([0,0,MountOAL + Plate[LENGTH] + Spring[LENGTH]]) | |
rotate([180,0,0]) | |
SpringPlate(); | |
} | |
if (Layout == "Build") { | |
translate([0,-0.75*Clamp[OD],MountOAL]) | |
rotate([180,0,0]) | |
Mount(); | |
translate([0,0.75*Plate[OD],0]) | |
SpringPlate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at https://wp.me/poZKh-8E0