aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2024-05-04 12:13:57 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2024-05-04 12:13:57 +0200
commit14b3429b8451a8a625fbf1a227af37f166368396 (patch)
tree2f697052b2c71766cd8b2f06d4bd89e0c12b1f3d
parent61afbb3d3fd511c82a40ac6e953ab3d1277f9a82 (diff)
downloadoscad_gridfinity-14b3429b8451a8a625fbf1a227af37f166368396.tar.gz
embossed size number on clip
-rw-r--r--case_base.scad49
1 files changed, 27 insertions, 22 deletions
diff --git a/case_base.scad b/case_base.scad
index 0e23a82..1906f06 100644
--- a/case_base.scad
+++ b/case_base.scad
@@ -78,28 +78,33 @@ module clip(units_z) {
straight_part=clip_straight_part;
straight_offset = resulting_height - straight_part;
- linear_extrude(clip_thickness) {
- polygon([[0,straight_part],[clip_bottom_width,straight_part],
- [clip_width/2 + clip_top_width/2,straight_offset],
- [clip_width/2 - clip_top_width/2,straight_offset] ]);
-
- polygon([[clip_width - clip_bottom_width,straight_part],[clip_width ,straight_part],
- [clip_width/2 + clip_top_width/2,straight_offset],
- [clip_width/2 - clip_top_width/2,straight_offset] ]);
-
- //Straight end Bottom
- polygon([[0,0],[clip_bottom_width,0],[clip_bottom_width,straight_part],[0,straight_part]]);
-
- polygon([[clip_width - clip_bottom_width,0],[clip_width ,0],
- [clip_width ,straight_part],[clip_width - clip_bottom_width,straight_part]]);
-
- // straight end Top
- polygon([
- [clip_width/2 + clip_top_width/2,straight_offset],
- [clip_width/2 - clip_top_width/2,straight_offset],
- [clip_width/2 - clip_top_width/2,resulting_height],
- [clip_width/2 + clip_top_width/2,resulting_height],
- ]);
+ difference() {
+ linear_extrude(clip_thickness) {
+ polygon([[0,straight_part],[clip_bottom_width,straight_part],
+ [clip_width/2 + clip_top_width/2,straight_offset],
+ [clip_width/2 - clip_top_width/2,straight_offset] ]);
+
+ polygon([[clip_width - clip_bottom_width,straight_part],[clip_width ,straight_part],
+ [clip_width/2 + clip_top_width/2,straight_offset],
+ [clip_width/2 - clip_top_width/2,straight_offset] ]);
+
+ //Straight end Bottom
+ polygon([[0,0],[clip_bottom_width,0],[clip_bottom_width,straight_part],[0,straight_part]]);
+
+ polygon([[clip_width - clip_bottom_width,0],[clip_width ,0],
+ [clip_width ,straight_part],[clip_width - clip_bottom_width,straight_part]]);
+
+ // straight end Top
+ polygon([
+ [clip_width/2 + clip_top_width/2,straight_offset],
+ [clip_width/2 - clip_top_width/2,straight_offset],
+ [clip_width/2 - clip_top_width/2,resulting_height],
+ [clip_width/2 + clip_top_width/2,resulting_height],
+ ]);
+ }
+ // Embossed number
+ linear_extrude(clip_thickness/4) translate([clip_width/2,resulting_height*0.9])
+ mirror([1,0,0]) text(str(units_z), halign="center", valign="top");
}
round_clipper(-clip_bottom_angle, clip_bottom_width);