@@ -129,7 +129,7 @@ kickstand_height_percentage = 65;
129
129
kickstand_leg_bridge_offset_percentage = 15 ;
130
130
kickstand_leg_bridge_height = 7 ;
131
131
kickstand_depth = 7 ;
132
- kickstand_bottom_start = 3 ;
132
+ kickstand_bottom_start = 2 ;
133
133
kickstand_wall_thickness = 1 ;
134
134
kickstand_gap_thickness = 0.5 ;
135
135
kickstand_hinge_diameter = 2.2 ;
@@ -138,6 +138,12 @@ kickstand_hinge_top_extra_leverage = 3; // Height added to the flap above the hi
138
138
kickstand_hinge_wall_padding = 0.2 ; // Distance from the back wall
139
139
kickstand_hinge_cylinder_gap = 0.5 ; // Gap between the hinge and the cylinder
140
140
kickstand_rotation = 0 ; // Kickstand rotation angle, goes up to 35 when open
141
+ kickstand_inner_snap = true ;
142
+ kickstand_inner_snap_reverse = true ;
143
+ kickstand_inner_snap_height_percentage = 50 ;
144
+ kickstand_inner_snap_radius_hole = 1.0 ;
145
+ kickstand_inner_snap_radius_ball = 1.5 ;
146
+ kickstand_inner_snap_gap = 1.2 ;
141
147
142
148
/* [USB cutout] */
143
149
@@ -882,17 +888,17 @@ module caseWithKickstand() {
882
888
}
883
889
884
890
// The kickstand itself
885
- difference () {
886
- union () {
891
+ difference () {
892
+ union () {
887
893
// Legs
888
- for (x = leg_x_starts_leg ) {
894
+ for (index = [ 0 : 1 ] ) {
889
895
// Render the leg's top cylinder over the hinge
890
- translate ([x , hinge_start[1 ], hinge_start[2 ]])
896
+ translate ([leg_x_starts_leg[index] , hinge_start[1 ], hinge_start[2 ]])
891
897
rotate ([90 , 0 , 90 ])
892
898
cylinder (d = hinge_real_depth, h = kickstand_leg_width);
893
899
894
900
// Render the large leg top
895
- translate ([x , hinge_start[1 ], hinge_start[2 ]])
901
+ translate ([leg_x_starts_leg[index] , hinge_start[1 ], hinge_start[2 ]])
896
902
rotate ([kickstand_rotation, 0 , 0 ])
897
903
cubeWithAngledTopBottom(
898
904
loc= [
@@ -908,21 +914,29 @@ module caseWithKickstand() {
908
914
);
909
915
910
916
// Render the large leg
911
- translate ([x, hinge_start[1 ], hinge_start[2 ]])
912
- rotate ([kickstand_rotation, 0 , 0 ])
913
- cubeWithAngledTopBottom(
914
- loc= [
915
- 0 ,
916
- leg_yz[0 ] - hinge_start[1 ] + hinge_top_offset - kickstand_hinge_diameter,
917
- leg_yz[1 ] - hinge_start[2 ]
918
- ],
919
- size= [
920
- kickstand_leg_width,
921
- kickstand_height - kickstand_gap_thickness - kickstand_wall_thickness * 2 - kickstand_gap_thickness - hinge_top_offset + kickstand_hinge_diameter - leg_depth,
922
- leg_depth
923
- ],
924
- bottom= true
925
- );
917
+ difference () {
918
+ translate ([leg_x_starts_leg[index], hinge_start[1 ], hinge_start[2 ]])
919
+ rotate ([kickstand_rotation, 0 , 0 ])
920
+ cubeWithAngledTopBottom(
921
+ loc= [
922
+ 0 ,
923
+ leg_yz[0 ] - hinge_start[1 ] + hinge_top_offset - kickstand_hinge_diameter,
924
+ leg_yz[1 ] - hinge_start[2 ]
925
+ ],
926
+ size= [
927
+ kickstand_leg_width,
928
+ kickstand_height - kickstand_gap_thickness - kickstand_wall_thickness * 2 - kickstand_gap_thickness - hinge_top_offset + kickstand_hinge_diameter - leg_depth,
929
+ leg_depth
930
+ ],
931
+ bottom= true
932
+ );
933
+ if (kickstand_inner_snap) {
934
+ 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])
935
+ rotate ([kickstand_rotation, 0 , 0 ])
936
+ 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 ])
937
+ sphere (d = kickstand_inner_snap_radius_hole * 2 );
938
+ }
939
+ }
926
940
}
927
941
// Render the leg bridge
928
942
translate ([0 , hinge_start[1 ], hinge_start[2 ]])
@@ -955,11 +969,25 @@ module caseWithKickstand() {
955
969
cylinder (d = kickstand_hinge_diameter + kickstand_hinge_cylinder_gap * 2 , h = kickstand_width + 0.22 );
956
970
}
957
971
958
- // Render a cylinder as a hinge
959
- for (x = leg_x_starts_full) {
960
- translate ([x , hinge_start[1 ], hinge_start[2 ]])
972
+ for (index = [ 0 : 1 ]) {
973
+ // Render a cylinder as a hinge
974
+ translate ([leg_x_starts_full[index] , hinge_start[1 ], hinge_start[2 ]])
961
975
rotate ([90 , 0 , 90 ])
962
976
cylinder (d = kickstand_hinge_diameter, h = kickstand_leg_full_width - 0.22 );
977
+
978
+ // Render the snaps for the legs
979
+ if (kickstand_inner_snap) {
980
+ translate ([
981
+ 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),
982
+ 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),
983
+ hinge_start[2 ] - kickstand_gap_thickness
984
+ ])
985
+ intersection () {
986
+ sphere (d = kickstand_inner_snap_radius_ball * 2 );
987
+ 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 ])
988
+ cube ([kickstand_inner_snap_radius_hole * 2 , kickstand_inner_snap_radius_hole * 4 , kickstand_inner_snap_radius_hole * 4 ]);
989
+ }
990
+ }
963
991
}
964
992
}
965
993
0 commit comments