Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
clothbot committed Sep 16, 2012
1 parent 2811f53 commit 7df8cd3
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
3 changes: 3 additions & 0 deletions upgrades/replicator/.gitignore
@@ -0,0 +1,3 @@
*.stl
*.gcode

64 changes: 64 additions & 0 deletions upgrades/replicator/vent_channels.scad
@@ -0,0 +1,64 @@
// Vent channels to pass air over stepper motors from electronics fan.

//render_part="channel_section_2d";
//render_part="channel_inner_mask_2d";
render_part="channel_section";

vent_xy=29.82; // From laser cut DXF source files
vent2stepper=186.5;

channel_th=2.0; // Channel wall thickness

module channel_section_2d(vent_xy=vent_xy,channel_th=channel_th) {
hull() {
translate([0,vent_xy-channel_th]) square([channel_th,2*channel_th],center=false);
translate([vent_xy-channel_th,0]) square([2*channel_th,channel_th],center=false);
}
hull() {
translate([0,vent_xy/2]) square([channel_th,channel_th],center=false);
translate([0,vent_xy]) square([channel_th,channel_th],center=false);
}
hull() {
translate([vent_xy/2,0]) square([channel_th,channel_th],center=false);
translate([vent_xy,0]) square([channel_th,channel_th],center=false);
}
}

if(render_part=="channel_section_2d") {
echo("Rendering channel_section_2d()...");
channel_section_2d();
}

module channel_inner_mask_2d(vent_xy=vent_xy,channel_th=channel_th) {
polygon(points=[ [0,0],[0,vent_xy],[vent_xy,0] ],paths=[[0,1,2]]);
}

if(render_part=="channel_inner_mask_2d") {
echo("Rendering channel_inner_mask_2d()...");
channel_inner_mask_2d();
}

module channel_section(h=60.0,vent_xy=vent_xy,channel_th=channel_th) {
difference() {
union() {
linear_extrude(height=h) render() channel_section_2d(vent_xy=vent_xy,channel_th=channel_th);
translate([0,0,h-2*channel_th]) linear_extrude(height=3*channel_th) render() intersection() {
channel_section_2d(vent_xy=vent_xy,channel_th=2*channel_th);
channel_inner_mask_2d(vent_xy=vent_xy,channel_th=channel_th);
translate([channel_th,channel_th]) channel_inner_mask_2d(vent_xy=vent_xy-channel_th,channel_th=channel_th);
}
}
translate([0,0,-channel_th]) linear_extrude(height=2*channel_th) render() intersection() {
channel_section_2d(vent_xy=vent_xy,channel_th=2*channel_th);
channel_inner_mask_2d(vent_xy=vent_xy,channel_th=channel_th);
translate([channel_th,channel_th]) channel_inner_mask_2d(vent_xy=vent_xy-channel_th,channel_th=channel_th);
}
}
}

if(render_part=="channel_section") {
echo("Rendering channel_section()...");
for(i=[0:3]) rotate([0,0,i*360/4]) translate([channel_th,channel_th,0])
channel_section();
}

0 comments on commit 7df8cd3

Please sign in to comment.