@@ -40,7 +40,8 @@ case_inner_padding_bottom = 4;
40
40
/* [Case dimensions] */
41
41
42
42
// How round to make the case
43
- fillet_radius = 2.5 ;
43
+ fillet_radius = 0 ;
44
+ // fillet_radius = 2.5;
44
45
45
46
// Panel cover thickness
46
47
panel_cover_depth = 1.6 ;
@@ -54,6 +55,17 @@ case_depth = 10.0;
54
55
// Back plate thickness
55
56
back_depth = 1.2 ;
56
57
58
+ /* [Thick border] */
59
+ thick_border = false ;
60
+ thick_border_width = 12.0 ;
61
+ thick_border_extra_depth = 15.0 ;
62
+
63
+ /* [Colors] */
64
+ case_color = "yellow" ;
65
+ panel_cover_color = "white" ;
66
+ thick_border_color = "gray" ;
67
+ kickstand_color = "white" ;
68
+
57
69
/* [Cable holes for panel] */
58
70
59
71
// Gap in the border for the eInk panel's cables, mm, centered
@@ -159,6 +171,11 @@ usb_cutout_hole_position = "top"; // [top, bottom, left, right, back]
159
171
usb_cutout_hole_width = 14 ;
160
172
usb_cutout_hole_height = 6.0 ;
161
173
174
+ // Tiny USB-C
175
+ // usb_cutout_hole_width = 9.1;
176
+ // usb_cutout_hole_height = 3.41;
177
+ // usb_cutout_box_wall_thickness = 4.0;
178
+
162
179
/* [Hanging hole] */
163
180
164
181
hanging_hole = true ;
@@ -215,7 +232,7 @@ side_button_hole_gap = 0.3;
215
232
// Gap between STL parts for visual debugging
216
233
debug_gap = 40 ;
217
234
// Gap on baseplate between case and body when printing
218
- print_gap = 10 ;
235
+ print_gap = 10 + (thick_border ? thick_border_width : 0 ) ;
219
236
cross_section_percentage = 0 ; // [0:100]
220
237
221
238
// End of variables.
@@ -477,6 +494,26 @@ module caseBody () {
477
494
}
478
495
}
479
496
497
+ module caseThickBorder () {
498
+ difference () {
499
+ color (thick_border_color)
500
+ translate ([- thick_border_width, - thick_border_width, - thick_border_extra_depth + 0.01 ])
501
+ cube ([
502
+ frame_full_width + 2 * thick_border_width,
503
+ frame_full_height + 2 * thick_border_width,
504
+ case_depth + back_depth + thick_border_extra_depth
505
+ ]);
506
+
507
+ color (thick_border_color)
508
+ translate ([0 , 0 , - thick_border_extra_depth - 11 ])
509
+ cube ([
510
+ frame_full_width,
511
+ frame_full_height,
512
+ case_depth + back_depth + thick_border_extra_depth + 22
513
+ ]);
514
+ }
515
+ }
516
+
480
517
module case_cable_gaps() {
481
518
if (panel_cable_gap_bottom > 0 ) {
482
519
render_panel_cable_gap_bottom(case_cable_gap_depth, - 0.11 );
@@ -565,6 +602,7 @@ module case() {
565
602
union () {
566
603
if (case_center_support_vertical || case_center_support_horizontal) {
567
604
difference () {
605
+ color (case_color)
568
606
union () {
569
607
// Center support
570
608
if (case_center_support_horizontal) {
@@ -597,6 +635,7 @@ module case() {
597
635
};
598
636
599
637
if (usb_cutout) {
638
+ color (case_color)
600
639
cubeWithAngledTopBottom(
601
640
loc= [
602
641
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 ,
@@ -613,6 +652,7 @@ module case() {
613
652
);
614
653
}
615
654
if (hanging_hole) {
655
+ color (case_color)
616
656
cubeWithAngledTopBottom(
617
657
loc= [
618
658
hanging_hole_x - hanging_hole_wall_thickness,
@@ -632,16 +672,24 @@ module case() {
632
672
);
633
673
}
634
674
if (pi_pinholes) {
675
+ color (case_color)
635
676
piPinholes();
636
677
}
637
678
638
679
// Cut out a piece of the cube
680
+ color (case_color)
639
681
caseBody();
682
+
683
+ if (thick_border) {
684
+ color (thick_border_color)
685
+ caseThickBorder();
686
+ }
640
687
};
641
688
642
689
// Cut holes to the back
643
690
for (c = screw_positions) {
644
691
// Screw thread hole that goes all the way
692
+ color (case_color)
645
693
translate ([c[0 ], c[1 ], - 0.11 ])
646
694
cylinder (d = case_screw_hole_thread_diameter,
647
695
h = case_depth + back_depth + 0.11 );
@@ -650,30 +698,35 @@ module case() {
650
698
651
699
if (hole_depth > case_screw_hole_diameter - case_screw_hole_thread_diameter) {
652
700
// Cylinder hole from back to insert - chamfer
701
+ color (case_color)
653
702
translate ([c[0 ], c[1 ], case_screw_hole_insert_depth + case_screw_hole_floor_depth]) // Solid border around the screw hole
654
703
cylinder (d2 = case_screw_hole_diameter,
655
704
d1 = case_screw_hole_thread_diameter,
656
705
h = case_screw_hole_diameter - case_screw_hole_thread_diameter); // Hole for the screw thread
657
706
// Cylinder hole from back to insert - tube
707
+ color (case_color)
658
708
translate ([c[0 ], c[1 ], case_screw_hole_insert_depth + case_screw_hole_floor_depth + (case_screw_hole_diameter - case_screw_hole_thread_diameter) - 0.01 ]) // Solid border around the screw hole
659
709
cylinder (d = case_screw_hole_diameter,
660
710
h = hole_depth - (case_screw_hole_diameter - case_screw_hole_thread_diameter) + 0.11 ); // Hole for the screw thread
661
711
} else {
662
712
// Cylinder hole from back to insert
713
+ color (case_color)
663
714
translate ([c[0 ], c[1 ], case_screw_hole_insert_depth + case_screw_hole_floor_depth]) // Solid border around the screw hole
664
715
cylinder (d2 = case_screw_hole_diameter,
665
716
d1 = case_screw_hole_thread_diameter,
666
717
h = hole_depth); // Hole for the screw thread
667
718
}
668
719
669
720
// Cylinder hole from front to insert
721
+ color (case_color)
670
722
translate ([c[0 ], c[1 ], - 0.11 ]) // Solid border around the screw hole
671
723
cylinder (d = case_screw_hole_diameter,
672
724
h = case_screw_hole_insert_depth + 0.11 ); // Hole for the screw thread
673
725
}
674
726
675
727
if (usb_cutout) {
676
728
// Cutout into box
729
+ color (case_color)
677
730
cubeWithLeftRightGapBridge(
678
731
loc= [
679
732
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness,
@@ -691,6 +744,7 @@ module case() {
691
744
692
745
// Hole into what's remaining
693
746
if (usb_cutout_hole_position == "left" || usb_cutout_hole_position == "right" ) {
747
+ color (case_color)
694
748
translate ([
695
749
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
696
750
+ (usb_cutout_hole_position == "right" ? usb_cutout_box_width + usb_cutout_box_wall_thickness : 0 ),
@@ -703,6 +757,7 @@ module case() {
703
757
usb_cutout_hole_height
704
758
]);
705
759
} else if (usb_cutout_hole_position == "top" || usb_cutout_hole_position == "bottom" ) {
760
+ color (case_color)
706
761
translate ([
707
762
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
708
763
(frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11
@@ -715,6 +770,7 @@ module case() {
715
770
usb_cutout_hole_height
716
771
]);
717
772
} else if (usb_cutout_hole_position == "back" ) {
773
+ color (case_color)
718
774
translate ([
719
775
(frame_full_width - usb_cutout_box_width - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_x_percentage / 100 + usb_cutout_box_wall_thickness + (usb_cutout_box_width - usb_cutout_hole_width) / 2 ,
720
776
(frame_full_height - usb_cutout_box_height - usb_cutout_box_wall_thickness * 2 ) * usb_cutout_offset_y_percentage / 100 + usb_cutout_box_wall_thickness - usb_cutout_box_wall_thickness - 0.11 + (usb_cutout_box_height - usb_cutout_hole_height) / 2 + usb_cutout_box_wall_thickness,
@@ -730,6 +786,7 @@ module case() {
730
786
}
731
787
732
788
if (hanging_hole) {
789
+ color (case_color)
733
790
cubeWithAngledTopBottom(
734
791
loc= [
735
792
hanging_hole_x,
@@ -749,6 +806,7 @@ module case() {
749
806
);
750
807
751
808
// Big cyclinter hole
809
+ color (case_color)
752
810
translate ([
753
811
hanging_hole_edge == "top" || hanging_hole_edge == "bottom"
754
812
? frame_full_width / 2
@@ -766,6 +824,7 @@ module case() {
766
824
cylinder (d = hanging_hole_large_diameter, h = back_depth + 0.21 );
767
825
768
826
// Small cyclinter hole
827
+ color (case_color)
769
828
translate ([
770
829
hanging_hole_edge == "top" || hanging_hole_edge == "bottom"
771
830
? frame_full_width / 2
@@ -783,6 +842,7 @@ module case() {
783
842
cylinder (d = hanging_hole_small_diameter, h = back_depth + 0.21 );
784
843
785
844
// Box connecitng the two
845
+ color (case_color)
786
846
translate ([
787
847
hanging_hole_edge == "top" || hanging_hole_edge == "bottom"
788
848
? frame_full_width / 2 - hanging_hole_small_diameter / 2
@@ -804,9 +864,11 @@ module case() {
804
864
}
805
865
806
866
if (rear_cooling) {
867
+ color (case_color)
807
868
rearCooling();
808
869
}
809
870
871
+ color (case_color)
810
872
sideButtonHoles();
811
873
}
812
874
}
@@ -857,6 +919,7 @@ module caseWithKickstand() {
857
919
// Protective box around the kickstand legs
858
920
for (x = leg_x_starts_full) {
859
921
// Long base leg
922
+ color (case_color)
860
923
cubeWithAngledTopBottom(
861
924
loc= [
862
925
x,
@@ -870,6 +933,7 @@ module caseWithKickstand() {
870
933
}
871
934
872
935
// Protective box around the leg bridge
936
+ color (case_color)
873
937
cubeWithAngledTopBottom(
874
938
loc= [
875
939
leg_x_starts_full[0 ] + kickstand_leg_full_width - kickstand_wall_thickness * 2 ,
@@ -888,6 +952,7 @@ module caseWithKickstand() {
888
952
// Now the holes
889
953
for (x = leg_x_starts_hole) {
890
954
// Top thicker part - top extra cavity
955
+ color (case_color)
891
956
cubeWithAngledTopBottom(
892
957
loc= [
893
958
x,
@@ -902,6 +967,7 @@ module caseWithKickstand() {
902
967
top= true
903
968
);
904
969
// Long base leg
970
+ color (case_color)
905
971
cubeWithLeftRightGapBridge(
906
972
loc= [
907
973
x,
@@ -919,6 +985,7 @@ module caseWithKickstand() {
919
985
}
920
986
921
987
// Leg bridge hole
988
+ color (case_color)
922
989
cubeWithAngledTopBottom(
923
990
loc= [
924
991
leg_x_starts_full[0 ] + kickstand_leg_full_width - kickstand_wall_thickness - 0.11 ,
@@ -935,6 +1002,7 @@ module caseWithKickstand() {
935
1002
);
936
1003
937
1004
if (sd_card_in_leg) {
1005
+ color (case_color)
938
1006
translate ([sd_card_x_position, sd_card_y_position, 0 ])
939
1007
rotate ([0 , 0 , sd_card_in_leg_side_side == "left" ? 90 : - 90 ])
940
1008
sdCardAdapterCutout();
@@ -947,11 +1015,13 @@ module caseWithKickstand() {
947
1015
// Legs
948
1016
for (index= [0 :1 ]) {
949
1017
// Render the leg's top cylinder over the hinge
1018
+ color (kickstand_color)
950
1019
translate ([leg_x_starts_leg[index], hinge_start[1 ], hinge_start[2 ]])
951
1020
rotate ([90 , 0 , 90 ])
952
1021
cylinder (d = hinge_real_depth, h = kickstand_leg_width);
953
1022
954
1023
// Render the large leg top
1024
+ color (kickstand_color)
955
1025
translate ([leg_x_starts_leg[index], hinge_start[1 ], hinge_start[2 ]])
956
1026
rotate ([kickstand_rotation, 0 , 0 ])
957
1027
cubeWithAngledTopBottom(
@@ -969,6 +1039,7 @@ module caseWithKickstand() {
969
1039
970
1040
// Render the large leg
971
1041
difference () {
1042
+ color (kickstand_color)
972
1043
translate ([leg_x_starts_leg[index], hinge_start[1 ], hinge_start[2 ]])
973
1044
rotate ([kickstand_rotation, 0 , 0 ])
974
1045
cubeWithAngledTopBottom(
@@ -985,14 +1056,17 @@ module caseWithKickstand() {
985
1056
bottom= true
986
1057
);
987
1058
if (kickstand_inner_snap) {
1059
+ color (kickstand_color)
988
1060
translate ([leg_x_starts_leg[index] + (index == (kickstand_inner_snap_reverse ? 1 : 0 ) ? kickstand_leg_width : 0 ), hinge_start[1 ], hinge_start[2 ] - kickstand_gap_thickness])
989
1061
rotate ([kickstand_rotation, 0 , 0 ])
1062
+ color (kickstand_color)
990
1063
translate ([0 , kickstand_inner_snap_height_percentage / 100 * (kickstand_height - kickstand_gap_thickness - kickstand_wall_thickness * 2 - kickstand_gap_thickness - hinge_top_offset + kickstand_hinge_diameter - leg_depth), 0 ])
991
1064
sphere (d = kickstand_inner_snap_radius_hole * 2 );
992
1065
}
993
1066
}
994
1067
}
995
1068
// Render the leg bridge
1069
+ color (kickstand_color)
996
1070
translate ([0 , hinge_start[1 ], hinge_start[2 ]])
997
1071
rotate ([kickstand_rotation, 0 , 0 ])
998
1072
cubeWithAngledTopBottom(
@@ -1011,31 +1085,36 @@ module caseWithKickstand() {
1011
1085
);
1012
1086
1013
1087
if (sd_card_in_leg) {
1088
+ color (case_color)
1014
1089
translate ([sd_card_x_position, sd_card_y_position, 0 ])
1015
1090
rotate ([0 , 0 , sd_card_in_leg_side_side == "left" ? 90 : - 90 ])
1016
1091
sdCardAdapterBase();
1017
1092
}
1018
1093
}
1019
1094
1020
1095
// Render an empty cylinder inside the top cylinder, where the hinge will go through
1096
+ color (kickstand_color)
1021
1097
translate ([leg_x_starts_leg[0 ] - 0.11 , hinge_start[1 ], hinge_start[2 ]])
1022
1098
rotate ([90 , 0 , 90 ])
1023
1099
cylinder (d = kickstand_hinge_diameter + kickstand_hinge_cylinder_gap * 2 , h = kickstand_width + 0.22 );
1024
1100
}
1025
1101
1026
1102
for (index= [0 :1 ]) {
1027
1103
// Render a cylinder as a hinge
1104
+ color (case_color)
1028
1105
translate ([leg_x_starts_full[index], hinge_start[1 ], hinge_start[2 ]])
1029
1106
rotate ([90 , 0 , 90 ])
1030
1107
cylinder (d = kickstand_hinge_diameter, h = kickstand_leg_full_width - 0.22 );
1031
1108
1032
1109
// Render the snaps for the legs
1033
1110
if (kickstand_inner_snap) {
1111
+ color (case_color)
1034
1112
translate ([
1035
1113
leg_x_starts_leg[index] + (index == (kickstand_inner_snap_reverse ? 1 : 0 ) ? kickstand_leg_width : 0 ) + (index == (kickstand_inner_snap_reverse ? 1 : 0 ) ? kickstand_inner_snap_gap : - kickstand_inner_snap_gap),
1036
1114
hinge_start[1 ] + kickstand_inner_snap_height_percentage / 100 * (kickstand_height - kickstand_gap_thickness - kickstand_wall_thickness * 2 - kickstand_gap_thickness - hinge_top_offset + kickstand_hinge_diameter - leg_depth),
1037
1115
hinge_start[2 ] - kickstand_gap_thickness
1038
1116
])
1117
+ color (kickstand_color)
1039
1118
intersection () {
1040
1119
sphere (d = kickstand_inner_snap_radius_ball * 2 );
1041
1120
translate ([- kickstand_inner_snap_radius_hole * 2 + (index == (kickstand_inner_snap_reverse ? 1 : 0 ) ? 0 : + kickstand_inner_snap_radius_hole * 2 ), - kickstand_inner_snap_radius_hole * 2 , - kickstand_inner_snap_radius_hole * 2 ])
@@ -1453,6 +1532,7 @@ module sideButtons() {
1453
1532
difference () {
1454
1533
union () {
1455
1534
// Cover panel
1535
+ color (panel_cover_color)
1456
1536
rotate (
1457
1537
view_mode == "print_vertical"
1458
1538
? [180 , 180 , 180 ]
0 commit comments