use ; use ; use ; // Width of the clip in mm - Make it multiples of 15 for best hole spacing width = 60; // Add holes on the top topHoles = true; // Add holes in front frontHoles = true; // Add holes in bottom slope bottomSlopeHoles = true; // Add holes on the bottom bottomHoles = true; // Width of top cable cutout in mm. Set to zero to disable. topCableCutout = 4; // Width of bottom cable cutout in mm. Set to zero to disable. bottomCableCutout = 4; /* Customizer Preview */ vwIdBuzzDashClip(width, topHoles, frontHoles, bottomSlopeHoles, bottomHoles, topCableCutout, bottomCableCutout); /* Module */ module vwIdBuzzDashClip(width, topHoles = true, frontHoles = true, bottomSlopeHoles = true, bottomHoles = true, topCableCutout = 0, bottomCableCutout = 0) { // Basic variables $fn = 32; e = 0.01; railHeight = 4; holeDistance = 15; screwDiameter = 3.5; screwHoleHeight = 1; nutDiameter = 6.5; cr = 1; // Corner radius for roundcube // Clip variables topLength = 19; bottomLength = 28; topRailHeight = 7; topLipHeight = 2; topLipLength = topLipHeight + 0.6; topLipCutoutDiameter = 8; bottomSlopeOffset = [0, 6.3, 6.3]; bottomSlopeSize = 9.2; bottomLipHeight = 6; bottomLipLength = 2; bottomIndentHeight = 4; bottomIndentDiameter = 3; frontHeight = 3 * holeDistance; fullHeight = frontHeight + bottomSlopeSize; module top() { difference() { union() { // Rail translate([0, 0, fullHeight]) mirror([0, 0, 1]) rail(w=width, l=topLength, h=topRailHeight, holes=topHoles, alignY="start"); // Lip difference() { translate([0, topLength - topLipLength, fullHeight - topRailHeight - topLipHeight]) roundcube([width, topLipLength, topLipHeight + cr], cr, top=false, bottom=false); translate([-e, topLength - topLipLength, fullHeight - topRailHeight - topLipHeight]) rotate([0, 90, 0]) cylinder(r=topLipHeight, h=width + 2 * e); } } if (frontHoles) { frontPosition() screwGrid(x=width, y=frontHeight, h=topLength, nut1=topLength, rotate=false, glitch=[0, -nutDiameter / 2, 0]); } if (topCableCutout > 0) { translate([width / 2 - topCableCutout / 2, (holeDistance - screwDiameter) / 2, fullHeight - topRailHeight - topLipHeight - e]) roundcube([topCableCutout, topCableCutout > topLength ? topCableCutout : topLength, topRailHeight + topLipHeight + 2 * e], topCableCutout / 2, rear=false, top=false, bottom=false); } } } module frontPosition() { translate([width, 0, fullHeight - frontHeight]) rotate([0, 0, 180]) rotate([90, 0, 0]) children(); } module front() { frontPosition() rail(w=width, l=frontHeight, holes=frontHoles, supports=true); } module bottomSlope() { difference() { // Rail translate(bottomSlopeOffset) rotate([-45, 0, 0]) translate([0, -holeDistance / 2, -railHeight / 2]) rail(w=width, l=holeDistance, holes=bottomSlopeHoles, supports=true); bottomCableCutout(); } } module bottomCableCutout() { if (bottomCableCutout > 0) { translate([width / 2 - bottomCableCutout / 2, bottomSlopeSize + (holeDistance - screwDiameter) / 2, -e]) roundcube([bottomCableCutout, bottomCableCutout > bottomLength ? bottomCableCutout : bottomLength, railHeight + bottomLipHeight + 2 * e], bottomCableCutout / 2, rear=false, top=false, bottom=false); } } module bottom() { difference() { union() { // Rail translate([0, bottomSlopeSize, 0]) rail(w=width, l=bottomLength - bottomSlopeSize, holes=bottomHoles, alignX="center", alignY="start", supports=true, supportHeight=bottomIndentHeight); // Bottom lip thing translate([0, bottomLength - bottomLipLength - bottomIndentDiameter - cr, railHeight - cr]) roundcube([width, bottomIndentDiameter + 2 * cr, bottomIndentHeight + cr], cr, rear=false, bottom=false); // Lip translate([0, bottomLength - bottomLipLength, railHeight - cr]) roundcube([width, bottomLipLength, bottomLipHeight + cr], cr, bottom=false); } // Bottom indentation translate([0, bottomLength - bottomLipLength - bottomIndentDiameter - cr, railHeight - cr]) translate([-e, bottomIndentDiameter / 2 + cr, bottomIndentHeight + cr]) rotate([0, 90, 0]) cylinder(d=bottomIndentDiameter, h=width + 2 * e); bottomCableCutout(); } } top(); front(); bottomSlope(); bottom(); }