Cable Conceal Box
by Mach3 ·
This is a cable conceal box for a wall with customizable params like hole location and clearances.
Interactive Preview & Customizer
3D STL viewer with browser-based OpenSCAD rendering on parameter changes.
Loading preview...
Which part to display?
Total outer width
step 1
Total outer height
step 1
Total outer depth
step 1
Outer corner radius
step 1
Thickness of the walls
step 0.1
Gap between parts for fit
step 0.1
Height of the internal mounting walls
step 1
Percentage of height the hole takes
step 0.1
Position of the cable hole
Width of the rectangular snap
step 1
Vertical thickness of the snap
step 0.1
Height of the lead-in chamfer (ramp)
step 0.1
Distance from top edge for snap
step 1
WASM compiler loads on first parameter change.
Screenshots

Prompt Assets
Prompt image
Prompt
implement a cable conceal box for wall. on front part, implement small detent pockets on mount walls and detents on front part; implement small relief cuts in wall mount.
OpenSCAD Code
/* [Global] */
// Which part to display?
part = "both"; // [both:Both (Preview), wall:Wall Mount Only, cover:Front Cover Only]
// Total outer width
box_width = 80; // [40:5:200]
// Total outer height
box_height = 80; // [40:5:200]
// Total outer depth
box_depth = 30; // [10:5:100]
// Outer corner radius
corner_radius = 12; // [2:1:30]
// Thickness of the walls
wall_thickness = 2; // [1.0:0.1:5.0]
// Gap between parts for fit
clearance = 0.25; // [0.1:0.05:1.0]
/* [Wall Mount Features] */
// Height of the internal mounting walls
mount_wall_height = 15; // [10:1:40]
// Percentage of height the hole takes
hole_ratio = 0.5; // [0.1:0.05:0.8]
// Position of the cable hole
hole_alignment = "sticky"; // [centered:Centered, sticky:Sticky to Wall]
/* [Snap Mechanism] */
// Width of the rectangular snap
detent_width = 15; // [5:1:50]
// Vertical thickness of the snap
detent_thickness = 2.5; // [1:0.1:5]
// Height of the lead-in chamfer (ramp)
detent_chamfer = 1.8; // [0.5:0.1:5]
// Distance from top edge for snap
detent_offset = 6; // [3:1:20]
/* [Hidden] */
$fn = 64;
mount_w = box_width - (wall_thickness * 2) - (clearance * 2);
mount_h = box_height - (wall_thickness * 2) - (clearance * 2);
mount_r = max(1, corner_radius - wall_thickness);
hole_h = mount_h * hole_ratio;
sticky_y = (mount_h / 2) - (hole_h / 2) - (wall_thickness * 1.5);
hole_y = (hole_alignment == "sticky") ? sticky_y : 0;
// Pocket depth (doesn't go all the way through)
pocket_depth = wall_thickness * 0.7;
// Small wiggle room for the pocket
v_clearance = 0.2;
module rounded_rect_ex(w, h, d, r) {
hull() {
for (x = [-w/2+r, w/2-r])
for (y = [-h/2+r, h/2-r])
translate([x, y, 0]) cylinder(r=r, h=d);
}
}
// Simple rectangular pocket for the wall mount
module simple_pocket(w, d, h) {
cube([w + 0.4, d, h + v_clearance], center=true);
}
// The internal bar with a bottom chamfer for the cover
module chamfered_snap_bar() {
t_prot = wall_thickness * 0.6; // protrusion depth
hull() {
// Bottom "edge" (thin start of the ramp)
translate([0, 0, -detent_thickness/2])
cube([detent_width, 0.1, 0.1], center=true);
// Top "block" (full thickness)
translate([0, 0, detent_chamfer/2])
cube([detent_width, t_prot, detent_thickness - detent_chamfer], center=true);
}
}
module wall_mount() {
z_pos = wall_thickness + mount_wall_height - detent_offset;
difference() {
union() {
// Base Plate
rounded_rect_ex(mount_w, mount_h, wall_thickness, mount_r);
// Upright mounting walls
translate([0, 0, wall_thickness])
difference() {
rounded_rect_ex(mount_w, mount_h, mount_wall_height, mount_r);
translate([0, 0, -1])
rounded_rect_ex(mount_w - (wall_thickness*2), mount_h - (wall_thickness*2), mount_wall_height + 2, max(0.1, mount_r - wall_thickness));
}
}
// Main Cable Hole
translate([0, hole_y, -1])
rounded_rect_ex(mount_w * 0.7, hole_h, wall_thickness + 2, 4);
// 8-slit relief system (for wall flex)
for(x = [-1, 1]) for(y = [-1, 1]) {
translate([x * (mount_w/2 - mount_r), y * (mount_h/2 - wall_thickness/2), wall_thickness + mount_wall_height/2])
cube([1, wall_thickness + 1, mount_wall_height + 1], center=true);
translate([x * (mount_w/2 - wall_thickness/2), y * (mount_h/2 - mount_r), wall_thickness + mount_wall_height/2])
cube([wall_thickness + 1, 1, mount_wall_height + 1], center=true);
}
// Rectangular Blind Pockets on all 4 walls
for(y = [-1, 1]) translate([0, y * (mount_h/2 - wall_thickness/2 + pocket_depth/2), z_pos])
simple_pocket(detent_width, pocket_depth, detent_thickness);
for(x = [-1, 1]) translate([x * (mount_w/2 - wall_thickness/2 + pocket_depth/2), 0, z_pos])
rotate([0, 0, 90]) simple_pocket(detent_width, pocket_depth, detent_thickness);
}
}
module front_cover() {
z_pos = wall_thickness + mount_wall_height - detent_offset;
difference() {
rounded_rect_ex(box_width, box_height, box_depth, corner_radius);
translate([0, 0, -1])
rounded_rect_ex(box_width - (wall_thickness*2), box_height - (wall_thickness*2), box_depth - wall_thickness + 1, max(0.1, corner_radius - wall_thickness));
}
// Internal Detent Bars with Bottom Chamfer
for(y = [-1, 1]) translate([0, y * (box_height/2 - wall_thickness - clearance/2), z_pos])
rotate([0, 0, (y > 0) ? 180 : 0]) chamfered_snap_bar();
for(x = [-1, 1]) translate([x * (box_width/2 - wall_thickness - clearance/2), 0, z_pos])
rotate([0, 0, (x > 0) ? 90 : -90]) chamfered_snap_bar();
}
if (part == "wall") {
wall_mount();
} else if (part == "cover") {
rotate([180, 0, 0]) translate([0, 0, -box_depth]) front_cover();
} else {
color("MediumSeaGreen") wall_mount();
translate([0, 0, 15]) color("SkyBlue", 0.4) front_cover();
}