|
|
@@ -2,7 +2,9 @@ include <../config/laptop_pocket.scad>
|
|
|
include <../config/thread.scad>
|
|
|
include <../config/wall.scad>
|
|
|
include <../config/cord.scad>
|
|
|
+include <../config/hole.scad>
|
|
|
include <thread.scad>
|
|
|
+include <hole.scad>
|
|
|
|
|
|
module laptop_pocket_object() {
|
|
|
module back_shape() {
|
|
|
@@ -246,3 +248,91 @@ module laptop_pocket_object() {
|
|
|
|
|
|
final_object();
|
|
|
}
|
|
|
+
|
|
|
+module laptop_pocket_front_shape() {
|
|
|
+ module base_shape() {
|
|
|
+ width = laptop_pocket_width;
|
|
|
+ height = laptop_pocket_handle_front_height;
|
|
|
+ rounding = laptop_pocket_rounding;
|
|
|
+ move_x = width / 2 - rounding;
|
|
|
+ move_y = height / 2 - rounding;
|
|
|
+
|
|
|
+ module corner(move_x, move_y) {
|
|
|
+ translate([move_x, move_y]) {
|
|
|
+ circle(r = rounding);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ hull() {
|
|
|
+ corner(move_x, move_y);
|
|
|
+ corner(move_x, -move_y);
|
|
|
+ corner(-move_x, move_y);
|
|
|
+ corner(-move_x, -move_y);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module center_holes() {
|
|
|
+ move_y = 0;
|
|
|
+ base_width = laptop_pocket_width;
|
|
|
+ width = base_width - base_width % wall_holes_space;
|
|
|
+ move_x = width / 2;
|
|
|
+
|
|
|
+ module hole(move_x) {
|
|
|
+ translate([move_x, move_y]) {
|
|
|
+ circle(r = thread_screw / 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (count = [-move_x : wall_holes_space : move_x]) {
|
|
|
+ hole(count);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ module feature_holes(move_y, split) {
|
|
|
+ module hole(move_x) {
|
|
|
+ translate([move_x, move_y]) {
|
|
|
+ rotate(split ? 180 : 0) {
|
|
|
+ hole_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ base_width = laptop_pocket_width;
|
|
|
+ width = base_width - base_width % wall_holes_space;
|
|
|
+ move_x = width / 2;
|
|
|
+
|
|
|
+ for (count = [-move_x : wall_holes_space : move_x]) {
|
|
|
+ hole(count);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ feature_holes_y = laptop_pocket_handle_front_height / 2
|
|
|
+ - hole_full_height() / 2
|
|
|
+ - laptop_pocket_rounding;
|
|
|
+
|
|
|
+ module top_holes() {
|
|
|
+ feature_holes(feature_holes_y, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ module bottom_holes() {
|
|
|
+ feature_holes(-feature_holes_y, true);
|
|
|
+ }
|
|
|
+
|
|
|
+ difference() {
|
|
|
+ base_shape();
|
|
|
+ center_holes();
|
|
|
+ top_holes();
|
|
|
+ bottom_holes();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+module laptop_pocket_front_object() {
|
|
|
+ color("#3b71c4") {
|
|
|
+ render() {
|
|
|
+ thickness = laptop_pocket_front_thickness;
|
|
|
+ linear_extrude(height = thickness, center = true) {
|
|
|
+ laptop_pocket_front_shape();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|