//Original: //--------------------------------------------------------- // Repy1 Modules. Version 1.2 // E PART //--------------------------------------------------------- // (c) Juan Gonzalez-Gomez (Obijuan), David Estévez (DEF) 2011 // GPL license //---------------------------------------------------------- //-- Helper function for reading parameters from the DXF E part file function E_get_parameter(name) = dxf_dim(file="part-E.dxf", name=name); //---------------------------------------- //-- REPY1 E PART //-- Parameters: // thickness. Typicall: 3 // metrics: Drills diameter. Typicall: 3 // Mod: corona_thickness. Typicall:3 //---------------------------------------- module part_E(thickness=3, corona_thickness = 3) { //-- Get the parameters from the DXF file yd1 = E_get_parameter("yd1"); yd2 = E_get_parameter("yd2"); yd3 = E_get_parameter("yd3"); ds = E_get_parameter("ds"); //-- Build the part difference() { //-- Main part: extrude the exterior. Then, extrude the extra reinforcement union() { linear_extrude(height=thickness) import(file="part-E.dxf", layer="exterior"); translate([0,0,thickness]) linear_extrude(height= corona_thickness) import(file="part-E.dxf", layer="extra_thick"); } //-- Drill translate([0,yd2,0]) cylinder(r=ds/2, h=thickness+corona_thickness+10, $fn=16, center=true); } } //-- Testing the E part part_E(thickness=3);