// Very simple capacitor model, 0402 size overall_length = 1.05; contact_length = 0.3; width = 0.55; height = 0.55; body_colour = [0.6, 0.6, 0]; contact_colour = [0.7, 0.7, 0.7]; // Central body cube translate([0, 0, height / 2]){ color(body_colour){ cube([overall_length - (2 * contact_length), width, height], true); } } // Left contact cube translate([-(overall_length - contact_length) / 2, 0, height / 2]){ color(contact_colour){ cube([contact_length, width, height], true); } } // Right contact cube translate([(overall_length - contact_length) / 2, 0, height / 2]){ color(contact_colour){ cube([contact_length, width, height], true); } }