Initial drop of konstrukt - beams.
Signed-off-by: Tony Tkáčik <tonydamage@gmail.com>
This commit is contained in:
parent
e475cb19fa
commit
eb9173adc9
3 changed files with 110 additions and 0 deletions
4
bricks/konstrukt-beam-25.scad
Normal file
4
bricks/konstrukt-beam-25.scad
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
include <../konstrukt-beam.scad>;
|
||||||
|
|
||||||
|
konstrukt_beam([[5,0]]);
|
||||||
|
|
||||||
94
konstrukt-beam.scad
Normal file
94
konstrukt-beam.scad
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
include <./measurements.scad>;
|
||||||
|
$fn=50;
|
||||||
|
|
||||||
|
//konstrukt_beam_base_L(4,3);
|
||||||
|
|
||||||
|
//konstrukt_beam_p(konstrukt_beam_arc(3,3,180));
|
||||||
|
//konstrukt_beam_p(konstrukt_beam_circle(6,3));
|
||||||
|
|
||||||
|
//konstrukt_beam_p([[25,0]]);
|
||||||
|
|
||||||
|
function konstrukt_beam_L(len1=4,len2=3)=[[len1,90],[len2,0]];
|
||||||
|
function konstrukt_beam_arc(segments=3,length=2,angle=90) = [ for (i= [1:1:segments]) [length,angle/(segments) ]];
|
||||||
|
function konstrukt_beam_circle(segments=3,length=2) = [ for (i= [1:1:segments]) [length,360/segments] ];
|
||||||
|
|
||||||
|
module konstrukt_beam_p(components=[[5,0]],height=KB_BEAM_HEIGHT) {
|
||||||
|
konstrukt_beam_base(components, height);
|
||||||
|
konstrukt_beam_holes(components, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
module konstrukt_beam(components=[[5,0]],height=KB_BEAM_HEIGHT) {
|
||||||
|
difference() {
|
||||||
|
konstrukt_beam_base(components, height);
|
||||||
|
konstrukt_beam_holes(components, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
module konstrukt_beam_base(subs=[[5,0]],height=KB_BEAM_HEIGHT,num=0) {
|
||||||
|
length = subs[num][0];
|
||||||
|
angle = subs[num][1];
|
||||||
|
konstrukt_beam_base_straight(length);
|
||||||
|
next = num+1;
|
||||||
|
if(next < len(subs)) {
|
||||||
|
translate(konstrukt_beam_move_holes(length)) {
|
||||||
|
rotate([0,0,angle]) {
|
||||||
|
konstrukt_beam_base(subs,height,next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module konstrukt_beam_holes(subs=[[5,0]],height=KB_BEAM_HEIGHT,num=0) {
|
||||||
|
length = subs[num][0];
|
||||||
|
angle = subs[num][1];
|
||||||
|
|
||||||
|
next = num+1;
|
||||||
|
if(next < len(subs)) {
|
||||||
|
konstrukt_beam_holes_straight(length-1);
|
||||||
|
translate(konstrukt_beam_move_holes(length)) {
|
||||||
|
rotate([0,0,angle]) {
|
||||||
|
konstrukt_beam_holes(subs,height,next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
konstrukt_beam_holes_straight(length);
|
||||||
|
}
|
||||||
|
|
||||||
|
module konstrukt_beam_base_straight(l=2,h=KB_BEAM_HEIGHT) {
|
||||||
|
cube_length= (l-1)*KB_HOLE_SPACING;
|
||||||
|
union() {
|
||||||
|
cylinder(d=KB_BEAM_WIDTH, h=h);
|
||||||
|
translate([0,-KB_BEAM_WIDTH/2]) {
|
||||||
|
cube([cube_length, KB_BEAM_WIDTH, h]);
|
||||||
|
}
|
||||||
|
translate([cube_length,0]) {
|
||||||
|
cylinder(d=KB_BEAM_WIDTH, h=h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function konstrukt_beam_move_holes(len)=[(len-1)*KB_HOLE_SPACING,0];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct object to be substracted from base bean
|
||||||
|
* in order to create LEGO Technic compatible hole
|
||||||
|
*
|
||||||
|
* @param h Height of beam
|
||||||
|
**/
|
||||||
|
module konstrukt_beam_hole(h=KB_BEAM_HEIGHT) {
|
||||||
|
union() {
|
||||||
|
cylinder(d=KB_HOLE_RING_DIAMETER, h=KB_HOLE_RING_DEPTH);
|
||||||
|
cylinder(d=KB_HOLE_INSIDE_DIAMETER, h=h );
|
||||||
|
translate([0,0,h-KB_HOLE_RING_DEPTH])
|
||||||
|
cylinder(d=KB_HOLE_RING_DIAMETER, h=KB_HOLE_RING_DEPTH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module konstrukt_beam_holes_straight(n=1,h=KB_BEAM_HEIGHT) {
|
||||||
|
for(i=[0:n-1])
|
||||||
|
translate([i*KB_HOLE_SPACING,0])
|
||||||
|
konstrukt_beam_hole(h);
|
||||||
|
}
|
||||||
12
measurements.scad
Normal file
12
measurements.scad
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
KB_HOLE_SPACING = 8.0;
|
||||||
|
KB_HOLE_INSIDE_DIAMETER = 5.0;
|
||||||
|
KB_STUD_DIAMETER = 4.8;
|
||||||
|
KB_HOLE_RING_DIAMETER = 6.25;
|
||||||
|
KB_HOLE_RING_DEPTH = 0.9;
|
||||||
|
KB_BEAM_WIDTH = 7.6;
|
||||||
|
KB_AXLE_GAP = 1.95;
|
||||||
|
KB_AXLE_LENGTH = 5.1;
|
||||||
|
KB_MOUSE_EARS = false;
|
||||||
|
|
||||||
|
KB_BEAM_HEIGHT = 7.8;
|
||||||
|
KB_THIN_BEAM_HEIGHT = KB_BEAM_HEIGHT/3;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue