1. refactor module rod

2. move Z threaded rod from X_carriage.scad to Z_carriage.scad because it is stick to Z_carriage.
pull/9/head
Glen Chung 2013-10-22 00:40:47 +08:00
parent 546e22fdf0
commit 65eca6e2f2
4 changed files with 28 additions and 20 deletions

View File

@ -11,6 +11,7 @@ use <../Y_axis/linear_bearing_holder.scad>
use <../Y_axis/Y_nut_holder.scad> use <../Y_axis/Y_nut_holder.scad>
use <../XZ_axis/X_carriage.scad> use <../XZ_axis/X_carriage.scad>
use <../XZ_axis/Z_carriage.scad> use <../XZ_axis/Z_carriage.scad>
use <../libs/rod.scad>
X_axis_sep = 210; X_axis_sep = 210;
Y_axis_sep = 210; Y_axis_sep = 210;
@ -38,6 +39,7 @@ X_Final_Smooth_Rod_Length = X_axis_sep+46;
Y_Final_Threaded_Rod_Length = Y_threaded_rod_length+38; Y_Final_Threaded_Rod_Length = Y_threaded_rod_length+38;
Y_Final_Smooth_Rod_Length = Y_axis_sep+8; Y_Final_Smooth_Rod_Length = Y_axis_sep+8;
Y_threaded_rod_offset = 8; Y_threaded_rod_offset = 8;
Z_Final_Threaded_Rod_Length = 120;
X_Wood_Base = X_axis_sep+100; X_Wood_Base = X_axis_sep+100;
Y_Wood_Base = Y_axis_sep+30; Y_Wood_Base = Y_axis_sep+30;
@ -50,7 +52,7 @@ Z_PCB_BOARD = 1.5;
//Travel (164 x 101 x 25) //Travel (164 x 101 x 25)
X_Travel = 0; //0~164 X_Travel = 0; //0~164
Y_Travel = 0; //0~101 Y_Travel = 0; //0~101
Z_Travel = 0; //0~25 Z_Travel = 30; //0~30
//To display steppers, bearings, washers, nuts, screws, micro switchs, etc. //To display steppers, bearings, washers, nuts, screws, micro switchs, etc.
Display_Extra_Parts = true; Display_Extra_Parts = true;
@ -164,7 +166,7 @@ module X_carriage() {
module Z_carriage_piece() { module Z_carriage_piece() {
translate([0,0,33+Z_Travel]) translate([0,0,33+Z_Travel])
rotate([0,0,90]) rotate([0,0,90])
Z_carriage_assembled(with_extra_parts=Display_Extra_Parts, exploded=Exploded_Drawing); Z_carriage_assembled(z_thread_rod_length=Z_Final_Threaded_Rod_Length, with_extra_parts=Display_Extra_Parts, exploded=Exploded_Drawing);
} }
module cnc(show_printbed = 1) { module cnc(show_printbed = 1) {
@ -229,13 +231,6 @@ module cnc_workbed_template() {
} }
} }
module rod(len=100) {
color([0.8,0.8,0.8])
rotate([90,0,0])
cylinder(r=8/2,h=len,center=true,$fn=30);
}
module cnc_assembled(Y_offset=0,X_offset=0,Z_offset=0) { module cnc_assembled(Y_offset=0,X_offset=0,Z_offset=0) {
translate([-X_axis_sep/2,-Y_axis_sep/2]) translate([-X_axis_sep/2,-Y_axis_sep/2])
cnc(); cnc();
@ -247,7 +242,7 @@ module cnc_assembled(Y_offset=0,X_offset=0,Z_offset=0) {
// --- Y threaded rod --- // --- Y threaded rod ---
translate([0,6+Y_threaded_rod_offset/2,Y_threaded_rod_height-Y_rod_height]) translate([0,6+Y_threaded_rod_offset/2,Y_threaded_rod_height-Y_rod_height])
color([0.5,0.5,0.5]) rod(Y_Final_Threaded_Rod_Length); rod(Y_Final_Threaded_Rod_Length, threaded=true);
// --- Y smooth rods --- // --- Y smooth rods ---
translate([X_axis_sep/2,0,0]) translate([X_axis_sep/2,0,0])
@ -265,7 +260,7 @@ module cnc_assembled(Y_offset=0,X_offset=0,Z_offset=0) {
Z_carriage_piece(); Z_carriage_piece();
} }
rotate([0,0,90]) rotate([0,0,90])
color([0.5,0.5,0.5]) translate([0,6,0]) rod(X_Final_Threaded_Rod_Length); translate([0,6,0]) rod(X_Final_Threaded_Rod_Length, threaded=true);
translate([0,0,X_rod_sep_real]) translate([0,0,X_rod_sep_real])
rotate([0,0,90]) rotate([0,0,90])
rod(X_Final_Smooth_Rod_Length); rod(X_Final_Smooth_Rod_Length);
@ -292,3 +287,4 @@ echo("Non-Plastic Parts: 2 x Smooth rod for X axis, M8 x ", X_Final_Smooth_Rod_L
echo("Non-Plastic Parts: 1 x Threaded rod for X axis, M8 x ", X_Final_Threaded_Rod_Length); echo("Non-Plastic Parts: 1 x Threaded rod for X axis, M8 x ", X_Final_Threaded_Rod_Length);
echo("Non-Plastic Parts: 2 x Smooth rod for Y axis, M8 x ", Y_Final_Smooth_Rod_Length); echo("Non-Plastic Parts: 2 x Smooth rod for Y axis, M8 x ", Y_Final_Smooth_Rod_Length);
echo("Non-Plastic Parts: 1 x Threaded rod for Y axis, M8 x ", Y_Final_Threaded_Rod_Length); echo("Non-Plastic Parts: 1 x Threaded rod for Y axis, M8 x ", Y_Final_Threaded_Rod_Length);
echo("Non-Plastic Parts: 1 x Threaded rod for Z axis, M8 x ", Z_Final_Threaded_Rod_Length);

View File

@ -6,6 +6,7 @@ use <../libs/obiscad/bcube.scad>
use <../libs/obiscad/bevel.scad> use <../libs/obiscad/bevel.scad>
use <../libs/build_plate.scad> use <../libs/build_plate.scad>
use <../libs/teardrop.scad> use <../libs/teardrop.scad>
use <../libs/rod.scad>
include <./lm8uu_holder.scad> include <./lm8uu_holder.scad>
@ -44,11 +45,6 @@ Z_threaded_rod_len = 120;
lbearing_holder_length = Z_smooth_rods_sep+M8_rod_diam+5; lbearing_holder_length = Z_smooth_rods_sep+M8_rod_diam+5;
module rod(len=100) {
color([0.8,0.8,0.8])
rotate([90,0,0])
cylinder(r=8/2,h=len,center=true,$fn=30);
}
module rodHole(len=100,radius=M8_rod_hole_diam/2, truncateMM=1) { module rodHole(len=100,radius=M8_rod_hole_diam/2, truncateMM=1) {
color([0.8,0.8,0.8]) color([0.8,0.8,0.8])
@ -182,7 +178,7 @@ module X_carriage_assembled(show_printbed = 0, show_Xrods = 0, show_Zrods = 0) {
if(show_Xrods){ if(show_Xrods){
// ---- Rods (for reference) ---- // ---- Rods (for reference) ----
translate([-X_rod_sep_real/2,0,0]) { translate([-X_rod_sep_real/2,0,0]) {
color([0.5,0.5,0.5]) rod(len=100); rod(len=100, threaded=true);
} }
translate([-X_rod_sep_real/2,0,X_rod_sep_real]) { translate([-X_rod_sep_real/2,0,X_rod_sep_real]) {
rod(len=100); rod(len=100);
@ -194,8 +190,6 @@ module X_carriage_assembled(show_printbed = 0, show_Xrods = 0, show_Zrods = 0) {
if(show_Zrods) if(show_Zrods)
translate([0,0,0]) translate([0,0,0])
rotate([90,0,0]) { rotate([90,0,0]) {
translate([0,Z_threaded_rod_len/2-10,0])
color([0.5,0.5,0.5]) rod(len=Z_threaded_rod_len);
translate([0,Z_smooth_rods_len/2-5,Z_smooth_rods_sep/2]) translate([0,Z_smooth_rods_len/2-5,Z_smooth_rods_sep/2])
rod(len=Z_smooth_rods_len); rod(len=Z_smooth_rods_len);
translate([0,Z_smooth_rods_len/2-5,-Z_smooth_rods_sep/2]) translate([0,Z_smooth_rods_len/2-5,-Z_smooth_rods_sep/2])

View File

@ -16,6 +16,7 @@ use <../libs/obiscad/bcube.scad>
use <../libs/build_plate.scad> use <../libs/build_plate.scad>
use <../libs/Write/Write.scad> use <../libs/Write/Write.scad>
use <../libs/linear_bearing.scad> use <../libs/linear_bearing.scad>
use <../libs/rod.scad>
use <motor_gear.scad> use <motor_gear.scad>
use <rod_gear.scad> use <rod_gear.scad>
@ -350,10 +351,14 @@ module Z_carriage_extras(top_part=true, exploded_distance=0) {
} }
} }
module Z_carriage_assembled(with_extra_parts=false, exploded=false) { module Z_carriage_assembled(z_thread_rod_length=120, with_extra_parts=false, exploded=false) {
Z_carriage(showSpindle=true,top_part=false,with_extra_parts=with_extra_parts, exploded=exploded); Z_carriage(showSpindle=true,top_part=false,with_extra_parts=with_extra_parts, exploded=exploded);
translate([0,0,spindle_holder_distance]) rotate([180,0,0]) Z_carriage(showSpindle=false,top_part=true, translate([0,0,spindle_holder_distance]) rotate([180,0,0]) Z_carriage(showSpindle=false,top_part=true,
with_extra_parts=with_extra_parts, exploded=exploded); with_extra_parts=with_extra_parts, exploded=exploded);
if(z_thread_rod_length)
translate([0,0,-z_thread_rod_length/2+spindle_holder_distance]) rotate([90,0,0])
rod(len=z_thread_rod_length, threaded=true);
} }

View File

@ -0,0 +1,13 @@
// Cyclone PCB Factory: a 3D printable CNC machine for PCB manufacture
// Created by Carlosgs (http://carlosgs.es)
// License: Attribution - Share Alike - Creative Commons (http://creativecommons.org/licenses/by-sa/3.0/)
module rod(len=100, threaded=false, dia=8) {
rotate([90,0,0]) {
if(threaded)
color([0.5,0.5,0.5]) cylinder(r=dia/2,h=len,center=true,$fn=30);
else
color([0.8,0.8,0.8]) cylinder(r=dia/2,h=len,center=true,$fn=30);
}
}