added comments to files and removed the geogebra file
This commit is contained in:
parent
ba6d1396dc
commit
76a3aa2915
7 changed files with 22 additions and 15 deletions
|
|
@ -1,3 +1,4 @@
|
|||
// extrusion takes a list of polygons (list of points in 3d space) and connects these into one big polyeder
|
||||
module extrusion(points){
|
||||
//points[0] must have its points ordered clockwise
|
||||
n = len(points);
|
||||
|
|
@ -8,6 +9,7 @@ module extrusion(points){
|
|||
polyhedron(points = points_new, faces = faces, convexity = 10);
|
||||
}
|
||||
|
||||
//ctrl is a list containing 4 control points of the bezier curve. shape is polygon in the 2d plane which is being extruded. mod is a function [0,1] -> |R scaling the shape, mod_x in the x-direction (of the shape), mod_y in the y-direction. if partial is true, then the polyeder is rendered in slices with length given by merlon and gap size given by gap, section defines the number of sections the bezier curve is broken into
|
||||
module bezier_extrude(ctrl, shape, mod = function (t) 1, mod_x = function(t) 1, mod_y = function (t) 1, partial = false, merlon = 1, gap = 1, sections = 128){
|
||||
B_0 = ctrl[0];
|
||||
B_1 = 3*(-ctrl[0] + ctrl[1]);
|
||||
|
|
@ -33,6 +35,7 @@ module bezier_extrude(ctrl, shape, mod = function (t) 1, mod_x = function(t) 1,
|
|||
}
|
||||
}
|
||||
|
||||
//some thing to play arounf with
|
||||
shape = [[0,0.5],[0.8,0],[0.5,-1],[-0.5,-1],[-0.8,0]];
|
||||
ctrl = [[0,0],[0,20],[20,20],[20,0]];
|
||||
wave1 = function (x) 0.75+0.25*cos(8*360*x);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use <headband.scad>;
|
|||
|
||||
thickness = 2.7;
|
||||
height = 5.5;
|
||||
epsilon = 0.001;
|
||||
epsilon = 0.001; //needs to be small but greater 0 so that the model doesn't break
|
||||
|
||||
module catear(){
|
||||
|
||||
|
|
|
|||
17
dogear.scad
17
dogear.scad
|
|
@ -1,18 +1,19 @@
|
|||
use <hinge.scad>;
|
||||
|
||||
//a1, a2, a3, a4 are the four angles of the pairs of hinges on the ear from bottom to tip
|
||||
module dogearAllOptions(a1, a2, a3, a4){
|
||||
translate([25,0,0]){
|
||||
union(){
|
||||
linear_extrude(height = 6, center = false, convexity = 10){
|
||||
polygon(points = [[-33,0],[-25,0],[-25,7]]);
|
||||
}
|
||||
hinge(a1, lb = 25, la = 5.5);
|
||||
translate([12.5,0,0]) hinge(a2, lb = 0, la = 5.5);
|
||||
translate([25,0,0]) hinge(a3, lb = 0, la = 5.5);
|
||||
hinge(a1, len_before = 25, len_after = 5.5);
|
||||
translate([12.5,0,0]) hinge(a2, len_after = 5.5);
|
||||
translate([25,0,0]) hinge(a3, len_after = 5.5);
|
||||
|
||||
translate([0,37,0]) hinge(a1, lb = 8, la = 5.5);
|
||||
translate([12.5,37,0]) hinge(a2, lb = 0, la = 5.5);
|
||||
translate([25,37,0]) hinge(a3, lb = 0, la = 8);
|
||||
translate([0,37,0]) hinge(a1, len_before = 8, len_after = 5.5);
|
||||
translate([12.5,37,0]) hinge(a2, len_after = 5.5);
|
||||
translate([25,37,0]) hinge(a3, len_after = 8);
|
||||
|
||||
translate([34,0,0]){
|
||||
cube([7,18.5,6]);
|
||||
|
|
@ -23,11 +24,11 @@ module dogearAllOptions(a1, a2, a3, a4){
|
|||
|
||||
translate([40,11,0]){
|
||||
rotate(-45,[0,0,1]){
|
||||
hinge(a4, lb = 7, la = 7);
|
||||
hinge(a4, len_before = 7, len_after = 7);
|
||||
translate([14.1,3.5,0]){
|
||||
cylinder(h = 6, r = 3.5, center = false, $fn=32);
|
||||
}
|
||||
translate([0,17.3,0]) hinge(a4, lb = 21, la = 24.6);
|
||||
translate([0,17.3,0]) hinge(a4, len_before = 21, len_after = 24.6);
|
||||
translate([31.4,20.8,0]) cylinder(h = 6, r = 3.5, center = false, $fn=32);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ use <dogear.scad>;
|
|||
|
||||
thickness = 2.7;
|
||||
|
||||
//options for ears include low flopness ("lflop"), regular flopness ("flop"), high flopness ("vflop"), very high flopness ("vvflop"), very very high flopness ("vvvflop")
|
||||
module dogears(rightear = "flop", leftear = "flop"){
|
||||
union() {
|
||||
translate([54,96,-3]){
|
||||
|
|
@ -17,8 +18,9 @@ module dogears(rightear = "flop", leftear = "flop"){
|
|||
}
|
||||
}
|
||||
}
|
||||
//height needs to be 6 since the dogears are 6 high
|
||||
headband(thickness = thickness, height = 6);
|
||||
}
|
||||
}
|
||||
|
||||
dogears(rightear = "lflop");
|
||||
dogears();
|
||||
Binary file not shown.
|
|
@ -39,7 +39,7 @@ module headband(thickness, height){
|
|||
translate([-17,-8]){
|
||||
rotate_extrude(convexity = 10, $fn = 16) polygon(shape_halfband);
|
||||
}
|
||||
bezier_extrude(ctrl = ctrl_rake, shape = shape_rake, partial = true, merlon = 2, gap = 3, sections = 5*42+1 );
|
||||
bezier_extrude(ctrl = ctrl_rake, shape = shape_rake, partial = true, merlon = 2, gap = 3, sections = (2+3)*42+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
module hinge(deg, lb, la){
|
||||
//deg is the amount in degrees the hinge should be able to pivot, len_before the length of the section before the hinge, len_after the length of the section after the hinge
|
||||
module hinge(deg, len_before = 0, len_after = 0){
|
||||
|
||||
cut_points = [[6,0,5.5],
|
||||
[6,7,5.5],
|
||||
|
|
@ -47,7 +48,7 @@ module hinge(deg, lb, la){
|
|||
rotate(90, [1,0,0]) cylinder(h = 4.5, r = 1.25, center = true, $fn = 16);
|
||||
}
|
||||
translate([3,2.5,2.25]) cube([4,2,2.5], center = false);
|
||||
translate([-lb,0,0]) cube([lb,7,6], center = false);
|
||||
translate([7,0,0]) cube([la,7,6], center = false);
|
||||
translate([-len_before,0,0]) cube([len_before,7,6], center = false);
|
||||
translate([7,0,0]) cube([len_after,7,6], center = false);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue