Ver código fonte

Finaly end working on laptop pocket and create cord module.

Cixo 1 ano atrás
pai
commit
32dc929e66

+ 56 - 0
assets/cord.scad

@@ -0,0 +1,56 @@
+include <../config/cord.scad>
+include <../config/thread.scad>
+include <../config/hole.scad>
+include <thread.scad>
+
+module cord_object() {
+    height = thread_height 
+    + cord_base_thickness
+    + cord_hole_diameter
+    + cord_base_thickness * 2;
+    
+    diameter_default = thread_top_diameter 
+    + cord_base_thickness * 2;
+
+    diameter_alt = hole_entrance;
+
+    diameter = max(diameter_default, diameter_alt);
+
+    module base_object() {
+        cylinder(r = diameter / 2, h = height, center = true);
+    }
+
+    module thread() {
+        center = height / 2 
+        - thread_height / 2;
+
+        translate([0, 0, center]) {
+            rotate([180, 0, 0]) {
+                thread_object();
+            }
+        }
+    }
+
+    module cord_hole() {
+        radius = cord_hole_diameter / 2;
+        move = cord_base_thickness
+        + cord_hole_diameter / 2
+        - height / 2;
+
+        translate([0, 0, move]) {
+            rotate([90, 0, 0]) {
+                cylinder(r = radius, h = diameter, center = true);
+            }
+        }
+    }
+
+    color("#9230cf") {
+        render() {
+            difference() {
+                base_object();
+                thread();
+                cord_hole();
+            }
+        }
+    }
+}

+ 5 - 1
assets/hole.scad

@@ -1,7 +1,11 @@
 include <../config/hole.scad>
 
+function hole_full_height() =
+    hole_entrance / 2 * 2
+    + hole_holding / 2 * 2.5;
+
 module hole_shape() {
-    full_height = hole_entrance / 2 * 2 + hole_holding / 2 * 2.5;
+    full_height = hole_full_height();
 
     translate([0, -full_height / 2]) {
         hull() {

+ 90 - 0
assets/laptop_pocket.scad

@@ -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();
+            }
+        }
+    }
+}

+ 1 - 0
config/cord.scad

@@ -1 +1,2 @@
 cord_hole_diameter = 3;
+cord_base_thickness = 2;

+ 2 - 1
config/laptop_pocket.scad

@@ -1,5 +1,5 @@
 laptop_pocket_laptop_thickness = 30;
-laptop_pocket_handle_front_height = 50;
+laptop_pocket_handle_front_height = 80;
 laptop_pocket_handle_back_height = 150;
 laptop_pocket_handle_back_thickness = 3;
 laptop_pocket_handle_width = 15;
@@ -7,3 +7,4 @@ laptop_pocket_height = 55;
 laptop_pocket_width = 150;
 laptop_pocket_rounding = 5;
 laptop_pocket_base_thickness = 2;
+laptop_pocket_front_thickness = 3;

+ 5 - 0
manufacture/cord.3D.scad

@@ -0,0 +1,5 @@
+include <../assets/cord.scad>
+
+$fn = 100;
+
+cord_object();

+ 5 - 0
manufacture/laptop_pocket.1.3D.scad

@@ -0,0 +1,5 @@
+include <../assets/laptop_pocket.scad>
+
+$fn = 100;
+
+laptop_pocket_object();

+ 5 - 0
manufacture/laptop_pocket.2.3D.scad

@@ -0,0 +1,5 @@
+include <../assets/laptop_pocket.scad>
+
+$fn = 100;
+
+laptop_pocket_front_object();

+ 5 - 0
manufacture/laptop_pocket.2D.scad

@@ -0,0 +1,5 @@
+include <../assets/laptop_pocket.scad>
+
+$fn = 100;
+
+laptop_pocket_front_shape();

+ 5 - 0
renders/cord.scad

@@ -0,0 +1,5 @@
+include <../assets/cord.scad>
+
+$fn = 100;
+
+cord_object();

+ 15 - 0
renders/laptop_pocket.scad

@@ -3,3 +3,18 @@ include <../assets/laptop_pocket.scad>
 $fn = 100;
 
 laptop_pocket_object();
+
+move_y = thread_height / 2
++ laptop_pocket_base_thickness / 2
++ laptop_pocket_laptop_thickness / 2
++ laptop_pocket_front_thickness / 2;
+
+move_z = thread_top_diameter / 2
++ laptop_pocket_base_thickness
+- laptop_pocket_handle_back_height / 2;
+
+translate([0, move_y, move_z]) {
+    rotate([90, 0, 0]) {
+        laptop_pocket_front_object();
+    }
+}