chiark / gitweb /
pattress-boxes-3-cover: LidSideProfile: cope with small total_len
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Dec 2015 23:57:43 +0000 (23:57 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Dec 2015 23:57:43 +0000 (23:57 +0000)
pattress-boxes-3-cover.scad

index dbd06c9..870b614 100644 (file)
@@ -66,8 +66,8 @@ raillen = patbox_side/2 + rail_overlap;
 
 module LidSideProfile(){
   polygon([[-lid_top_wall,     lid_inner_max_h],
-          [lid_inner_kink[0], lid_inner_max_h],
-          [lid_inner_kink[1], lid_inner_min_h],
+          [min(lid_inner_kink[0],total_len), lid_inner_max_h],
+          [min(lid_inner_kink[1],total_len), lid_inner_min_h],
           [total_len,         lid_inner_min_h],
           [total_len,         -lid_front_wall],
           [-lid_top_wall,     -lid_front_wall]]);