Updated for bottom cablechain.

This commit is contained in:
Revar Desmera
2016-06-18 16:49:54 -07:00
parent d90594fbe8
commit e1b2e221ae
11 changed files with 6135 additions and 3907 deletions

View File

@@ -127,7 +127,7 @@ module nema17_stepper(h=34, shaft=5, shaft_len=20)
difference() {
color([0.4, 0.4, 0.4]) {
translate([0, 0, -h/2]) {
down(h/2) {
rrect(size=[motor_width, motor_width, h], r=2, center=true);
}
}
@@ -139,6 +139,18 @@ module nema17_stepper(h=34, shaft=5, shaft_len=20)
color([0.4, 0.4, 0.4])
up(plinth_height/2)
cylinder(h=plinth_height, r=plinth_diam/2, center=true);
color([0.9, 0.9, 0.9]) {
down(h-motor_width/12) {
fwd(motor_width/2+motor_width/24/2-0.1) {
difference() {
cube(size=[motor_width/8, motor_width/24, motor_width/8], center=true);
xrot(90) {
cylinder(d=motor_width/8-2, h=motor_width/6, center=true, $fn=12);
}
}
}
}
}
color("silver") {
difference() {
cylinder(h=shaft_len, r=shaft/2, $fn=max(12,segs(shaft/2)));

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,8 @@ module cable_chain_barrel()
cube(size=[w, l-20, h], center=true);
translate([0, 0, h/2])
chamfcube(size=[w-4*cable_chain_wall, l, h-cable_chain_wall], chamfer=2, center=true);
zrot(40)
cube(size=[2, (l-15)/cos(40), 2*cable_chain_wall], center=true);
}
}
}

View File

@@ -1,7 +1,9 @@
include <config.scad>
use <GDMUtils.scad>
use <cable_chain.scad>
use <wiring.scad>
pi = 3.1415926535;
module cable_chain_link()
{
@@ -15,6 +17,103 @@ module cable_chain_link()
//!cable_chain_link();
// Only works in XZ plane, currently.
module cable_chain_assembly(topend, botend, vect, travel, off, wires=0)
{
vert = abs(topend[2] - botend[2]);
l1 = cable_chain_length/2 - cable_chain_height/3;
l2 = cable_chain_length/2 - cable_chain_pivot/2 - 2.75 + 0.1;
l = l1 + l2;
basex = topend[0] - botend[0];
botlen = (travel/2 + off - basex)/2;
toplen = travel/2 - botlen;
links = ceil(travel/2/l) + floor(vert*pi/2/l);
botlinks = ceil(botlen/l);
toplinks = ceil(toplen/l);
curllinks = links - botlinks - toplinks;
aveang = 2*asin((l/2)/(vert/2));
botang = (toplen-(toplinks*l));
topang = aveang - botang;
vect = vect/norm(vect);
linkvect = l*vect;
topbase = topend + vect*off;
if (botlinks > 0) {
for (i = [0:botlinks-1]) {
translate(botend + (linkvect*(i+0.5))) {
zrot(90) {
down(cable_chain_height / 2) {
cable_chain_link();
}
if (wires > 0) {
wiring([
[0, -l1-1, 0],
[0, 0, 0],
[0, l2+1, 0],
], wires, fillet=1);
}
}
}
}
}
if (toplinks > 0) {
for (i = [0:toplinks-1]) {
translate(topbase + (linkvect * (i + 0.5))) {
zrot(90) {
xrot(180) {
down(cable_chain_height / 2) {
cable_chain_link();
}
if (wires > 0) {
wiring([
[0, -l1-1, 0],
[0, 0, 0],
[0, l2+1, 0],
], wires, fillet=1);
}
}
}
}
}
}
bottip = botend + (linkvect * botlinks);
toptip = topbase + (linkvect * toplinks);
cent = (toptip + bottip) / 2;
translate(cent) {
delta = toptip - bottip;
rad = distance(bottip, toptip) / 2;
aveang = 2 * asin(l / (2 * rad));
centang = (180-(aveang*curllinks))/2;
offang = 90-atan2(delta[2], delta[0]);
right(rad*sin(centang)) {
yrot(centang+offang) {
for (i = [0 : curllinks-1]) {
ang = 270 - i * aveang;
translate(rad * [cos(ang), 0, sin(ang)]) {
zrot(90) {
xrot((i+0.5) * aveang) {
back(l2) {
down(cable_chain_height / 2) {
cable_chain_link();
}
if (wires > 0) {
wiring([
[0, -l1-1, 0],
[0, 0, 0],
[0, l2+1, 0],
], wires, fillet=1);
}
}
}
}
}
}
}
}
}
}
//!cable_chain_assembly([0,0,75], [0,0,0], [-1,0,0], 200, 100*sin(360*$t));
module cable_chain_link_parts() { // make me
xspread(cable_chain_width+2, n=4) {
yspread(cable_chain_length+2, n=4) {
@@ -28,4 +127,3 @@ cable_chain_link_parts();
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap

View File

@@ -11,18 +11,15 @@ $fs = 2;
module cable_chain_joiner_mount()
{
joiner_length=15;
color("SpringGreen")
color([0.5, 0.5, 1.0])
prerender(convexity=10)
union () {
left(joiner_length+cable_chain_width/2-0.05) {
fwd(2) {
cable_chain_mount1();
fwd(2) cable_chain_mount1();
scale([1, (cable_chain_length-20+4)/(cable_chain_length-20), 1]) {
cable_chain_barrel();
}
back(2) {
cable_chain_barrel();
cable_chain_mount2();
}
back(2) cable_chain_mount2();
}
up(rail_height/4) {
chamfer(chamfer=3, size=[joiner_length*2, joiner_width, rail_height/2], edges=[[1,1,0,0], [1,1,0,0], [0,0,0,0]]) {
@@ -39,22 +36,24 @@ module cable_chain_joiner_mount()
module cable_chain_joiner_vertical_mount()
{
joiner_length=10;
color("SpringGreen")
color([0.5, 0.5, 1.0])
prerender(convexity=10)
union () {
left(joiner_length+cable_chain_width/2+5-0.05) {
up(3) {
up(3+2) {
fwd(cable_chain_height/2) {
xrot(-90) {
cable_chain_mount1();
cable_chain_barrel();
fwd(4) cable_chain_mount1();
scale([1, (cable_chain_length-20+4)/(cable_chain_length-20), 1]) {
cable_chain_barrel();
}
}
}
}
}
up(6/2) {
up(10/2) {
left(joiner_length+5/2) {
cube([5+1, joiner_width, 6], center=true);
cube([5+1, joiner_width, 10], center=true);
}
}
up(rail_height/4) {
@@ -72,7 +71,7 @@ module cable_chain_joiner_vertical_mount()
module cable_chain_xy_joiner_mount()
{
joiner_length=10;
color("SpringGreen")
color([0.5, 0.5, 1.0])
prerender(convexity=10)
union () {
translate([-(joiner_length+cable_chain_width/2-3), -joiner_length, 0]) {
@@ -109,7 +108,7 @@ module cable_chain_xy_joiner_mount()
module cable_chain_x_sled_mount()
{
joiner_length=10;
color("SpringGreen")
color([1.0, 1.0, 1.0])
prerender(convexity=10)
union () {
translate([-(joiner_length+cable_chain_width/2-3), -joiner_length, 0]) {

View File

@@ -3,6 +3,7 @@ $do_prerender=true;
include <config.scad>
include <GDMUtils.scad>
use <NEMA.scad>
use <wiring.scad>
use <acme_screw.scad>
use <vitamins.scad>
@@ -83,10 +84,10 @@ module motor_mount_assembly(explode=0, arrows=false)
//!motor_mount_assembly(explode=100, arrows=true);
module xy_motor_segment_assembly(explode=0, arrows=false)
module y_motor_segment_assembly(explode=0, arrows=false)
{
// view: [0, 0, 135] [72, 0, 23] 900
// desc: Seat the stepper motor with drive gear in the X/Y motor rail segment. Clamp it into place with a motor mount plate with micro-switch. Repeat this to make a second XY motor segment assembly. On one, route the wiring out a side wiring access hole opposite the limit switch, and on the other, route it out one end.
// desc: Seat the stepper motor with drive gear in the X/Y motor rail segment. Clamp it into place with a motor mount plate with micro-switch. Route the wiring out a side wiring access hole opposite the limit switch.
motor_width = nema_motor_width(17)+printer_slop*2;
rail_xy_motor_segment();
@@ -95,9 +96,34 @@ module xy_motor_segment_assembly(explode=0, arrows=false)
up(motor_top_z) {
up(explode*2.2-motor_length/2) {
motor_mount_assembly();
up(3) {
off = (motor_mount_spacing+joiner_width+endstop_thick)/2+endstop_standoff;
right(off) {
wiring([
[0, -10, 10],
[0, -10, -12],
[0, -motor_rail_length/3.5, -12],
[-rail_width/1.5-off, -motor_rail_length/3.5, -12],
[-rail_width/1.5-off, -motor_rail_length/2-25, -12],
[-rail_width/1.5-off-10, -motor_rail_length/2-25, -19],
[-rail_width/1.5-off-28, -motor_rail_length/2-25, -19],
], 2, wirenum=4);
}
}
}
up(explode*1.1) {
xy_motor_assembly();
down(motor_length-3) {
wiring([
[0, 0, 0],
[0, -motor_rail_length/3.5-2, 0],
[-10, -motor_rail_length/3.5-2, 5],
[-rail_width/1.5, -motor_rail_length/3.5-2, 5],
[-rail_width/1.5, -motor_rail_length/2-23, 5],
[-rail_width/1.5-10, -motor_rail_length/2-23, 0],
[-rail_width/1.5-30, -motor_rail_length/2-23, 0],
], 4);
}
}
}
@@ -111,8 +137,8 @@ module xy_motor_segment_assembly(explode=0, arrows=false)
}
}
}
//!xy_motor_segment_assembly(explode=100, arrows=true);
//!xy_motor_segment_assembly();
//!y_motor_segment_assembly(explode=100, arrows=true);
//!y_motor_segment_assembly();
module y_axis_assembly_1(slidepos=0, explode=0, arrows=false)
@@ -121,7 +147,7 @@ module y_axis_assembly_1(slidepos=0, explode=0, arrows=false)
// desc: Join a rail segment to each end of another motor rail assembly.
platform_vert_off = rail_height+groove_height/2;
xy_motor_segment_assembly();
y_motor_segment_assembly();
zrot(90) {
zring(r=(motor_rail_length+rail_length+2*explode)/2, n=2) {
zrot(90) rail_segment();
@@ -235,6 +261,7 @@ module y_axis_assembly_5(slidepos=0, explode=0, arrows=false)
}
}
//!y_axis_assembly_5(slidepos=0, explode=100, arrows=true);
//!y_axis_assembly_5();
module y_axis_assembly_6(slidepos=0, explode=0, arrows=false)
@@ -257,7 +284,8 @@ module y_axis_assembly_6(slidepos=0, explode=0, arrows=false)
up(0) children();
}
}
//!y_axis_assembly_6(slidepos=0, explode=0, arrows=true);
//!y_axis_assembly_6(slidepos=0, explode=100, arrows=true);
//!y_axis_assembly_6();
module y_axis_assembly_7(slidepos=0, explode=0, arrows=false)
@@ -285,20 +313,81 @@ module y_axis_assembly_7(slidepos=0, explode=0, arrows=false)
}
}
//!y_axis_assembly_7(explode=100, arrows=true);
//!y_axis_assembly_7();
//!y_axis_assembly_7(slidepos=90) y_sled_assembly();
module x_motor_segment_assembly(explode=0, arrows=false)
{
// view: [0, 0, 135] [55, 0, 340] 900
// desc: Seat the stepper motor with drive gear in the X/Y motor rail segment. Clamp it into place with a motor mount plate with micro-switch. Route the wiring out one end.
motor_width = nema_motor_width(17)+printer_slop*2;
rail_xy_motor_segment();
// Stepper Motor
up(motor_top_z) {
up(explode*2.2-motor_length/2) {
motor_mount_assembly();
up(3) {
off=(motor_mount_spacing+joiner_width+endstop_thick)/2+endstop_standoff;
right(off) {
wiring([
[0, -10, 10],
[0, -10, -12],
[0, -motor_rail_length/4, -12],
[-off, -motor_rail_length/4, -12],
[-off, -motor_rail_length/2-20, -12],
], 2, wirenum=4);
}
}
}
up(explode*1.1) {
xy_motor_assembly();
down(motor_length-3) {
wiring([
[0, 0, 0],
[0, -motor_rail_length/3.5, 0],
[0, -motor_rail_length/2+20, 5],
[0, -motor_rail_length/2-20, 5],
], 4);
}
}
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height+groove_height+explode/8) {
yrot(-90) arrow(size=explode/3);
up(motor_length+explode) {
yrot(-90) arrow(size=explode/3);
}
}
}
}
//!x_motor_segment_assembly(explode=100, arrows=true);
//!x_motor_segment_assembly();
module x_axis_assembly_1(slidepos=0, explode=0, arrows=false)
{
// view: [-5, 65, 85] [55, 0, 25] 1750
// desc: Join a rail segment to each end of a motor rail assembly, to make the X axis slider. Route the wiring to one end of the slider assembly.
platform_vert_off = rail_height+groove_height/2;
zrot(90) xy_motor_segment_assembly();
zrot(-90) x_motor_segment_assembly();
zring(r=(motor_rail_length+rail_length+2*explode)/2, n=2) {
zrot(90) rail_segment();
}
up(12) {
wiring([
[-motor_rail_length/2, 0, 0],
[-(rail_length+explode), 0, 0],
[-(rail_length+explode+motor_rail_length/2)-30, 0, 0],
], 6);
}
// Construction arrows.
if(arrows && explode>10) {
up(rail_height/2+groove_height/2) {
@@ -326,6 +415,7 @@ module x_axis_assembly_1(slidepos=0, explode=0, arrows=false)
}
}
//!x_axis_assembly_1(slidepos=100, explode=100, arrows=true);
//!x_axis_assembly_1(slidepos=0) {sphere(1); sphere(1); sphere(1);}
//!x_axis_assembly_1(slidepos=0) {sphere(1); sphere(1); x_sled_assembly();}
@@ -351,24 +441,54 @@ module x_axis_assembly_3(explode=0, arrows=false)
{
// view: [-55, 60, 65] [55, 0, 55] 1500
// desc: Join an X sled endcap assembly to one end of the X sled central assembly.
x_axis_assembly_2();
up(groove_height/2+rail_offset) {
left(platform_length+0.5+explode) {
left(explode/2) {
zrot(-90) xy_joiner();
right(explode+0.3) {
fwd((platform_width-joiner_width)/2) {
zrot(90) {
//cable_chain_xy_joiner_mount();
cable_chain_x_sled_mount();
}
}
}
}
}
// Construction arrows.
if(arrows && explode>20) {
left(platform_length+explode*0.5) {
up(groove_height/2+rail_offset+rail_height/4) {
fwd(platform_width/2) {
arrow(size=explode/3);
}
}
}
}
//!x_axis_assembly_3(explode=100, arrows=true);
//!x_axis_assembly_3();
module x_axis_assembly_4(explode=0, arrows=false)
{
// view: [-55, 60, 65] [55, 0, 55] 1500
// desc: Join an X sled endcap assembly to one end of the X sled central assembly.
x_axis_assembly_2();
left(platform_length+0.3+explode) {
x_axis_assembly_3();
}
// Construction arrows.
if(arrows && explode>20) {
left(platform_length+explode*0.3) {
zrot(180) arrow(size=explode/3);
}
}
}
//!x_axis_assembly_3(explode=0, arrows=true);
//!x_axis_assembly_4(explode=100, arrows=true);
//!x_axis_assembly_4();
module x_axis_assembly_4(slidepos=0, explode=0, arrows=false)
module x_axis_assembly_5(slidepos=0, explode=0, arrows=false)
{
// view: [-155, -50, 25] [55, 0, 55] 2500
// desc: Slide the X sled partial assembly onto the X axis rails assembly, so that it is centered.
@@ -376,7 +496,7 @@ module x_axis_assembly_4(slidepos=0, explode=0, arrows=false)
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
left(explode*4) {
x_axis_assembly_3();
x_axis_assembly_4();
if ($children>2) children(2); else nil();
// Construction arrows.
@@ -388,14 +508,15 @@ module x_axis_assembly_4(slidepos=0, explode=0, arrows=false)
}
}
}
//!x_axis_assembly_4(slidepos=0, explode=100, arrows=true);
//!x_axis_assembly_5(slidepos=0, explode=100, arrows=true);
//!x_axis_assembly_5();
module x_axis_assembly_5(xslidepos=0, yslidepos=0, explode=0, arrows=false)
module x_axis_assembly_6(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [150, 0, 110] [50, 0, 330] 2500
// desc: Connect the Y axis assembly to the XY joiner on the X axis partial assembly. Route the Y axis wiring through the front hole in the XY joiner.
x_axis_assembly_4(slidepos=xslidepos) {
x_axis_assembly_5(slidepos=xslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
right(explode*4) {
@@ -415,14 +536,15 @@ module x_axis_assembly_5(xslidepos=0, yslidepos=0, explode=0, arrows=false)
}
}
}
//!x_axis_assembly_5(explode=100, arrows=true);
//!x_axis_assembly_6(explode=100, arrows=true);
//!x_axis_assembly_6();
module x_axis_assembly_6(xslidepos=0, yslidepos=0, explode=0, arrows=false)
module x_axis_assembly_7(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [85, 70, 40] [55, 0, 25] 2500
// desc: Join the other X sled endcap assembly to the end of the X sled assembly, fixing the Y sled assembly in place.
x_axis_assembly_5(xslidepos=xslidepos, yslidepos=yslidepos) {
x_axis_assembly_6(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
right(platform_length+0.5+explode*3) {
@@ -440,7 +562,80 @@ module x_axis_assembly_6(xslidepos=0, yslidepos=0, explode=0, arrows=false)
if ($children>2) children(2);
}
}
//!x_axis_assembly_6(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_7(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_7(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
module x_axis_assembly_8(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [-10, 0, 75] [55, 0, 325] 1100
// desc: Attach the cable chain joiner mount to the X motor segment, on the same side as the X sled cable chain joiner and Y axis wiring.
x_axis_assembly_7(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
if ($children>2) children(2);
}
fwd(rail_width/2+2+explode/2) {
left(side_mount_spacing/2) {
// Construction arrows.
if(arrows && explode>75) {
up(rail_height/2/2) {
zrot(-90) arrow(size=explode/3);
}
}
fwd(explode/2) {
zrot(90) cable_chain_joiner_mount();
}
}
}
}
//!x_axis_assembly_8(xslidepos=0, yslidepos=0, explode=100, arrows=true);
//!x_axis_assembly_8(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
module x_axis_assembly_9(xslidepos=0, yslidepos=0, explode=0, arrows=false)
{
// view: [-88, 0, 75] [58, 0, 350] 1100
// desc: Attach the cable-chain assembly (with 13 or 14 links) to the cable chain mounts on the X axis assembly, making sure to feed the Y-axis wiring through the cable chain. Route the wiring in through the wiring access hole beside the cable chain mount, then out through the end of the X axis assembly.
x_axis_assembly_8(xslidepos=xslidepos, yslidepos=yslidepos) {
if ($children>0) children(0); else nil();
if ($children>1) children(1); else nil();
if ($children>2) children(2);
}
vert_off = rail_height + groove_height + rail_offset + cable_chain_height/2;
left(explode*1.5) {
fwd(platform_width/2+cable_chain_width/2+2) {
// Construction arrows.
if(arrows && explode>75) {
left(platform_length) {
up(vert_off) zrot(180) arrow(size=explode/3);
}
left(side_mount_spacing/2) {
up(cable_chain_height/2) zrot(180) arrow(size=explode/3);
}
}
left(explode/2) {
cable_chain_assembly(
[-platform_length-1, 0, vert_off],
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3, 0, cable_chain_height/2],
[-1,0,0],
platform_length*2,
xslidepos,
wires=6
);
}
}
}
wiring([
[-side_mount_spacing/2-cable_chain_length/2+cable_chain_height/3, -(platform_width/2+cable_chain_width/2+2), cable_chain_height/2],
[-motor_rail_length/3+10, -(platform_width/2+cable_chain_width/2+2), cable_chain_height/2],
[-motor_rail_length/3+5, -(rail_width/2+joiner_width/2), rail_thick+5],
[-motor_rail_length/3+5, -rail_width/3, rail_thick+5],
[-rail_length-motor_rail_length/2-30, -rail_width/3, rail_thick+5],
], 6);
}
//!x_axis_assembly_9(xslidepos=0, yslidepos=0, explode=100, arrows=true);
!x_axis_assembly_9(xslidepos=platform_length*sin($t*360), yslidepos=0, explode=0, arrows=false);
module z_tower_assembly_1(slidepos=0, explode=0, arrows=false)
@@ -981,7 +1176,7 @@ module final_assembly_1(xslidepos=0, yslidepos=0, zslidepos=0, explode=0, arrows
{
// view: [0, 0, 240] [70, 0, 30] 2800
// desc: Attach the two Z tower assemblies to either end of the XY axes assembly.
x_axis_assembly_6(xslidepos=xslidepos, yslidepos=yslidepos) {
x_axis_assembly_9(xslidepos=xslidepos, yslidepos=yslidepos) {
left(explode*2) {
z_tower_assembly_7(slidepos=zslidepos) {
if ($children > 0) children(0);
@@ -1156,7 +1351,6 @@ module final_assembly_6(explode=0, arrows=false)
right(rail_height/2) spool_holder();
}
//cable_chain_xy_joiner_mount();
}
//!final_assembly_6(explode=100, arrows=true);

View File

@@ -3,6 +3,57 @@
import re
import sys
html_header_string = """\
<html>
<head>
<title>Snappy Assembly</title>
<style>
BODY {
margin-bottom: 200px;
}
TABLE TD {
vertical-align: middle;
}
H2 {
margin-bottom: 5px;
margin-top: 24px;
font-size: 20pt;
}
LI.section {
font-size: 20pt;
font-weight: bold;
}
H3 {
margin-left: -15px;
margin-bottom: 5px;
margin-top: 18px;
font-size: 16pt;
}
LI.step {
padding-left: 15px;
margin-left: 0;
font-size: 16pt;
font-weight: bold;
list-style-type: none;
}
DIV.desc {
margin-bottom: 15px;
font-size: 12pt;
font-weight: normal;
}
OL {
margin-left: 30px;
}
UL {
padding-left: 5px;
}
</style>
</head>
<body>
<h1>Snappy RepRap Assembly Instructions</h1>
<ol>
"""
class GenAssemblyIndex(object):
indexfile = "docs/assembly/index.html"
@@ -13,56 +64,7 @@ class GenAssemblyIndex(object):
def write_index(self):
with open(self.indexfile, "w") as f:
f.write("""\
<html>
<head>
<title>Snappy Assembly</title>
<style>
BODY {
margin-bottom: 200px;
}
TABLE TD {
vertical-align: middle;
}
H2 {
margin-bottom: 5px;
margin-top: 24px;
font-size: 20pt;
}
LI.section {
font-size: 20pt;
font-weight: bold;
}
H3 {
margin-left: -15px;
margin-bottom: 5px;
margin-top: 18px;
font-size: 16pt;
}
LI.step {
padding-left: 15px;
margin-left: 0;
font-size: 16pt;
font-weight: bold;
list-style-type: none;
}
DIV.desc {
margin-bottom: 15px;
font-size: 12pt;
font-weight: normal;
}
OL {
margin-left: 30px;
}
UL {
padding-left: 5px;
}
</style>
</head>
<body>
<h1>Snappy RepRap Assembly Instructions</h1>
<ol>
""")
f.write(html_header_string)
for mod_eng in self.modules:
f.write('<li class="section">')
@@ -81,7 +83,9 @@ UL {
'<div class="desc">{desc}</div>\n'
'<table>'
'<tr>'
'<td class="befor"><img src="{module}_before.png"></td>'
'<td class="befor">'
'<img src="{module}_before.png">'
'</td>'
'<td class="arrow"><img src="arrow.png"></td>'
'<td class="after"><img src="{module}_after.png"></td>'
'</tr>'

View File

@@ -458,7 +458,7 @@ class StlData(object):
def main():
parser = argparse.ArgumentParser(prog='myprogram')
parser = argparse.ArgumentParser(prog='stl_normalize')
parser.add_argument('-v', '--verbose',
help='Show verbose output.',
action="store_true")

2
wiki

Submodule wiki updated: 2a4fe2366b...2c4770fd2b

71
wiring.scad Normal file
View File

@@ -0,0 +1,71 @@
use <GDMUtils.scad>
function normalize(v) = v/norm(v);
function fillet3pts(p0, p1, p2, r) = let(
v0 = normalize(p0-p1),
v1 = normalize(p2-p1),
a = vector3d_angle(v0,v1),
tr = r/tan(a/2),
tp0 = p1+v0*tr,
tp1 = p1+v1*tr,
w=-2.7e-5*a*a + 8.5e-3*a - 3e-3,
cp0 = tp0+w*(p1-tp0),
cp1 = tp1+w*(p1-tp1)
) [tp0, tp0, cp0, cp1, tp1, tp1];
// Must be passed at least 3 points.
function fillet_path(pts, fillet) = concat(
[pts[0], pts[0]],
[
for (p = [1 : len(pts)-2])
for (pt = fillet3pts(pts[p-1], pts[p], pts[p+1], fillet))
pt
],
[pts[len(pts)-1], pts[len(pts)-1]]
);
module wiring(path, wires, fillet=10, wirenum=0) {
vect = path[1]-path[0];
theta = atan2(vect[1], vect[0]);
xydist = hypot(vect[1], vect[0]);
phi = atan2(vect[2],xydist);
colors = [
[0.3, 0.3, 0.3], [1.0, 0.2, 0.2], [0.2, 1.0, 0.2], [1.0, 1.0, 0.2],
[0.3, 0.3, 1.0], [1.0, 1.0, 1.0], [0.5, 0.4, 0.0], [0.6, 0.6, 0.6],
[0.2, 1.0, 1.0], [0.8, 0.0, 0.8], [0.0, 0.6, 0.6], [1.0, 0.7, 0.7],
[1.0, 0.5, 1.0]
];
offsets = [
[-1.00, -1.00, 0.00],
[ 1.00, -1.00, 0.00],
[ 1.00, 1.00, 0.00],
[-1.00, 1.00, 0.00],
[-2.66, 0.00, 0.00],
[ 2.66, 0.00, 0.00],
[ 0.00, -2.66, 0.00],
[ 0.00, 2.66, 0.00]
];
offsets = concat(
[[0,0,0]],
[for (a = [0:60:359]) [2*cos(a), 2*sin(a), 0]],
[for (a = [30:60:359]) [3.464*cos(a), 3.464*sin(a), 0]]
);
extpath = [for (a = [0:30:360]) [cos(a), sin(a)]];
bezpath = fillet_path(path, fillet);
poly = simplify3d_path(path3d(bezier_polyline(bezpath, 8)));
for (i = [0:wires-1]) {
roty = matrix3_yrot(90-phi);
rotz = matrix3_zrot(theta);
offset = (rotz * roty) * offsets[i];
translate(offset)
color(colors[i+wirenum])
extrude_2dpath_along_3dpath(extpath, poly);
}
}