its now a notebook
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
$fs = 0.01;
|
$fs = 0.1;
|
||||||
$fa = 0.01;
|
$fa = 0.1;
|
||||||
|
|
||||||
|
|
||||||
// A5 = 148
|
// A5 = 148
|
||||||
@@ -8,37 +8,77 @@ page_size_height = sqrt(2)*page_size_width;
|
|||||||
|
|
||||||
notebook_thickness = 3;
|
notebook_thickness = 3;
|
||||||
hinge_radius = 10;
|
hinge_radius = 10;
|
||||||
|
hinge_hole_radius = 6;
|
||||||
number_of_hinge_segments = 5;
|
number_of_hinge_segments = 5;
|
||||||
hinge_gap = 2;
|
hinge_gap = 2;
|
||||||
|
notebook_open_angle = 0; // [0:180]
|
||||||
|
// notebook_open_angle = $t*180;
|
||||||
|
|
||||||
|
cover_material_colour = [128/255, 165/255, 0];
|
||||||
|
addtional_cover_material_colour = [255/255, 165/255, 0];
|
||||||
|
hinge_colour_even = [255/255, 0, 0];
|
||||||
|
hinge_colour_odd = [255/255, 0, 1];
|
||||||
|
|
||||||
|
hinge_segments_length = (page_size_height - hinge_gap * (number_of_hinge_segments - 1)) / number_of_hinge_segments;
|
||||||
|
hinge_offset = [-page_size_width/2-hinge_radius, page_size_height / 2 - hinge_segments_length / 2, hinge_radius - notebook_thickness/2];
|
||||||
|
|
||||||
|
function ALTERNATE(i, thing_1, thing_2) = (thing_1*(i % 2) + thing_2*(-(i % 2)+1));
|
||||||
|
|
||||||
echo(str("page size = ", page_size_height, "x", page_size_width, "mm"));
|
echo(str("page size = ", page_size_height, "x", page_size_width, "mm"));
|
||||||
|
|
||||||
|
|
||||||
|
translate([page_size_width/2+hinge_radius, 0, -hinge_radius+notebook_thickness/2])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
union(){
|
union(){
|
||||||
color([0/255, 20/255, 0/255])
|
color(cover_material_colour)
|
||||||
cube(size=[page_size_width, page_size_height, notebook_thickness], center=true);
|
cube(size=[page_size_width, page_size_height, notebook_thickness], center=true);
|
||||||
|
|
||||||
color([128/255, 128/255, 10/255])
|
color(addtional_cover_material_colour)
|
||||||
translate([-page_size_width/2 - hinge_radius/2 , 0, 0])
|
translate([-page_size_width/2 - hinge_radius/2 , 0, 0])
|
||||||
cube(size=[hinge_radius, page_size_height, notebook_thickness], center=true);
|
cube(size=[hinge_radius, page_size_height, notebook_thickness], center=true);
|
||||||
|
|
||||||
|
translate(hinge_offset){
|
||||||
|
for (i=[1:2:number_of_hinge_segments - 1]) {
|
||||||
|
translate([0, -i*(hinge_segments_length+hinge_gap), 0])
|
||||||
|
rotate([90, 0, 0])
|
||||||
|
color(hinge_colour_odd)
|
||||||
|
difference() {
|
||||||
|
cylinder(r=hinge_radius, h=hinge_segments_length, center=true);
|
||||||
|
cylinder(r=hinge_hole_radius, h=hinge_segments_length*2, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rotate([0, -notebook_open_angle, 0])
|
||||||
|
translate([page_size_width/2+hinge_radius, 0, -hinge_radius+notebook_thickness/2])
|
||||||
|
union(){
|
||||||
|
translate([0, 0, hinge_radius*2 - notebook_thickness]){
|
||||||
|
color(cover_material_colour)
|
||||||
|
cube(size=[page_size_width, page_size_height, notebook_thickness], center=true);
|
||||||
|
|
||||||
|
color(addtional_cover_material_colour)
|
||||||
|
translate([-page_size_width/2 - hinge_radius/2 , 0, 0])
|
||||||
|
cube(size=[hinge_radius, page_size_height, notebook_thickness], center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
translate(hinge_offset){
|
||||||
|
for (i=[0:2:number_of_hinge_segments - 1]) {
|
||||||
|
translate([0, -i*(hinge_segments_length+hinge_gap), 0])
|
||||||
|
rotate([90, 0, 0])
|
||||||
|
color(hinge_colour_even)
|
||||||
|
|
||||||
|
difference() {
|
||||||
|
cylinder(r=hinge_radius, h=hinge_segments_length, center=true);
|
||||||
|
cylinder(r=hinge_hole_radius, h=hinge_segments_length*2, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
translate([0, 0, hinge_radius*2 - notebook_thickness])
|
|
||||||
union(){
|
|
||||||
color([0/255, 20/255, 0/255])
|
|
||||||
cube(size=[page_size_width, page_size_height, notebook_thickness], center=true);
|
|
||||||
|
|
||||||
color([128/255, 128/255, 10/255])
|
|
||||||
translate([-page_size_width/2 - hinge_radius/2 , 0, 0])
|
|
||||||
cube(size=[hinge_radius, page_size_height, notebook_thickness], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
translate([-page_size_width/2-hinge_radius, 0, hinge_radius - notebook_thickness/2])
|
|
||||||
rotate([90, 0, 0])
|
|
||||||
cylinder(r=hinge_radius, h=10, center=true);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user