// Snap-in Cable Clip for 6 mm Cable // Fully parametric design with lead-in funnel and adhesive base /* [Main Parameters] */ // Cable diameter to secure (mm) cable_diameter = 6.0; // [3.0:0.5:16.0] /* [Base Dimensions] */ // Base width across the cable (mm) base_width = 20.0; // [10.0:1.0:40.0] // Base length along the cable (mm) base_length = 12.0; // [6.0:1.0:40.0] // Base plate thickness (mm) base_thickness = 2.0; // [1.0:0.2:5.0] // Corner rounding radius on base (mm) base_corner_radius = 2.5; // [1.0:0.5:5.0] // Chamfer on top edge of base (mm) base_top_chamfer = 0.5; // [0.0:0.1:1.2] /* [Clip Arm Parameters] */ // Snap opening throat width (mm) opening_width = 5.5; // [2.0:0.1:14.0] // Wall thickness of the C-arm (mm) wall_thickness = 1.6; // [1.0:0.1:3.5] // Length of the gripping clip along the cable (mm) clip_length = 12.0; // [6.0:1.0:30.0] // Outward flare angle for snap lead-in (degrees) flare_angle = 32.0; // [15.0:1.0:45.0] // Lead-in funnel lip height (mm) flare_length = 1.4; // [0.5:0.1:3.0] // Fillet radius at base-to-arm junction (mm) base_fillet_radius = 1.8; // [0.5:0.1:3.5] // Bevel/chamfer on front and back cable rims (mm) rim_bevel = 0.6; // [0.0:0.1:1.5] /* [Features] */ // Deboss cable diameter text on base wing show_size_label = true; /* [Appearance] */ clip_color = "DeepSkyBlue"; base_color = "SteelBlue"; label_color = "AliceBlue"; /* [Quality] */ $fn = 64; // --- Derived Calculations --- inner_radius = cable_diameter / 2; outer_radius = inner_radius + wall_thickness; mid_radius = inner_radius + wall_thickness / 2; // Center of the cable pocket in Z center_z = base_thickness + outer_radius; // Half opening at throat half_throat = min(opening_width / 2, inner_radius * 0.98); // Throat angle from vertical (+Z) throat_angle = asin(half_throat / inner_radius); // Centerline arc limits (angle from bottom 0 to max) beta_max = 180 - throat_angle; // Arc resolution num_arc_pts = 36; // Centerline arc points arc_points = [ for (i = [0 : num_arc_pts]) let(b = -beta_max + (2 * beta_max * i / num_arc_pts)) [mid_radius * sin(b), center_z - mid_radius * cos(b)] ]; // Flare tips extending outward right_neck_pt = arc_points[num_arc_pts]; right_tip_pt = [ right_neck_pt[0] + flare_length * sin(flare_angle), right_neck_pt[1] + flare_length * cos(flare_angle) ]; left_neck_pt = arc_points[0]; left_tip_pt = [ -right_tip_pt[0], right_tip_pt[1] ]; // Complete path of the C-arm centerline centerline_pts = concat([left_tip_pt], arc_points, [right_tip_pt]); // --- Main Model Assembly --- union() { // Base plate color(base_color) base_plate(); // C-shaped gripping arm with fillets and chamfered rims color(clip_color) clip_arm_assembly(); } // --- Modules --- // Flat adhesive base with rounded corners and top chamfer module base_plate() { difference() { hull() { for (sx = [-1, 1]) { for (sy = [-1, 1]) { translate([ sx * (base_width / 2 - base_corner_radius), sy * (base_length / 2 - base_corner_radius), 0 ]) { cylinder( r1 = base_corner_radius, r2 = max(0.5, base_corner_radius - base_top_chamfer), h = base_thickness ); } } } } // Optional size marking debossed on right wing if (show_size_label && (base_width / 2 - outer_radius) > 2.5) { translate([ (base_width / 2 + outer_radius) / 2, 0, base_thickness - 0.3 ]) { linear_extrude(height = 0.5) { rotate([0, 0, 90]) text( str(cable_diameter, "mm"), size = min(2.5, base_length * 0.3), halign = "center", valign = "center", font = "Liberation Sans:style=Bold" ); } } } } } // 2D cross section of the C-arm module arm_cross_section_2d() { for (i = [0 : len(centerline_pts) - 2]) { hull() { translate(centerline_pts[i]) circle(d = wall_thickness, $fn = 32); translate(centerline_pts[i + 1]) circle(d = wall_thickness, $fn = 32); } } } // 2D fillet wedge between outer circle and base module fillet_wedge_2d(side = 1) { // Tangent fillet radius rf = base_fillet_radius; zf = base_thickness + rf; delta_z = zf - center_z; rad_sum = outer_radius + rf; if (rad_sum > abs(delta_z)) { xf = sqrt(pow(rad_sum, 2) - pow(delta_z, 2)); // Wedge area between clip and base translate([side * xf, zf]) difference() { // Triangular / rectangular filling envelope translate([side > 0 ? -xf : 0, -rf]) square([xf, rf + 0.01]); // Concave fillet cutout circle(r = rf, $fn = 32); } } } // Complete C-shaped arm assembly extruded along Y with rim bevels module clip_arm_assembly() { difference() { // Main extruded arm with transition fillets translate([0, -clip_length / 2, 0]) rotate([-90, 0, 0]) linear_extrude(height = clip_length) { arm_cross_section_2d(); fillet_wedge_2d(side = 1); fillet_wedge_2d(side = -1); } // Clean out the inner cylindrical cable bore translate([0, -clip_length, center_z]) rotate([-90, 0, 0]) cylinder(r = inner_radius, h = clip_length * 2, $fn = 64); // Front and back rim lead-in bevels to prevent cable chafing if (rim_bevel > 0) { // Front rim bevel translate([0, -clip_length / 2, center_z]) rotate([-90, 0, 0]) cylinder( r1 = inner_radius + rim_bevel, r2 = inner_radius, h = rim_bevel + 0.05, $fn = 48 ); // Back rim bevel translate([0, clip_length / 2 - rim_bevel, center_z]) rotate([-90, 0, 0]) cylinder( r1 = inner_radius, r2 = inner_radius + rim_bevel, h = rim_bevel + 0.05, $fn = 48 ); } } }