// -*- C -*- main_height = 95; spike_top_width = 21.04; spike_botpos_height = 9.5; spike_botpos_width = 11.68; topwall_width = 1.5; // calculated main_width = spike_top_width + topwall_width*2; module NegativePlan(){ x4z = (spike_top_width - spike_botpos_width) / (main_height - spike_botpos_height); x0 = (spike_botpos_width - x4z * spike_botpos_height)/2; x1 = spike_top_width/2; z1 = main_height; polygon([[ x0, -5], [ x0, 0], [ x1, z1], [ x1, z1+5], [-x1, z1+5], [-x1, z1], [-x0, 0], [-x0, -5]]); } module PositivePlan(){ w = main_width; translate([ -w/2, 0 ]) square([ w, main_height ]); } module PlanTest(){ linear_extrude(height=2.0){ difference(){ PositivePlan(); NegativePlan(); } difference(){ circle(r = spike_botpos_width/2 + 5); circle(r = spike_botpos_width/2); translate([-50, 0]) square([100,50]); } } linear_extrude(height=4.0){ difference(){ translate([ -main_width/2, 0 ]) square([ main_width, 2 ]); NegativePlan(); } } } PlanTest();