Add missing files

pull/38/head
Arne Durr 2014-12-08 22:54:02 +01:00
parent 7d6cfae157
commit a88ea5be1f
6 changed files with 32354 additions and 0 deletions

View File

@ -0,0 +1,240 @@
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
// http://reprap.org/wiki/Cyclone_PCB_Factory
// Original author: Carlosgs (http://carlosgs.es)
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
// Designed with http://www.openscad.org/
// Default machine config file
// --- Size parameters ---
// --- Bottom base ---
base_size_X = 304.8 + animatePart(1,overlap=0);
base_size_Y = 261.62 + animatePart(2);
base_thickness = 8;
base_corner_radius = 20;
base_corner_res = 0;
foot_offset = 25;
// --- Axes reference position ---
// Note: The reference coordinates are centred like this:
// Y axis reference is the Y smooth rod end, BACK of RIGHT FRAME
// X axis reference is the frontal X smooth rod end, RIGHT FRAME
// Z axis reference is the Z threaded rod, at the height of the Z nut, and relative to the X reference
axes_Yreference_height = 40 + animatePart(5);
axes_Xreference_height = 74 + animatePart(6); // relative to Y reference
axes_Zreference_height = -3 + animatePart(7) + animatePart(9); // relative to X reference
axes_Xreference_posY = -81-animatePart(8)-animatePart(9); // relative to Y reference. Moves the X axis towards the front of the machine
axes_Zreference_posY = 14; // relative to X reference. Positions Z rods between the Y rods
axes_Y_threaded_height = 30 + animatePart(5);
axes_Ysmooth_separation = 165 + animatePart(1,overlap=0);
axes_Xsmooth_separation = 40 + animatePart(9);
axes_Zsmooth_separation = 40 + animatePart(10,overlap=0);
// --- Work bed ---
Ycarriage_linearBearingSeparation = 50;
workbed_size_X = axes_Ysmooth_separation+50;
workbed_size_Y = Ycarriage_linearBearingSeparation+70;
workbed_thickness = 8+3;
workbed_separation_from_Y_smooth_rod = 10;
PCBholder_height = 10;
PCB_dimX = 160;
PCB_dimY = 100;
PCB_dimZ = 1.6;
PCB_holder_edge_length = 3;
// --- Z carriage ---
Z_carriage_wall_thickness = 9;
Z_carriage_wall_width = 54;
// --- X frames ---
X_frames_additional_thickness = 5;
X_frame_footThickness = 10;
X_frame_corner_radius = 10;
X_frame_FrontalThickness = 15;
X_backlash_armThickness = 30;
X_motorWallSeparation = 5;
X_motorRotatedOffset = 5;
X_gearWallSeparation = 5;
// --- Y frames ---
Y_frame_footThickness = 10;
Y_motorWallSeparation = 5;
Y_motorRotatedOffset = 5;
Y_gearWallSeparation = 5;
Y_foot_additional_separation = 5;
Y_endstopHolderRotation = 5;
Logo = true; // Add logo to the Y Smooth Rod Idlers
// --- Axes sizes ---
// *_rodLen = length
// *_rodD = diameter
// Y smooth rod
axes_Ysmooth_rodLen = 210 + animatePart(2);
axes_Ysmooth_rodD = 8.5 + animatePart(4,dist=5);
// Y threaded rod
axes_Ythreaded_rodLen = axes_Ysmooth_rodLen-10;
axes_Ythreaded_rodD = 8.5 + animatePart(4,dist=5);
// X smooth rod
axes_Xsmooth_rodLen = 250 + animatePart(1,overlap=0);
axes_Xsmooth_rodD = 8.5 + animatePart(4,dist=5);
// X threaded rod
axes_Xthreaded_rodLen = axes_Xsmooth_rodLen+50;
axes_Xthreaded_rodD = 8.5 + animatePart(4,dist=5);
// Z smooth rod
axes_Zsmooth_rodLen = 110 + animatePart(3);
axes_Zsmooth_rodD = 8.2 + animatePart(4,dist=5);
// Z threaded rod
axes_Zthreaded_rodLen = 90;
axes_Zthreaded_rodD = 8.5 + animatePart(4,dist=5);
// --- Bearings ---
Y_linearBearingModel = "LM8UU";
X_linearBearingModel = "LM8UU";
X_linearBearingSeparation = 0;
X_threaded_rod_bearingDepth = 3;
Z_linearBearingModel = "LM8UU";
Z_threaded_rodBearingModel = 608;
Y_threaded_rodBearingModel = 608;
Y_threaded_rodBearingDepth = 3;
// --- Steppers ---
//Y_motorModel = Nema17;
//X_motorModel = Nema17;
//Z_motorModel = Nema17;
Z_motor_adjust_margin = 5;
// --- Screw sizes ---
// M3, M4, etc (integers only), at the moment only M3 and M4 will work.
Y_frontFrame_footScrewSize = 3;
Y_backFrame_footScrewSize = 3;
Y_rightSmoothRodIdler_footScrewSize = 3;
X_Frame_footScrewSize = 3;
Y_threaded_rodNutSize = 8;
X_threaded_rodNutSize = 8;
Z_threaded_rodNutSize = 8;
Y_nutHolder_screwSize = 3;
Y_singleLinearBearingHolder_screwSize = 3;
Y_PCBholder_screwSize = 3;
Y_backlash_washer_D = 15.8;
Y_backlash_washer_thickness = 1.6;
X_backlash_washer_D = 15.8-0.5;
X_backlash_washer_thickness = 1.6-0.9;
X_carriage_screwSize = 3;
Y_rightSmoothRodIdler_rodScrewSize = 3;
X_Frame_rodScrewSize = 3;
spindle_holder_screwSize = 3;
// --- Gears ---
axes_XgearSeparation = 37;
X_rodGearRatio = 21; // Number of tooth
X_motorGearRatio = 21; // Number of tooth
X_gear_thickness = 10;
Z_rodGearRatio = 15; // Number of tooth
Z_motorGearRatio = 8; // Number of tooth
Z_gear_thickness = 10;
axes_YgearSeparation = 37;
Y_rodGearRatio = 21; // Number of tooth
Y_motorGearRatio = 21; // Number of tooth
Y_gear_thickness = 5;
// --- Gear Cover ---
gearCover_margin = 4;
rodGearAddedgearCover_margin = 0;
gearCover_wallThickness = 0.4*4;
gearCover_screwHeadSpaceHeight = 4;
gearCover_screwHeadSpaceDiam = 6;
gearCoverHeight = 16;
gearCoverExtraHeight = 5;
gearCoverExtraRadius = -7;
gearCover_truncationAngle = 10;
// --- Spindle Motor ---
spindle_motor_diam_top = 51.3;
spindle_motor_diam_top_smaller = 47.5;
spindle_motor_diam = 47.5;
spindle_motor_sidelen = 32;
spindle_holder_thickness = 8;
spindle_motor_length = 90;
// --- Text ---
textHscale = 0.8;
textThickness = 1.5;
topText = "CYCLONE";
bottomText = "PCB Factory";
// --- Tolerances ---
Y_threaded_rod_Tolerance = 0.5;
Y_linearBearing_pressureFitTolerance = 0.5;
PCB_holder_tolerance = 1;
axes_Xsmooth_separation_tolerance = 0.5;
X_threaded_rod_Tolerance = 0.5;
Z_linearBearingHole_tolerance = 0.5;
LinearBearingPressureFitTolerance = 0.4;
screwHoleTolerance = 0.4;
Z_threaded_rod_Tolerance = 0.5;
// --- Render options ---
// --- Part colours ---
blueColor = [0.3,0.6,0.9];
redColor = [0.8,0.3,0.3];
yellowColor = [0.9,0.9,0.1];
blackColor = [0.2,0.2,0.2];
color_movingPart = yellowColor+[0.1,0.1,0.1];
color_stillPart = yellowColor;
// --- DXF output ---
// Activate/Deactivate rendering auxiliary references (LCS axis, etc)
draw_references = false; // Show reference axis's
render_DXF_base = false; // Render bottom base for DXF export
render_DXF_workbed = false; // Render work bed for DXF export
render_bases_outline = false; //Toggle for rendering outline DXFs
DXF_offset = 0.4; //Needed to adjust the tolerance of the laser cutter
// --- Carriage positions ---
axes_Xcarriage_pos = axes_Xsmooth_rodLen/2+sin($t*360)*axes_Xsmooth_rodLen/3;
axes_Ycarriage_pos = axes_Ysmooth_rodLen/2+sin($t*360)*axes_Ysmooth_rodLen/4.1;
axes_Zcarriage_pos = axes_Zsmooth_rodLen/2+sin($t*360)*axes_Zsmooth_rodLen/8;
// --- Parts ---
Render_X_leftFrame = true;
Render_X_rightFrame = true;
Render_X_carriage = true;
Render_Z_carriage = true;
Render_Z_carriageTop = true;
Render_Z_carriageBottom = true;
Render_Y_leftSmoothRodIdler = true;
Render_Y_rightSmoothRodIdler = true;
Render_Y_frontFrame = true;
Render_Y_backFrame = true;
Render_Y_carriage = true;
Render_control_board = true;
Render_Y_gearCover = true;
Render_Y_motorGear = true;
Render_Y_rodGear = true;
Render_X_gearCover = true;
Render_X_motorGear = true;
Render_X_rodGear = true;
Render_PCBholderTop = true;
Render_PCBholderBottom = true;
Render_YsubPart_linearBearingHolders = true;
Render_YsubPart_nutHolder = true;
//Render_rodHolder = true;
alt_XZ_carriage = false;

