// SPDX-License-Identifier: LicenseRef-PD-hp OR CC0-1.0 OR 0BSD OR MIT-0 OR MIT // *haven tile connector for connecting two adjacent female tile sides. // Lengths are in inches // An inch is 25.4 mm inch = 25.4; // Wide width ww = 1.09; // Narrow width nw = 1.01; // Connector depth into tile cd = .238; // Connector thickness ct = .09; // Radius for rounded corners rr = .05; // Overlap for connecting halves and size of point objects ol = .001; // Limit to 3600 arc fragments for circles $fa = .1; // Limit fragment size to the minimum $fs = .01; // Figure out where to place circles for rounded corners // Note tan(arctan(x)/2) = (sqrt(1+x*x)-1)/x x = 2 * cd / (ww - nw); xh = (sqrt(1+x*x)-1)/x; off = xh * rr; // Define half the connector module half(sign) { linear_extrude(ct) { hull() { translate([off, sign*(cd-rr)]) {circle(rr);} translate([ww-off, sign*(cd-rr)]) {circle(rr);} // Zero size elements don't generate any points. // Use small squares inside the object we want instead. translate([(ww-nw)/2,0]) {translate([0,(sign-1)*ol/2]) {square([ol,ol]);}} translate([(ww+nw)/2,0]) {translate([-ol,(sign-1)*ol/2]) {square([ol,ol]);}} } } } // Assemble the parts scaled from inches to mm scale(inch) { half(1); half(-1); linear_extrude(ct) {translate([(ww-nw)/2,-ol]) {square([nw, 2*ol]);}}; };