mirror of
https://github.com/revarbat/snappy-reprap.git
synced 2025-11-02 23:56:45 -08:00
Experimental anti-shrinkage stress mods.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,97 +0,0 @@
|
||||
include <config.scad>
|
||||
use <GDMUtils.scad>
|
||||
|
||||
module nut_capture(nut_size=17.4, nut_thick=9.5, offset=18, slop=printer_slop, wall=3)
|
||||
{
|
||||
nut_rad = nut_size/cos(30)/2;
|
||||
base = (offset - nut_rad);
|
||||
h = nut_rad*2 + base;
|
||||
w = nut_thick + wall*2;
|
||||
l = nut_size + wall*2;
|
||||
|
||||
difference() {
|
||||
// Outer shell.
|
||||
translate([0, 0, h/2])
|
||||
cube(size=[l, w, h], center=true);
|
||||
|
||||
translate([0, 0, base+nut_rad]) {
|
||||
// Nut slot.
|
||||
hull() {
|
||||
grid_of(za=[0, h]) {
|
||||
zrot(90) yrot(90) {
|
||||
cylinder(h=nut_thick+slop*2, r=nut_rad+slop, center=true, $fn=6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rod access.
|
||||
hull() {
|
||||
grid_of(za=[0, h]) {
|
||||
zrot(90) yrot(90) {
|
||||
cylinder(h=w+1, r=nut_size/2-1, center=true, $fn=24);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Snap hole.
|
||||
translate([0, 0, h-3])
|
||||
cube(size=[l+1, nut_thick/2, 1.5], center=true);
|
||||
}
|
||||
}
|
||||
//!nut_capture(nut_size=17.4, nut_thick=9.5);
|
||||
|
||||
|
||||
|
||||
module nut_capture_cap(nut_size=17.4, nut_thick=9.5, wall=3, cap_thick=2)
|
||||
{
|
||||
nut_rad = nut_size/cos(30)/2;
|
||||
h = nut_rad/2;
|
||||
l = nut_size + wall*2;
|
||||
w = nut_thick + wall*2;
|
||||
|
||||
color("DeepSkyBlue") union() {
|
||||
// cap
|
||||
translate([0, 0, cap_thick/2])
|
||||
cube(size=[l, w, cap_thick], center=true);
|
||||
|
||||
difference() {
|
||||
// Plug
|
||||
union() {
|
||||
translate([0, 0, -h/2])
|
||||
cube(size=[nut_size, nut_thick, h], center=true);
|
||||
translate([0, 0, -h/2])
|
||||
cube(size=[nut_size-2, w, h], center=true);
|
||||
}
|
||||
|
||||
// Remove nut area.
|
||||
translate([0, 0, -nut_rad]) {
|
||||
zrot(90) yrot(90) {
|
||||
cylinder(h=nut_thick+1, r=nut_rad, center=true, $fn=6);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove Rod access.
|
||||
translate([0, 0, -nut_rad]) {
|
||||
zrot(90) yrot(90) {
|
||||
cylinder(h=w+1, r=nut_size/2-1, center=true, $fn=24);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Snap ridges
|
||||
grid_of(
|
||||
xa=[-nut_size/2, nut_size/2],
|
||||
za=[-3]
|
||||
) {
|
||||
scale([2.0, nut_thick/2-1, 3.0])
|
||||
yrot(45) cube(size=[1/sqrt(2), 1, 1/sqrt(2)], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
//!nut_capture_cap(nut_size=17.4, nut_thick=9.5);
|
||||
|
||||
|
||||
|
||||
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap
|
||||
|
||||
@@ -7,87 +7,91 @@ module rail_segment()
|
||||
{
|
||||
color([0.9, 0.7, 1.0])
|
||||
prerender(convexity=20)
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
// Bottom.
|
||||
translate([0,0,rail_thick/2]) yrot(90)
|
||||
sparse_strut(h=rail_width, l=rail_length, thick=rail_thick, maxang=45, strut=10, max_bridge=500);
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
// Bottom.
|
||||
translate([0,0,rail_thick/2]) yrot(90)
|
||||
sparse_strut(h=rail_width, l=rail_length, thick=rail_thick, maxang=45, strut=10, max_bridge=500);
|
||||
|
||||
// Flanges on sides to reduce peeling.
|
||||
grid_of(
|
||||
xa=[-(rail_spacing/2+joiner_width), (rail_spacing/2+joiner_width)]
|
||||
) {
|
||||
hull() {
|
||||
grid_of(
|
||||
ya=[-(rail_length/2-joiner_width/3), (rail_length/2-joiner_width/3)],
|
||||
za=[2/2]
|
||||
) {
|
||||
cylinder(h=2, r=joiner_width/3, center=true, $fn=12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Walls.
|
||||
zrot_copies([0, 180]) {
|
||||
translate([(rail_spacing+joiner_width)/2, 0, (rail_height+3)/2]) {
|
||||
if (wall_style == "crossbeams")
|
||||
sparse_strut(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5);
|
||||
if (wall_style == "thinwall")
|
||||
thinning_wall(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5, bracing=false);
|
||||
if (wall_style == "corrugated")
|
||||
corrugated_wall(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5);
|
||||
// Flanges on sides to reduce peeling.
|
||||
grid_of(count=2, spacing=rail_spacing+2*joiner_width) {
|
||||
hull() {
|
||||
grid_of(count=[1,2], spacing=[0, rail_length-2*joiner_width/3]) {
|
||||
translate([0, 0, 1/2])
|
||||
cylinder(h=1, r=joiner_width/3, center=true, $fn=12);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clear space for joiners.
|
||||
translate([0,0,rail_height/2]) {
|
||||
joiner_quad_clear(xspacing=rail_spacing+joiner_width, yspacing=rail_length, h=rail_height, w=joiner_width, clearance=5, a=joiner_angle);
|
||||
// Walls.
|
||||
zrot_copies([0, 180]) {
|
||||
translate([(rail_spacing+joiner_width)/2, 0, (rail_height+3)/2]) {
|
||||
if (wall_style == "crossbeams")
|
||||
sparse_strut(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5);
|
||||
if (wall_style == "thinwall")
|
||||
thinning_wall(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5, bracing=false);
|
||||
if (wall_style == "corrugated")
|
||||
corrugated_wall(h=rail_height+3, l=rail_length-10, thick=joiner_width, strut=5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rail backing.
|
||||
grid_of([-(rail_spacing/2+joiner_width/2), (rail_spacing/2+joiner_width/2)])
|
||||
translate([0,0,rail_height+groove_height/2])
|
||||
cube(size=[joiner_width, rail_length, groove_height], center=true);
|
||||
// Rail backing.
|
||||
grid_of(count=2, spacing=rail_spacing+joiner_width)
|
||||
translate([0,0,rail_height+groove_height/2])
|
||||
chamfer(size=[joiner_width, rail_length, groove_height], chamfer=1.5, edges=[[1,1,0,0], [1,1,0,0], [0,0,0,0]])
|
||||
cube(size=[joiner_width, rail_length, groove_height], center=true);
|
||||
|
||||
// Snap-tab joiners.
|
||||
translate([0,0,rail_height/2]) {
|
||||
joiner_quad(xspacing=rail_spacing+joiner_width, yspacing=rail_length, h=rail_height, w=joiner_width, l=5, a=joiner_angle);
|
||||
}
|
||||
|
||||
zrot_copies([0, 180]) {
|
||||
translate([0, rail_length/2-19, rail_height/4]) {
|
||||
difference() {
|
||||
// Side supports.
|
||||
// Side Supports
|
||||
translate([0, 0, rail_height/4]) {
|
||||
grid_of(count=[1,2], spacing=[0, rail_length-38]) {
|
||||
cube(size=[rail_width, 5, rail_height/2], center=true);
|
||||
|
||||
// Wiring access holes.
|
||||
grid_of(xa=[-rail_width/4, 0, rail_width/4])
|
||||
cube(size=[10, 10, 10], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rail grooves.
|
||||
translate([0,0,rail_height+groove_height/2]) {
|
||||
mirror_copy([1,0,0]) {
|
||||
translate([-(rail_spacing/2), 0, 0]) {
|
||||
scale([tan(groove_angle),1,1]) yrot(45) {
|
||||
cube(size=[groove_height*sqrt(2)/2,rail_length+1,groove_height*sqrt(2)/2], center=true);
|
||||
}
|
||||
}
|
||||
translate([-(rail_width/2), 0, 0]) {
|
||||
scale([tan(groove_angle),1,1]) yrot(45) {
|
||||
cube(size=[groove_height*sqrt(2)/2,rail_length+1,groove_height*sqrt(2)/2], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Wiring access holes.
|
||||
translate([0, 0, rail_height/4]) {
|
||||
grid_of(count=[3,2], spacing=[rail_width/3, rail_length-38]) {
|
||||
cube(size=[10, 10, 10], center=true);
|
||||
}
|
||||
}
|
||||
|
||||
// Clear space for joiners.
|
||||
translate([0,0,rail_height/2]) {
|
||||
joiner_quad_clear(xspacing=rail_spacing+joiner_width, yspacing=rail_length, h=rail_height, w=joiner_width, clearance=5, a=joiner_angle);
|
||||
}
|
||||
|
||||
// Shrinkage stress relief
|
||||
translate([0, 0, rail_thick/2]) {
|
||||
grid_of(count=[1, 11], spacing=[0, 12]) {
|
||||
cube(size=[rail_width+1, 1, rail_thick-2], center=true);
|
||||
}
|
||||
grid_of(count=[9, 2], spacing=[12, rail_length-10]) {
|
||||
cube(size=[1, 11, rail_thick-2], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Rail grooves.
|
||||
translate([0,0,rail_height+groove_height/2]) {
|
||||
mirror_copy([1,0,0]) {
|
||||
translate([-(rail_spacing/2), 0, 0]) {
|
||||
scale([tan(groove_angle),1,1]) yrot(45) {
|
||||
cube(size=[groove_height*sqrt(2)/2,rail_length+1,groove_height*sqrt(2)/2], center=true);
|
||||
}
|
||||
grid_of(
|
||||
xa=[-joiner_width/2],
|
||||
ya=[-rail_length/2, rail_length/2],
|
||||
za=[groove_height/2]
|
||||
){
|
||||
xrot(45) cube(size=[joiner_width+1, 1.5*sqrt(2), 1.5*sqrt(2)], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Snap-tab joiners.
|
||||
translate([0,0,rail_height/2]) {
|
||||
joiner_quad(xspacing=rail_spacing+joiner_width, yspacing=rail_length, h=rail_height, w=joiner_width, l=5, a=joiner_angle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user