+ translate([0,0,-30]) linear_extrude(height=60) {
+ translate(tile01_tr + [0, (-cutout_tile01_y + cutout_tile11_y)/2]) {
+ intersection(){
+ translate([-50, -ysz/2])
+ square([400, ysz]);
+ translate([ endrad - cutout_tile11_x - cutout_l_end_x_slop, 0 ])
+ circle(r=endrad, $fa=0.01,$fd=5);
+ }
+ }
+ }
+}
+
+module Machine_Profile(){
+ first_rear = machine_rear_profile[0];
+ below_point = 0.5 * ( first_rear + first_front ) + [ 0, -10 ];
+ pol = concat( machine_rear_profile,
+ [ below_point ],
+ machine_front_profile);
+ skew_angle = atan2( first_front[1] - first_rear[1],
+ first_front[0] - first_rear[0] );
+ echo(below_point, pol, skew_angle);
+ hull(){
+ for (z=[0,-40]) {
+ translate([0,z]) {
+ //scale([1,5])
+ rotate([0,0, -skew_angle ]){
+ //translate( - first_front )
+ polygon(pol);
+ }
+ }
+ }
+ }
+}
+
+module Machine_NewRearProfile(){
+ // figures copied out of xfig edit boxes
+ // best not to edit the posbox size if poss - just move it
+ posbox = 10 * ([7.2333,-14.1267] - [-16.2289,40.0289]); // box, Green
+ sideline = -10 * ([-6.2400,13.5600] - [-2.4467,28.2556]); // line, Blue
+ scaleline = 10 * dist2d([-1.1911,-20.4800], [-11.2600,4.0578]); // Green2
+ scaleline_mm = 12+5+10+5+3;
+ sh = -[abs(posbox[0]), abs(posbox[1])];
+ rot = atan2(-sideline[0], sideline[1]);
+ sc = scaleline_mm / scaleline;
+ echo("SH",sh,rot,sc);
+ scale(sc) rotate(rot) translate(sh){
+ import("sewing-table-rear-profile.dxf", convexity=10); // spline, Pink3
+ }
+}
+
+module Machine_NewRearCurve(){
+ slant = atan2(4,210-10);
+ echo("SL",slant);
+ translate([0,0, rearcurve_double_inrad]) rotate([slant,0,0]){
+ translate([ rearcurve_double_inrad,
+ 0,
+ -rearcurve_double_inrad + 10 ]){
+ rotate([180,0,0]) rotate([0,0,90]) linear_extrude(height=30){
+ hull(){
+ Machine_NewRearProfile();
+ translate([0,-100]) Machine_NewRearProfile();
+ }
+ }
+ }
+ rotate([0,90,0]) rotate([90,0,0]) {
+ intersection(){
+ rotate_extrude(convexity=10, $fn=64)
+ rotate(90)
+ translate([ 0, -rearcurve_double_inrad ])
+ Machine_NewRearProfile();
+ translate([0,0,-500])
+ cube([500,500,1000]);
+ }
+ }
+ translate([1,0,-rearcurve_double_inrad])
+ rotate([0,-90,0]) rotate([0,0,-90])
+ linear_extrude(height= rearcurve_strt_len + 1)
+ Machine_NewRearProfile();
+ }
+}
+
+module Machine_RearProfile(){ ////toplevel
+ intersection(){
+ Machine_Profile();
+ translate([ -200 + machine_rear_to_front/2, -100 ]) {
+ square([200,200]);
+ }
+ }
+}
+
+module Machine_FrontProfile(){
+ intersection(){
+ Machine_Profile();
+ translate([ machine_rear_to_front/2, -100 ]) {
+ square([200,200]);
+ }
+ }
+}
+
+module Machine_Curves(){ ////toplevel
+ translate([ tile01_tr[0] - cutout_l_end_x + rearedge_len,
+ cutout_tile11_y,
+ 0 ]){
+ //%cube([20,20,20]);
+ translate([ -reartablet_x,
+ -1,
+ -reartablet_z + tablet_z_slop])
+ mirror([0,0,1])
+ cube([ reartablet_x+1,
+ reartablet_y+1,
+ 20 ]);
+ }
+ translate([ tile01_tr[0] - cutout_l_end_x + rearedge_len,
+ cutout_tile11_y,
+ frontcurve_z_slop ]){
+ translate([ 0, -first_front[0] , 0 ])
+ multmatrix([[1, -frontcurve_side_skew, 0, 0],
+ [0, 1, 0, 0],
+ [0, 0, 1, 0],
+ [0, 0, 0, 1]])
+ translate([ 0, first_front[0] , 0 ])
+ mirror([1,0,0]){
+ rotate([0,-90,0])rotate([0,0,-90]){
+ linear_extrude(height= 200)
+ Machine_FrontProfile();
+ }
+ }
+ translate([ rearcurve_strt_len,
+ 0,
+ rearcurve_z_slop ]){
+ Machine_NewRearCurve();
+ }
+ }
+}
+
+module Machine(){ ////toplevel
+ Machine_Arm();
+ Machine_Curves();
+}
+