include module old_rim() { color("#2C3863") { hull() { translate([WALL + FLANGE_W - SLIDE_CLEAR - 0.01, 0, 0]) cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]); translate([WALL + SLIDE_CLEAR, 0, -0.005]) cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]); } hull() { translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, 0, 0]) cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]); translate([OUT_L - WALL - SLIDE_CLEAR - 0.01, 0, -0.005]) cube([0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0.01]); } translate([WALL + FLANGE_W - SLIDE_CLEAR, 0, 0]) cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]); translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR - 2.0, 0, 0]) cube([2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, FLANGE_H]); hull() { translate([FLANGE_W - SLIDE_CLEAR + 2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR - 0.01, 0]) cube([OUT_L - 2*(FLANGE_W - SLIDE_CLEAR + 2.0), 0.01, FLANGE_H - SLIDE_CLEAR]); translate([FLANGE_W - SLIDE_CLEAR + 2.0, LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005]) cube([OUT_L - 2*(FLANGE_W - SLIDE_CLEAR + 2.0), 0.01, 0.01]); } translate([FLANGE_W - SLIDE_CLEAR + 2.0, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR - 2.0, 0]) cube([OUT_L - 2*(FLANGE_W - SLIDE_CLEAR + 2.0), 2.0, FLANGE_H]); intersection() { hull() { translate([WALL + FLANGE_W - SLIDE_CLEAR - 0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0]) cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]); translate([WALL + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, -0.005]) cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, 0.01]); } hull() { translate([WALL + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0]) cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, FLANGE_H - SLIDE_CLEAR]); translate([WALL + SLIDE_CLEAR, LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005]) cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, 0.01]); } } intersection() { hull() { translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0]) cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, FLANGE_H - SLIDE_CLEAR]); translate([OUT_L - WALL - SLIDE_CLEAR - 0.01, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, -0.005]) cube([0.01, FLANGE_W - 2*SLIDE_CLEAR, 0.01]); } hull() { translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - FLANGE_W + SLIDE_CLEAR, 0]) cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, FLANGE_H - SLIDE_CLEAR]); translate([OUT_L - WALL - FLANGE_W + SLIDE_CLEAR, LID_Y_LEN - SLIDE_CLEAR - 0.01, -0.005]) cube([FLANGE_W - 2*SLIDE_CLEAR, 0.01, 0.01]); } } } } RIB = 2.0; module ring(x0, x1, y1, h, run) { translate([x0, 0, 0]) diff() cuboid([x1 - x0, y1, h], anchor=BOTTOM+FRONT+LEFT) { if (run > 0) edge_profile_asym([TOP+LEFT, TOP+RIGHT, TOP+BACK], corner_type="chamfer") mask2d_chamfer(x=run, y=h); tag("remove") position(BOTTOM+FRONT+LEFT) translate([run, -0.1, -0.1]) cuboid([(x1 - x0) - 2*run, y1 - run + 0.1, h + 0.2], anchor=BOTTOM+FRONT+LEFT); } } module new_rim() { color("#2C3863") { ring(WALL + SLIDE_CLEAR, OUT_L - WALL - SLIDE_CLEAR, LID_Y_LEN, FLANGE_H - SLIDE_CLEAR, FLANGE_W); ring(WALL + SLIDE_CLEAR + FLANGE_W, OUT_L - WALL - SLIDE_CLEAR - FLANGE_W, LID_Y_LEN, FLANGE_H, RIB); } } // ============================================================ // RENDER — old (hand-rolled) vs new (BOSL2 cuboid+chamfer) // ============================================================ old_rim(); translate([0, LID_Y_LEN + 15, 0]) new_rim();