View File

@ -0,0 +1,237 @@
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
// http://reprap.org/wiki/Cyclone_PCB_Factory
// Original author: Carlosgs (http://carlosgs.es)
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
// Designed with http://www.openscad.org/
// Default machine config file
// --- Size parameters ---
// --- Bottom base ---
base_size_X = 304.8 + animatePart(1,overlap=0);
base_size_Y = 261.62 + animatePart(2);
base_thickness = 8;
base_corner_radius = 20;
base_corner_res = 0;
foot_offset = 25;
// --- Axes reference position ---
// Note: The reference coordinates are centred like this:
// Y axis reference is the Y smooth rod end, BACK of RIGHT FRAME
// X axis reference is the frontal X smooth rod end, RIGHT FRAME
// Z axis reference is the Z threaded rod, at the height of the Z nut, and relative to the X reference
axes_Yreference_height = 40 + animatePart(5);
axes_Xreference_height = 74 + animatePart(6); // relative to Y reference
axes_Zreference_height = -3 + animatePart(7) + animatePart(9); // relative to X reference
axes_Xreference_posY = -81-animatePart(8)-animatePart(9); // relative to Y reference. Moves the X axis towards the front of the machine
axes_Zreference_posY = 14; // relative to X reference. Positions Z rods between the Y rods
axes_Y_threaded_height = 30 + animatePart(5);
axes_Ysmooth_separation = 165 + animatePart(1,overlap=0);
axes_Xsmooth_separation = 40 + animatePart(9);
axes_Zsmooth_separation = 40 + animatePart(10,overlap=0);
// --- Work bed ---
Ycarriage_linearBearingSeparation = 50;
workbed_size_X = axes_Ysmooth_separation+50;
workbed_size_Y = Ycarriage_linearBearingSeparation+70;
workbed_thickness = 8+3;
workbed_separation_from_Y_smooth_rod = 10;
PCBholder_height = 10;
PCB_dimX = 160;
PCB_dimY = 100;
PCB_dimZ = 1.6;
PCB_holder_edge_length = 3;
// --- Z carriage ---
Z_carriage_wall_thickness = 9;
Z_carriage_wall_width = 54;
// --- X frames ---
X_frames_additional_thickness = 5;
X_frame_footThickness = 10;
X_frame_corner_radius = 10;
X_frame_FrontalThickness = 15;
X_backlash_armThickness = 30;
X_motorWallSeparation = 5;
X_motorRotatedOffset = 5;
X_gearWallSeparation = 5;
// --- Y frames ---
Y_frame_footThickness = 10;
Y_motorWallSeparation = 5;
Y_motorRotatedOffset = 5;
Y_gearWallSeparation = 5;
Y_foot_additional_separation = 5;
Y_endstopHolderRotation = 5;
Logo = true; // Add logo to the Y Smooth Rod Idlers
// --- Axes sizes ---
// *_rodLen = length
// *_rodD = diameter
// Y smooth rod
axes_Ysmooth_rodLen = 233 + animatePart(2);
axes_Ysmooth_rodD = 8.5 + animatePart(4,dist=5);
// Y threaded rod
axes_Ythreaded_rodLen = axes_Ysmooth_rodLen-10;
axes_Ythreaded_rodD = 8.5 + animatePart(4,dist=5);
// X smooth rod
axes_Xsmooth_rodLen = 300 + animatePart(1,overlap=0);
axes_Xsmooth_rodD = 8.5 + animatePart(4,dist=5);
// X threaded rod
axes_Xthreaded_rodLen = axes_Xsmooth_rodLen+50;
axes_Xthreaded_rodD = 8.5 + animatePart(4,dist=5);
// Z smooth rod
axes_Zsmooth_rodLen = 200 + animatePart(3);
axes_Zsmooth_rodD = 8.2 + animatePart(4,dist=5);
// Z threaded rod
axes_Zthreaded_rodLen = axes_Zsmooth_rodLen-20;
axes_Zthreaded_rodD = 8.5 + animatePart(4,dist=5);
// --- Bearings ---
Y_linearBearingModel = "LM8UU";
X_linearBearingModel = "LM8UU";
X_linearBearingSeparation = 0;
X_threaded_rod_bearingDepth = 3;
Z_linearBearingModel = "LM8UU";
Z_threaded_rodBearingModel = 608;
Y_threaded_rodBearingModel = 608;
Y_threaded_rodBearingDepth = 3;
// --- Steppers ---
//Y_motorModel = Nema17;
//X_motorModel = Nema17;
//Z_motorModel = Nema17;
Z_motor_adjust_margin = 5;
// --- Screw sizes ---
// M3, M4, etc (integers only), at the moment only M3 and M4 will work.
Y_frontFrame_footScrewSize = 4;
Y_backFrame_footScrewSize = 4;
Y_rightSmoothRodIdler_footScrewSize = 4;
X_Frame_footScrewSize = 4;
Y_threaded_rodNutSize = 8;
X_threaded_rodNutSize = 8;
Z_threaded_rodNutSize = 8;
Y_nutHolder_screwSize = 4;
Y_singleLinearBearingHolder_screwSize = 4;
Y_PCBholder_screwSize = 4;
Y_backlash_washer_D = 15.8;
Y_backlash_washer_thickness = 1.6;
X_backlash_washer_D = 15.8-0.5;
X_backlash_washer_thickness = 1.6-0.9;
X_carriage_screwSize = 4;
Y_rightSmoothRodIdler_rodScrewSize = 4;
X_Frame_rodScrewSize = 4;
spindle_holder_screwSize = 4;
// --- Gears ---
axes_XgearSeparation = 37;
X_rodGearRatio = 21; // Number of tooth
X_motorGearRatio = 21; // Number of tooth
X_gear_thickness = 10;
Z_rodGearRatio = 15; // Number of tooth
Z_motorGearRatio = 8; // Number of tooth
Z_gear_thickness = 10;
axes_YgearSeparation = 37;
Y_rodGearRatio = 21; // Number of tooth
Y_motorGearRatio = 21; // Number of tooth
Y_gear_thickness = 5;
// --- Gear Cover ---
gearCover_margin = 4;
rodGearAddedgearCover_margin = 0;
gearCover_wallThickness = 0.4*4;
gearCover_screwHeadSpaceHeight = 4;
gearCover_screwHeadSpaceDiam = 6;
gearCoverHeight = 16;
gearCoverExtraHeight = 5;
gearCoverExtraRadius = -7;
gearCover_truncationAngle = 10;
// --- Spindle Motor ---
spindle_motor_diam_top = 51.3;
spindle_motor_diam_top_smaller = 47.5;
spindle_motor_diam = 47.5;
spindle_motor_sidelen = 32;
spindle_holder_thickness = 8;
spindle_motor_length = 90;
// --- Text ---
textHscale = 0.8;
textThickness = 1.5;
topText = "CYCLONE";
bottomText = "PCB Factory";
// --- Tolerances ---
Y_threaded_rod_Tolerance = 0.5;
Y_linearBearing_pressureFitTolerance = 0.1;
PCB_holder_tolerance = 1;
axes_Xsmooth_separation_tolerance = 0.5;
X_threaded_rod_Tolerance = 0.5;
Z_linearBearingHole_tolerance = 0.1;
LinearBearingPressureFitTolerance = 0.1;
screwHoleTolerance = 0.04;
// --- Render options ---
// --- Part colours ---
blueColor = [0.3,0.6,0.9];
redColor = [0.8,0.3,0.3];
yellowColor = [0.9,0.9,0.1];
blackColor = [0.2,0.2,0.2];
color_movingPart = yellowColor+[0.1,0.1,0.1];
color_stillPart = yellowColor;
// --- DXF output ---
// Activate/Deactivate rendering auxiliary references (LCS axis, etc)
draw_references = false; // Show reference axis's
render_DXF_base = false; // Render bottom base for DXF export
render_DXF_workbed = false; // Render work bed for DXF export
render_bases_outline = false; //Toggle for rendering outline DXFs
DXF_offset = 0.4; //Needed to adjust the tolerance of the laser cutter
// --- Carriage positions ---
axes_Xcarriage_pos = axes_Xsmooth_rodLen/2+sin($t*360)*axes_Xsmooth_rodLen/3;
axes_Ycarriage_pos = axes_Ysmooth_rodLen/2+sin($t*360)*axes_Ysmooth_rodLen/4.1;
axes_Zcarriage_pos = axes_Zsmooth_rodLen/2+sin($t*360)*axes_Zsmooth_rodLen/8;
// --- Parts ---
Render_X_leftFrame = true;
Render_X_rightFrame = true;
Render_X_carriage = true;
Render_Z_carriage = true;
Render_Z_carriageTop = true;
Render_Z_carriageBottom = true;
Render_Y_leftSmoothRodIdler = true;
Render_Y_rightSmoothRodIdler = true;
Render_Y_frontFrame = true;
Render_Y_backFrame = true;
Render_Y_carriage = true;
Render_control_board = true;
Render_Y_gearCover = true;
Render_Y_motorGear = true;
Render_Y_rodGear = true;
Render_X_gearCover = true;
Render_X_motorGear = true;
Render_X_rodGear = true;
Render_PCBholderTop = true;
Render_PCBholderBottom = true;
Render_YsubPart_linearBearingHolders = true;
Render_YsubPart_nutHolder = true;
//Render_rodHolder = true;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,379 @@
/* Version 3
Added support for font selection (default is Letters.dxf)
Added WriteCube module
Added Rotate for text (rotates on the plane of the text)
Added writesphere
Added space= (spacing between characters in char widths) def=1
Added writecylinder()
By Harlan Martin
harlan@sutlog.com
January 2012
(The file TestWrite.scad gives More usage examples)
(This module requires the file Letters.dxf to reside in the same folder)
(The file Letters.dfx was created with inkscape..Each letter is in its own layer)
(This module seperates each letter in the string and imports it from Letters.dfx)
*/
pi=3.1415926535897932384626433832795028841971693993751058209;
pi2=pi*2;
// These control the default values for write() writesphere() writecube()
// if the parameters are not included in the call. Feel free to set your own
// defaults.
//default settings
center=false;
h = 4; //mm letter height
t = 1; //mm letter thickness
space =1; //extra space between characters in (character widths)
rotate=0; // text rotation (clockwise)
font = "Letters.dxf"; //default for aditional fonts
fontPath = "./"; // CGS MOD: Path for the DXF font files
// write cube defaults
face = "front"; // default face (top,bottom,left,right,back,front)
up =0; //mm up from center on face of cube
down=0;
right =0; //mm left from center on face of cube
left=0;
// write sphere defaults
rounded=false; //default for rounded letters on writesphere
north=0; // intial text position (I suggest leave these 0 defaults)
south=0;
east=0;
west=0;
spin=0;
// writecylinder defaults
middle=0; //(mm toward middle of circle)
ccw=false; //write on top or bottom in a ccw direction
r1=0; //(not implimented yet)
r2=0; //(not implimented yet)
// Contact me if your interested in how to make your own font files
// Its tedious and time consuming, but not very hard
module writecylinder(text,where,radius,height){
wid=(.125* h *5.5 * space);
widall=wid*(len(text)-1)/2;
//angle that measures width of letters on sphere
function NAngle(radius)=(wid/(pi2*radius))*360;
//angle of half width of text
function mmangle(radius)=(widall/(pi2*radius)*360);
if ((face=="top")||(face=="bottom") ){
if (face=="top" ){
if (center==true){
writecircle(text,where+[0,0,height/2],radius-h,rotate=rotate,font=font,h=h,t=t,
space=space,east=east,west=west,middle=middle,ccw=ccw);
}else{
writecircle(text,where+[0,0,height],radius-h,rotate=rotate,font=font,h=h,t=t,
space=space,east=east,west=west,middle=middle,ccw=ccw);
}
}else{
rotate(180,[1,0,0])
if (center==true){
writecircle(text,where+[0,0,height/2],radius-h,rotate=rotate,font=font,h=h,t=t,
space=space,east=east,west=west,middle=middle,ccw=ccw);
}else{
writecircle(text,where+[0,0,0],radius-h,rotate=rotate,font=font,h=h,t=t,
space=space,east=east,west=west,middle=middle,ccw=ccw);
}
}
}else{
// if (radius>0){
if (center==true) {
rotate(-mmangle(radius)*(1-abs(rotate)/90),[0,0,1])
translate(where)
writethecylinder(text,where,radius,height,r1=radius,r2=radius,h=h,
rotate=rotate,t=t,font=font,face=face,up=up,down=down,
east=east,west=west,center=center,space=space,rounded=rounded);
} else{
rotate(-mmangle(radius)*(1-abs(rotate)/90),[0,0,1])
translate(where+[0,0,height/2])
writethecylinder(text,where,radius,height,r1=radius,r2=radius,h=h,
rotate=rotate,t=t,font=font,face=face,up=up,down=down,
east=east,west=west,center=center,space=space,rounded=rounded);
}
// the remarked out code is for cone shaped cylinders (not complete)
// }else{
// if (center==true) {
// rotate(-mmangle(radius)*(1-abs(rotate)/90),[0,0,1])
// translate(where)
// writethecylinder(text,where,radius,height,r1=r1,r2=r2,h=h,
// rotate=rotate,t=t,font=font,face=face,up=up,down=down,
// east=east,west=west,center=center,space=space,rounded=rounded);
// } else{
// rotate(-mmangle(radius)*(1-abs(rotate)/90),[0,0,1])
// translate(where+[0,0,height/2])
// writethecylinder(text,where,radius,height,r1=r1,r2=r2,h=h,
// rotate=rotate,t=t,font=font,face=face,up=up,down=down,
// east=east,west=west,center=center,space=space,rounded=rounded);
// }
// }
}
}
module writecircle(text,where,radius){
wid=(.125* h *5.5 * space);
widall=wid*(len(text)-1)/2;
//angle that measures width of letters on sphere
function NAngle(radius)=(wid/(pi2*radius))*360;
//angle of half width of text
function mmangle(radius)=(widall/(pi2*radius)*360);
if (ccw==true){
rotate(-rotate+east-west,[0,0,1]){
rotate(-mmangle(radius-middle),[0,0,1]){
translate(where)
for (r=[0:len(text)-1]){
rotate(-90+r*NAngle(radius-middle),[0,0,1]) // bottom out=-270+r
translate([radius-middle,0,0])
//rotate(90,[1,0,0])
//rotate(90,[0,1,0])
rotate(-270,[0,0,1]) // flip text (botom out = -270)
write(text[r],center=true,h=h,t=t,font=font);
}
}
}
}else{
rotate(-rotate-east+west,[0,0,1]){
rotate(mmangle(radius-middle),[0,0,1]){
translate(where)
for (r=[0:len(text)-1]){
rotate(90-r*NAngle(radius-middle),[0,0,1]) // bottom out=-270+r
translate([radius-middle,0,0])
//rotate(90,[1,0,0])
//rotate(90,[0,1,0])
rotate(270,[0,0,1]) // flip text (botom out = -270)
write(text[r],center=true,h=h,t=t,font=font);
}
}
}
}
}
module writethecylinder(text,where,radius,height,r1,r2){
wid=(.125* h *5.5 * space);
widall=wid*(len(text)-1)/2;
//angle that measures width of letters on sphere
function NAngle(radius)=(wid/(pi2*radius))*360*(1-abs(rotate)/90);
//angle of half width of text
function mmangle(radius)=(widall/(pi2*radius)*360);
translate([0,0,up-down])
rotate(east-west,[0,0,1])
for (r=[0:len(text)-1]){
rotate(-90+(r*NAngle(radius)),[0,0,1])
translate([radius,0,-r*((rotate)/90*wid)+(len(text)-1)/2*((rotate)/90*wid)])
rotate(90,[1,0,0])
rotate(90,[0,1,0])
write(text[r],center=true,h=h,rotate=rotate,t=t,font=font);
//echo("zloc=",height/2-r*((rotate)/90*wid)+(len(text)-1)/2*((rotate)/90*wid));
}
}
module writesphere(text,where,radius){
wid=(.125* h *5.5 * space);
widall=wid*(len(text)-1)/2;
echo("-----------------",widall,wid,mmangle(radius));
//angle that measures width of letters on sphere
function NAngle(radius)=(wid/(pi2*radius))*360;
//angle of half width of text
function mmangle(radius)=(widall/(pi2*radius)*360);
rotate(east-west,[0,0,1]){
rotate(south-north,[1,0,0]){
rotate(spin,[0,1,0]){
rotate(-mmangle(radius),[0,0,1]){
if ( rounded== false ){
translate(where)
for (r=[0:len(text)-1]){
rotate(-90+r*NAngle(radius),[0,0,1])
translate([radius,0,0])
rotate(90,[1,0,0])
rotate(90,[0,1,0])
write(text[r],center=true,h=h,rotate=rotate,t=t,font=font);
}
}else{
difference(){
translate(where)
for (r=[0:len(text)-1]){
rotate(-90+r*NAngle(radius),[0,0,1])
translate([radius,0,0])
rotate(90,[1,0,0])
rotate(90,[0,1,0])
write(text[r],center=true,h=h,rotate=rotate,t=t*2+h,font=font);
}
difference(){ //rounded outside
sphere(radius+(t*2+h)*2);
sphere(radius+t/2);
}
sphere(radius-t/2); // rounded inside for indented text
}
}
}
}}}
}
module writecube(text,where,size){
if (str(size)[0] != "["){
// its a square cube (size was not a matrix so make it one)
writethecube(text,where,[size,size,size],h=h,rotate=rotate,space=space,
t=t,font=font,face=face,up=up,down=down,right=right,left=left);
}else{
// its not square
writethecube(text,where,size,h=h,rotate=rotate,space=space,
t=t,font=font,face=face,up=up,down=down,right=right,left=left);
}
}
// I split the writecube module into 2 pieces.. easier to add features later
module writethecube(text,where,size){
if (face=="front") {
translate([where[0]+right-left,where[1]-size[1]/2,where[2]+up-down])
rotate(90,[1,0,0])
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
if (face=="back") {
translate([where[0]+right-left,where[1]+size[1]/2,where[2]+up-down])
rotate(90,[1,0,0]) // rotate around the x axis
rotate(180,[0,1,0]) // rotate around the y axis (z before rotation)
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
if (face=="left") {
translate([where[0]-size[0]/2,where[1]-right+left,where[2]+up-down ])
rotate(90,[1,0,0]) // rotate around the x axis
rotate(90,[0,-1,0]) // rotate around the y axis (z before rotation)
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
if (face=="right") {
translate([where[0]+size[0]/2,where[1]+right-left,where[2] +up-down])
rotate(90,[1,0,0]) // rotate around the x axis
rotate(90,[0,1,0]) // rotate around the y axis (z before rotation)
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
if (face=="top") {
translate([where[0]+right-left,where[1]+up-down,where[2]+size[2]/2 ])
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
if (face=="bottom") {
translate([where[0]+right-left,where[1]-up+down,where[2]-size[2]/2 ])
rotate(180,[1,0,0])
write(text,center=true,h=h,rotate=rotate,t=t,font=font);
}
}
module write(word){
echo (h);
echo (word);
echo ("There are " ,len(word) ," letters in this string");
// echo ("The second letter is ",word[1]);
// echo (str(word[0],"_"));
rotate(rotate,[0,0,-1]){
for (r = [0:len(word)]){ // count off each character
// if the letter is lower case, add an underscore to the end for file lookup
if ((word[r] == "a" ) || (word[r]== "b") || (word[r]== "c")
|| (word[r]== "d") || (word[r]== "e") || (word[r]== "f")
|| (word[r]== "g") || (word[r]== "h") || (word[r]== "i")
|| (word[r]== "j") || (word[r]== "k") || (word[r]== "l")
|| (word[r]== "m") || (word[r]== "n") || (word[r]== "o")
|| (word[r]== "p") || (word[r]== "q") || (word[r]== "r")
|| (word[r]== "s") || (word[r]== "t") || (word[r]== "u")
|| (word[r]== "v") || (word[r]== "w") || (word[r]== "x")
|| (word[r]== "y" )|| (word[r]== "z")){
if (center == true) {
translate([0,-h/2,0]){
scale([.125*h,.125*h,t]){
translate([ (-len(word)*5.5*space/2) + (r*5.5*space),0,0])
linear_extrude(height=1,convexity=10,center=true){
import(file = str(fontPath,font) ,layer=str(word[r],"_"));
}
}
}
}else{
translate([0,0,t/2]){
scale([.125*h,.125*h,t]){
translate([r*5.5*space,0,0])
linear_extrude(height=1,convexity=10,center=true){
import(file = str(fontPath,font) ,layer=str(word[r],"_"));
}
}
}
}
}else{
if (center == true) {
translate([0,-h/2,0]){
scale([.125*h,.125*h,t]){
translate([ (-len(word)*5.5*space/2) + (r*5.5*space),0,0])
linear_extrude(height=1,convexity=10,center=true){
import(file = str(fontPath,font) ,layer=str(word[r]));
}
}
}
}else{
translate([0,0,t/2]){
scale([.125*h,.125*h,t]){
translate([r*5.5*space,0,0])
linear_extrude(height=1,convexity=10,center=true){
import(file = str(fontPath,font) ,layer=str(word[r]));
}
}
}
}
}
}
}
}
/*writecylinder test
translate([0,0,0])
%cylinder(r=20,h=40,center=true);
color([1,0,0])
writecylinder("rotate=90",[0,0,0],20,40,center=true,down=0,rotate=90);
writecylinder("rotate = 30,east = 90",[0,0,0],20,40,center=true,down=0,rotate=30,east=90);
writecylinder("ccw = true",[0,0,0],20,40,center=true,down=0,face="top",ccw=true);
writecylinder("middle = 8",[0,0,0],20,40,h=3,center=true,down=0,face="top",middle=8);
writecylinder("face = top",[0,0,0],20,40,center=true,down=0,face="top");
writecylinder("east=90",[0,0,0],20,40,h=3,center=true,down=0,face="top",east=90);
writecylinder("west=90",[0,0,0],20,40,h=3,center=true,down=0,face="top",ccw=true,west=90);
writecylinder("face = bottom",[0,0,0],20,40,center=true,down=0,face="bottom");
*/
/*writesphere test
sphere(20);
color([1,0,0])
writesphere("Hello World",[0,0,0],20,t=1,h=6);
*/
/* writecube test
translate([30,30,30])
cube([10,15,30],center=true);
write("hello",center=true,rotate =30);
color([1,0,0])
writecube( "front",[30,30,30],[10,15,30],h=5,rotate=-90);
color([0,1,0])
writecube( "back",[30,30,30],size=[10,15,30],h=5,face="back",rotate=90,t=4);
color([0,0,1])
writecube( "left",[30,30,30],[10,15,30],h=5,face="left",up=5);
color([1,1,0])
writecube( "right",where=[30,30,30],size=[10,15,30],h=5,face="right",rotate=55);
color([1,0,1])
writecube( "top",where=[30,30,30],size=[10,15,30],h=5,face="top");
color([1,1,1])
writecube( "bttm",where=[30,30,30],size=[10,15,30],h=5,face="bottom",rotate=90);
*/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,80 @@
/* Derived by Carlosgs from:
* http://www.thingiverse.com/thing:12789
* An extruder gear set for the TechZone Huxley,
* featuring Herringbone teeth.
* You will have to recalibrate your E_STEPS_PER_MM in
* your firmware (ratio changing from original techzone
* lasercut gears).
* This use 2 modules from the MCAD library that you can
* get from https://github.com/elmom/MCAD.
*
* Part - the motor gear mount hub with set screw hole -
* derived from http://www.thingiverse.com/thing:3104
* (thanks GilesBathgate) which is under GPL CC license.
*
* Copyright (C) 2011 Guy 'DeuxVis' P.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* --
* DeuxVis - device@ymail.com */
include <MCAD/involute_gears.scad>
// Increase the resolution of default shapes
$fa = 5; // Minimum angle for fragments [degrees]
$fs = 0.5; // Minimum fragment size [mm]
/* Herringbone gear module, adapted from MCAD/involute_gears */
module herringbone_gear( teeth=12, height=10, circles=0, shaft=5 ) {
twist=0;//100;
pressure_angle=30;
diam = teeth*2;
truncation_length = 2.8;
truncation_height = height/2.5;
module myGear() {
difference() {
gear(
number_of_teeth=teeth,
circular_pitch=320,
pressure_angle=pressure_angle,
clearance = 0.2,
gear_thickness = height/2,
rim_thickness = height/2,
rim_width = 1,
hub_thickness = height/2,
hub_diameter=1,
bore_diameter=shaft,
circles=circles,
twist=twist/teeth
);
if (teeth>=10) {
mirror([0,0,1]) translate([0,0,-height/2-0.01]) {
difference() {
cylinder(r=diam/2, h=truncation_height);
translate([0,0,-0.01])
cylinder(r1=diam/2-truncation_length, r2=diam/2+1, h=truncation_height+0.02);
}
}
}
}
}
myGear();
mirror( [0,0,1] )
myGear();
}