// Original unbuilt concept. Units mm. No physical fit, strength or performance validation. // Part dimensions and assembly positions are editable below. STL exports were generated // by the companion Python mesh generator; OpenSCAD was not available for compile verification. // Teal component envelopes are optional references; exclude from fabrication. part="assembly"; // or exact part name show_envelopes=true; explode=0; // 0 assembled, 1 exploded $fn=64; function rr(l,w,r,n=8)=[for(q=[0:3],i=[0:n-1]) let(a=q*90+i*90/n, x=(q==0||q==3)?l/2-r:-l/2+r, y=(q<2)?w/2-r:-w/2+r) [x+r*cos(a),y+r*sin(a)]]; module shape(kind,d){ if(kind=="round") cylinder(d=d[0],h=d[1]); else if(kind=="ring") difference(){cylinder(d=d[0],h=d[2]);translate([0,0,-0.01])cylinder(d=d[1],h=d[2]+0.02);} else if(kind=="cup") difference(){cylinder(d=d[0],h=d[2]);translate([0,0,d[3]])cylinder(d=d[1],h=d[2]);} else if(kind=="slab")linear_extrude(d[3])polygon(rr(d[0],d[1],d[2])); else if(kind=="frame")linear_extrude(d[3])difference(){polygon(rr(d[0],d[1],d[2]));polygon(rr(d[0]-2*d[4],d[1]-2*d[4],max(.5,d[2]-d[4])));} else if(kind=="wedge")linear_extrude(d[2])polygon([[-d[0]/2,0],[d[0]/2,0],[d[0]/2,d[1]]]); else if(kind=="triangle")linear_extrude(d[6])polygon([[d[0],d[1]],[d[2],d[3]],[d[4],d[5]]]); } // front_rail / concept_part d0=[260, 12, 3, 8]; pos0=[0, -28, 0]; // rear_rail / concept_part d1=[260, 12, 3, 8]; pos1=[0, 28, 0]; // left_crossbar / concept_part d2=[18, 80, 4, 5]; pos2=[-115, 0, 0]; // right_crossbar / concept_part d3=[18, 80, 4, 5]; pos3=[115, 0, 0]; // left_carriage / concept_part d4=[60, 74, 8, 5]; pos4=[-60, 0, 8]; // right_carriage / concept_part d5=[60, 74, 8, 5]; pos5=[60, 0, 8]; // left_contact_ring / concept_part d6=[38, 30, 2]; pos6=[-60, 0, 13]; // left_shell / concept_part d7=[38, 32, 12]; pos7=[-60, 0, 15]; // left_sensor_envelope / component_envelope d8=[20, 2]; pos8=[-60, 0, 15]; // left_lid / concept_part d9=[38, 6, 2]; pos9=[-60, 0, 27]; // left_cable_boss / concept_part d10=[10, 6, 6]; pos10=[-60, 0, 29]; // right_contact_ring / concept_part d11=[38, 30, 2]; pos11=[60, 0, 13]; // right_shell / concept_part d12=[38, 32, 12]; pos12=[60, 0, 15]; // right_sensor_envelope / component_envelope d13=[20, 2]; pos13=[60, 0, 15]; // right_lid / concept_part d14=[38, 6, 2]; pos14=[60, 0, 27]; // right_cable_boss / concept_part d15=[10, 6, 6]; pos15=[60, 0, 29]; if(part=="front_rail")shape("slab",d0); if(part=="assembly" && true)color([0.3058823529411765, 0.45098039215686275, 0.38823529411764707])translate(pos0+[0,0,explode*0])rotate([0, 0, 0])shape("slab",d0); if(part=="rear_rail")shape("slab",d1); if(part=="assembly" && true)color([0.3058823529411765, 0.45098039215686275, 0.38823529411764707])translate(pos1+[0,0,explode*0])rotate([0, 0, 0])shape("slab",d1); if(part=="left_crossbar")shape("slab",d2); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos2+[0,0,explode*0])rotate([0, 0, 0])shape("slab",d2); if(part=="right_crossbar")shape("slab",d3); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos3+[0,0,explode*0])rotate([0, 0, 0])shape("slab",d3); if(part=="left_carriage")shape("slab",d4); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos4+[0,0,explode*8])rotate([0, 0, 0])shape("slab",d4); if(part=="right_carriage")shape("slab",d5); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos5+[0,0,explode*8])rotate([0, 0, 0])shape("slab",d5); if(part=="left_contact_ring")shape("ring",d6); if(part=="assembly" && true)color([0.8941176470588236, 0.7843137254901961, 0.6352941176470588])translate(pos6+[0,0,explode*0])rotate([0, 0, 0])shape("ring",d6); if(part=="left_shell")shape("ring",d7); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos7+[0,0,explode*9])rotate([0, 0, 0])shape("ring",d7); if(part=="left_sensor_envelope")shape("round",d8); if(part=="assembly" && show_envelopes)color([0.4745098039215686, 0.7137254901960784, 0.7372549019607844])translate(pos8+[0,0,explode*14])rotate([0, 0, 0])shape("round",d8); if(part=="left_lid")shape("ring",d9); if(part=="assembly" && true)color([0.3058823529411765, 0.45098039215686275, 0.38823529411764707])translate(pos9+[0,0,explode*25])rotate([0, 0, 0])shape("ring",d9); if(part=="left_cable_boss")shape("ring",d10); if(part=="assembly" && true)color([0.9294117647058824, 0.6549019607843137, 0.4823529411764706])translate(pos10+[0,0,explode*32])rotate([0, 0, 0])shape("ring",d10); if(part=="right_contact_ring")shape("ring",d11); if(part=="assembly" && true)color([0.8941176470588236, 0.7843137254901961, 0.6352941176470588])translate(pos11+[0,0,explode*0])rotate([0, 0, 0])shape("ring",d11); if(part=="right_shell")shape("ring",d12); if(part=="assembly" && true)color([0.7019607843137254, 0.8941176470588236, 0.7725490196078432])translate(pos12+[0,0,explode*9])rotate([0, 0, 0])shape("ring",d12); if(part=="right_sensor_envelope")shape("round",d13); if(part=="assembly" && show_envelopes)color([0.4745098039215686, 0.7137254901960784, 0.7372549019607844])translate(pos13+[0,0,explode*14])rotate([0, 0, 0])shape("round",d13); if(part=="right_lid")shape("ring",d14); if(part=="assembly" && true)color([0.3058823529411765, 0.45098039215686275, 0.38823529411764707])translate(pos14+[0,0,explode*25])rotate([0, 0, 0])shape("ring",d14); if(part=="right_cable_boss")shape("ring",d15); if(part=="assembly" && true)color([0.9294117647058824, 0.6549019607843137, 0.4823529411764706])translate(pos15+[0,0,explode*32])rotate([0, 0, 0])shape("ring",d15);