{ "nodes": [ { "datums": [ { "expr": "\u0011[__1.__4]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "21.15", "name": "x", "type": "float", "uid": 1 }, { "expr": "21.15\n\n", "name": "y", "type": "float", "uid": 2 }, { "expr": "4", "name": "n", "type": "int", "uid": 3 }, { "expr": "\u0012fab.types.Shape('iiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5',float('-1.003016'),float('-1.003016'),float('-inf'),float('43.303017'),float('43.303017'),float('inf'))", "name": "array", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -317.84366432883712, 1086.6438588403516 ], "name": "a0", "script": [ "import fab", "import math", "", "title('Array (polar)')", "", "input('shape', fab.types.Shape)", "input('x', float)", "input('y', float)", "input('n', int)", "", "output('array', fab.shapes.iterate_polar(shape, x, y, n))", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * 0.3 + x,", " math.sin(i/36. * 2*math.pi) * 0.3 + y, 0)", " for i in range(36)], close=True, color=sb.color.teal)", "", "sb.ui.point(x, y, 0, color=sb.color.teal)", "" ], "uid": 2 }, { "datums": [ { "expr": "0", "name": "x0", "type": "float", "uid": 0 }, { "expr": "0\n", "name": "y0", "type": "float", "uid": 1 }, { "expr": "42.3", "name": "x1", "type": "float", "uid": 2 }, { "expr": "42.3\n", "name": "y1", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('aa-f0X-Xf42.3a-f0Y-Yf42.3',float('0.000000'),float('0.000000'),float('-inf'),float('42.299999'),float('42.299999'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -309.52985772312252, 841.63577816541715 ], "name": "r0", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/15", "", "import fab", "", "title('Rectangle (corner)')", "", "input('x0', float)", "input('y0', float)", "input('x1', float)", "input('y1', float)", "", "output('shape', fab.shapes.rectangle(x0, x1, y0, y1))", "", "# UI", "sb.ui.wireframe([(x0, y0, 0), (x1, y0, 0),", " (x1, y1, 0), (x0, y1, 0)], close=True)", "sb.ui.point(x0, y0)", "sb.ui.point(x1, y1)", "", "" ], "uid": 0 }, { "datums": [ { "expr": "-0.971954345703125", "name": "x0", "type": "float", "uid": 0 }, { "expr": "-1.0030155181884766", "name": "y0", "type": "float", "uid": 1 }, { "expr": "5", "name": "width", "type": "float", "uid": 2 }, { "expr": "5\n", "name": "height", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5',float('-0.971954'),float('-1.003016'),float('-inf'),float('4.028046'),float('3.996984'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ -682.00686333035537, 941.16947139589035 ], "name": "r1", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/15", "", "import fab", "", "title('Right triangle')", "", "input('x0', float)", "input('y0', float)", "input('width', float)", "input('height', float)", "", "output('shape', fab.shapes.right_triangle(x0, y0, width, height))", "", "# UI", "sb.ui.wireframe([(x0, y0, 0), (x0 + width, y0, 0), (x0, y0 + height, 0)],", " close=True)", "sb.ui.point(x0, y0)", "sb.ui.point(x0 + width, y0, drag=(width, None, None))", "sb.ui.point(x0, y0 + height, drag=(None, height, None))", "", "" ], "uid": 1 }, { "datums": [ { "expr": "0.0", "name": "_x", "type": "float", "uid": 0 }, { "expr": "0.0", "name": "_y", "type": "float", "uid": 1 }, { "expr": "0", "name": "zmin", "type": "float", "uid": 2 }, { "expr": "39\n", "name": "zmax", "type": "float", "uid": 3 }, { "expr": "\u0011[__3.__2]", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 }, { "expr": "\u0012fab.types.Shape('am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('39.000000'))", "name": "out", "type": "_fabtypes.Shape", "uid": 5 } ], "inspector": [ 357.01791931125933, 1089.4551676671213 ], "name": "e0", "script": [ "import fab", "", "title('Extrude')", "", "input('_x', float)", "input('_y', float)", "input('zmin', float)", "input('zmax', float)", "", "input('shape', fab.types.Shape)", "output('out', fab.shapes.extrude_z(shape, zmin, zmax))", "", "# UI", "sb.ui.wireframe([(_x, _y, zmin), (_x, _y, zmax)], color=sb.color.green)", "sb.ui.point(_x, _y, zmin, color=sb.color.green)", "sb.ui.point(_x, _y, zmax, color=sb.color.green)", "", "" ], "uid": 4 }, { "datums": [ { "expr": "5.6\n", "name": "x0", "type": "float", "uid": 0 }, { "expr": "5.6", "name": "y0", "type": "float", "uid": 1 }, { "expr": "3", "name": "x1", "type": "float", "uid": 2 }, { "expr": "3\n", "name": "y1", "type": "float", "uid": 3 }, { "expr": "\u0012fab.types.Shape('-r+q-Xf4.3q-Yf4.3f1.83848',float('2.461522'),float('2.461522'),float('-inf'),float('6.138478'),float('6.138478'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ 1443.279363521154, 1574.3903047224255 ], "name": "c0", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 6/11/18", "", "import fab", "import math", "", "title('Circle (edge)')", "", "input('x0', float)", "input('y0', float)", "input('x1', float)", "input('y1', float)", "", "x = (x0 + x1) / 2", "y = (y0 + y1) / 2", "r = math.sqrt((x - x0)**2 + (y - y0)**2)", "", "# We could use fab.shapes.circle_edge, but we have to work out x, y, and r", "# anyways for the UI wireframe (so might as well not duplicate effort).", "output('shape', fab.shapes.circle(x, y, r))", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, 0)", " for i in range(36)], close=True)", "", "sb.ui.point(x0, y0)", "sb.ui.point(x1, y1)", "", "" ], "uid": 5 }, { "datums": [ { "expr": "21.15\n", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.15\n", "name": "y", "type": "float", "uid": 1 }, { "expr": "0.0", "name": "zmin", "type": "float", "uid": 2 }, { "expr": "41\n", "name": "zmax", "type": "float", "uid": 3 }, { "expr": "11\n", "name": "r", "type": "float", "uid": 4 }, { "expr": "\u0012fab.types.Shape('am__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41',float('10.150000'),float('10.150000'),float('0.000000'),float('32.150002'),float('32.150002'),float('41.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 5 } ], "inspector": [ 277.73157423206391, 747.24043949675354 ], "name": "c2", "script": [ "import fab", "import math", "", "title('Cylinder (Z)')", "", "input('x', float)", "input('y', float)", "input('zmin', float)", "input('zmax', float)", "input('r', float)", "", "output('shape', fab.shapes.cylinder(x, y, zmin, zmax, r))", "", "# UI", "sb.ui.wireframe([(x, y, zmin), (x, y, zmax)])", "sb.ui.wireframe([(x, y, zmin), (x+r, y, zmin)])", "", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, zmin)", " for i in range(36)], close=True)", "", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, zmax)", " for i in range(36)], close=True)", "", "sb.ui.point(x, y, zmin)", "sb.ui.point(x, y, zmax)", "sb.ui.point(x + r, y, zmin, drag=(r, None, None))", "" ], "uid": 7 }, { "datums": [ { "expr": "21.15\n", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.15\n", "name": "y", "type": "float", "uid": 1 }, { "expr": "0.0", "name": "zmin", "type": "float", "uid": 2 }, { "expr": "64\n\n\n", "name": "zmax", "type": "float", "uid": 3 }, { "expr": "\n2.5", "name": "r", "type": "float", "uid": 4 }, { "expr": "\u0012fab.types.Shape('am__f1-r+q-Xf21.15q-Yf21.15f2.5a-f0Z-Zf64',float('18.650000'),float('18.650000'),float('0.000000'),float('23.650000'),float('23.650000'),float('64.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 5 } ], "inspector": [ 1496.0509410449131, 283.74325307133978 ], "name": "spindle1", "script": [ "import fab", "import math", "", "title('Cylinder (Z)')", "", "input('x', float)", "input('y', float)", "input('zmin', float)", "input('zmax', float)", "input('r', float)", "", "output('shape', fab.shapes.cylinder(x, y, zmin, zmax, r))", "", "# UI", "sb.ui.wireframe([(x, y, zmin), (x, y, zmax)])", "sb.ui.wireframe([(x, y, zmin), (x+r, y, zmin)])", "", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, zmin)", " for i in range(36)], close=True)", "", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * r + x,", " math.sin(i/36. * 2*math.pi) * r + y, zmax)", " for i in range(36)], close=True)", "", "sb.ui.point(x, y, zmin)", "sb.ui.point(x, y, zmax)", "sb.ui.point(x + r, y, zmin, drag=(r, None, None))", "" ], "uid": 6 }, { "datums": [ { "expr": "\u0011[__7.__5]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__4.__5]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('iam__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('41.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 629.72153167007002, 850.37215023309966 ], "name": "u0", "script": [ "import fab.types", "", "title('Union')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a | b)", "" ], "uid": 8 }, { "datums": [ { "expr": "17.9791316986084", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.261201858520508", "name": "y", "type": "float", "uid": 1 }, { "expr": "53.09355926513672", "name": "z", "type": "float", "uid": 2 }, { "expr": "3.4731216430664062", "name": "width", "type": "float", "uid": 3 }, { "expr": "5.778011322021484", "name": "height", "type": "float", "uid": 4 }, { "expr": "22.979248046875", "name": "depth", "type": "float", "uid": 5 }, { "expr": "\u0012fab.types.Shape('am__f1aa-f16.2426X-Xf19.7157a-f18.3722Y-Yf24.1502a-f41.6039Z-Zf64.5832',float('16.242571'),float('18.372196'),float('41.603935'),float('19.715693'),float('24.150208'),float('64.583183'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 6 } ], "inspector": [ 1480.5836672347166, 613.96158842862599 ], "name": "spindle2", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 5/22/15", "", "import fab", "", "title('Cube (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('width', float)", "input('height', float)", "input('depth', float)", "", "xmin, xmax = x - width/2, x + width/2", "ymin, ymax = y - height/2, y + height/2", "zmin, zmax = z - depth/2, z + depth/2", "", "output('shape', fab.shapes.cube(xmin, xmax, ymin, ymax, zmin, zmax))", "", "# UI", "sb.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin),", " (xmax, ymax, zmin), (xmin, ymax, zmin)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax),", " (xmax, ymax, zmax), (xmin, ymax, zmax)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin),", " (xmin, ymax, zmax), (xmin, ymin, zmax)], close=True)", "sb.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin),", " (xmax, ymax, zmax), (xmax, ymin, zmax)], close=True)", "", "def drag_hwd(this, dx,dy,dz):", " this.width += 2*dx", " this.height += 2*dy", " this.depth += 2*dz", "", "sb.ui.point(x, y, z)", "sb.ui.point(x + width/2.0, y + height/2.0, z + depth/2.0,", " drag=drag_hwd)", "", "" ], "uid": 9 }, { "datums": [ { "expr": "\u0011[__6.__5]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__9.__6]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('aam__f1-r+q-Xf21.15q-Yf21.15f2.5a-f0Z-Zf64nam__f1aa-f16.2426X-Xf19.7157a-f18.3722Y-Yf24.1502a-f41.6039Z-Zf64.5832',float('18.650000'),float('18.650000'),float('0.000000'),float('23.650000'),float('23.650000'),float('64.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 1810.501206296512, 771.03345507886263 ], "name": "d1", "script": [ "import fab.types", "", "title('Difference')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a & ~b)", "" ], "uid": 10 }, { "datums": [ { "expr": "21.5\n", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.5\n", "name": "y", "type": "float", "uid": 1 }, { "expr": "19.5\n\n", "name": "z", "type": "float", "uid": 2 }, { "expr": "44", "name": "width", "type": "float", "uid": 3 }, { "expr": "44", "name": "height", "type": "float", "uid": 4 }, { "expr": "19", "name": "depth", "type": "float", "uid": 5 }, { "expr": "\u0012fab.types.Shape('am__f1aa-f-0.5X-Xf43.5a-f-0.5Y-Yf43.5a-f10Z-Zf29',float('-0.500000'),float('-0.500000'),float('10.000000'),float('43.500000'),float('43.500000'),float('29.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 6 } ], "inspector": [ 930.09262590267099, 988.69229977949749 ], "name": "insode0", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 5/22/15", "", "import fab", "", "title('Cube (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('width', float)", "input('height', float)", "input('depth', float)", "", "xmin, xmax = x - width/2, x + width/2", "ymin, ymax = y - height/2, y + height/2", "zmin, zmax = z - depth/2, z + depth/2", "", "output('shape', fab.shapes.cube(xmin, xmax, ymin, ymax, zmin, zmax))", "", "# UI", "sb.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin),", " (xmax, ymax, zmin), (xmin, ymax, zmin)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax),", " (xmax, ymax, zmax), (xmin, ymax, zmax)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin),", " (xmin, ymax, zmax), (xmin, ymin, zmax)], close=True)", "sb.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin),", " (xmax, ymax, zmax), (xmax, ymin, zmax)], close=True)", "", "def drag_hwd(this, dx,dy,dz):", " this.width += 2*dx", " this.height += 2*dy", " this.depth += 2*dz", "", "sb.ui.point(x, y, z)", "sb.ui.point(x + width/2.0, y + height/2.0, z + depth/2.0,", " drag=drag_hwd)", "", "" ], "uid": 12 }, { "datums": [ { "expr": "\u0011[__8.__2]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__12.__6,__14.__6,__15.__6]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('aiam__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39niiam__f1aa-f-0.5X-Xf43.5a-f-0.5Y-Yf43.5a-f10Z-Zf29am__f1aa-f10.5X-Xf32.5a-f-0.5Y-Yf43.5a-f7Z-Zf32am__f1aa-f-0.5X-Xf43.5a-f10.5Y-Yf32.5a-f7Z-Zf32',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('41.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 1304.4623314885152, 904.23357138451479 ], "name": "d2", "script": [ "import fab.types", "", "title('Difference')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a & ~b)", "" ], "uid": 13 }, { "datums": [ { "expr": "21.5\n", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.5\n", "name": "y", "type": "float", "uid": 1 }, { "expr": "19.5\n\n", "name": "z", "type": "float", "uid": 2 }, { "expr": "22", "name": "width", "type": "float", "uid": 3 }, { "expr": "44", "name": "height", "type": "float", "uid": 4 }, { "expr": "25", "name": "depth", "type": "float", "uid": 5 }, { "expr": "\u0012fab.types.Shape('am__f1aa-f10.5X-Xf32.5a-f-0.5Y-Yf43.5a-f7Z-Zf32',float('10.500000'),float('-0.500000'),float('7.000000'),float('32.500000'),float('43.500000'),float('32.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 6 } ], "inspector": [ 933.47182362577041, 1318.1391184871472 ], "name": "inside1", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 5/22/15", "", "import fab", "", "title('Cube (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('width', float)", "input('height', float)", "input('depth', float)", "", "xmin, xmax = x - width/2, x + width/2", "ymin, ymax = y - height/2, y + height/2", "zmin, zmax = z - depth/2, z + depth/2", "", "output('shape', fab.shapes.cube(xmin, xmax, ymin, ymax, zmin, zmax))", "", "# UI", "sb.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin),", " (xmax, ymax, zmin), (xmin, ymax, zmin)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax),", " (xmax, ymax, zmax), (xmin, ymax, zmax)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin),", " (xmin, ymax, zmax), (xmin, ymin, zmax)], close=True)", "sb.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin),", " (xmax, ymax, zmax), (xmax, ymin, zmax)], close=True)", "", "def drag_hwd(this, dx,dy,dz):", " this.width += 2*dx", " this.height += 2*dy", " this.depth += 2*dz", "", "sb.ui.point(x, y, z)", "sb.ui.point(x + width/2.0, y + height/2.0, z + depth/2.0,", " drag=drag_hwd)", "", "" ], "uid": 14 }, { "datums": [ { "expr": "21.5\n", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.5\n", "name": "y", "type": "float", "uid": 1 }, { "expr": "19.5\n\n", "name": "z", "type": "float", "uid": 2 }, { "expr": "44", "name": "width", "type": "float", "uid": 3 }, { "expr": "22", "name": "height", "type": "float", "uid": 4 }, { "expr": "25", "name": "depth", "type": "float", "uid": 5 }, { "expr": "\u0012fab.types.Shape('am__f1aa-f-0.5X-Xf43.5a-f10.5Y-Yf32.5a-f7Z-Zf32',float('-0.500000'),float('10.500000'),float('7.000000'),float('43.500000'),float('32.500000'),float('32.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 6 } ], "inspector": [ 928.3021879294156, 1645.0531586941809 ], "name": "inside2", "script": [ "# Neil Gershenfeld 1/24/15", "# Matt Keeter 5/22/15", "", "import fab", "", "title('Cube (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('width', float)", "input('height', float)", "input('depth', float)", "", "xmin, xmax = x - width/2, x + width/2", "ymin, ymax = y - height/2, y + height/2", "zmin, zmax = z - depth/2, z + depth/2", "", "output('shape', fab.shapes.cube(xmin, xmax, ymin, ymax, zmin, zmax))", "", "# UI", "sb.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin),", " (xmax, ymax, zmin), (xmin, ymax, zmin)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax),", " (xmax, ymax, zmax), (xmin, ymax, zmax)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin),", " (xmin, ymax, zmax), (xmin, ymin, zmax)], close=True)", "sb.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin),", " (xmax, ymax, zmax), (xmax, ymin, zmax)], close=True)", "", "def drag_hwd(this, dx,dy,dz):", " this.width += 2*dx", " this.height += 2*dy", " this.depth += 2*dz", "", "sb.ui.point(x, y, z)", "sb.ui.point(x + width/2.0, y + height/2.0, z + depth/2.0,", " drag=drag_hwd)", "", "" ], "uid": 15 }, { "datums": [ { "expr": "21.5", "name": "x", "type": "float", "uid": 0 }, { "expr": "21.5", "name": "y", "type": "float", "uid": 1 }, { "expr": "18.5\n", "name": "z", "type": "float", "uid": 2 }, { "expr": "40", "name": "width", "type": "float", "uid": 3 }, { "expr": "40\n", "name": "height", "type": "float", "uid": 4 }, { "expr": "30", "name": "depth", "type": "float", "uid": 5 }, { "expr": "0.25", "name": "r", "type": "float", "uid": 6 }, { "expr": "\u0012fab.types.Shape('iiiiiiiiiiiiiiiiiiiiiam__f1aa-f5.25X-Xf37.75a-f5.25Y-Yf37.75a-f3.5Z-Zf33.5am__f1iaa-f1.5X-Xf41.5a-f5.25Y-Yf37.75aa-f5.25X-Xf37.75a-f1.5Y-Yf41.5a-f7.25Z-Zf29.75-r++q-Xf37.75q-Yf37.75q-Zf29.75f3.75-r++q-Xf5.25q-Yf37.75q-Zf29.75f3.75-r++q-Xf37.75q-Yf5.25q-Zf29.75f3.75-r++q-Xf5.25q-Yf5.25q-Zf29.75f3.75-r++q-Xf37.75q-Yf37.75q-Zf7.25f3.75-r++q-Xf5.25q-Yf37.75q-Zf7.25f3.75-r++q-Xf37.75q-Yf5.25q-Zf7.25f3.75-r++q-Xf5.25q-Yf5.25q-Zf7.25f3.75am__f1-r+q-Xf37.75q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf37.75q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf7.25f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf7.25f3.75a-f5.25Y-Yf37.75',float('1.500000'),float('1.500000'),float('3.500000'),float('41.500000'),float('41.500000'),float('33.500000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 7 } ], "inspector": [ 1375.6462389711121, 1218.3142644260288 ], "name": "r2", "script": [ "# Neil Gershenfeld 1/24/15", "", "import fab", "", "title('Rounded cube (center)')", "", "input('x', float)", "input('y', float)", "input('z', float)", "input('width', float)", "input('height', float)", "input('depth', float)", "input('r', float)", "", "xmin, xmax = x - width/2, x + width/2", "ymin, ymax = y - height/2, y + height/2", "zmin, zmax = z - depth/2, z + depth/2", "", "# This is the circle's radius in actual units (not a 0-1 fraction)", "r_ = r * min([width, height, depth])/2", "", "output('shape', fab.shapes.rounded_cube(xmin, xmax, ymin, ymax, zmin, zmax, r))", "", "def drag_hwd(this, dx, dy, dz):", " this.width += 2*dx", " this.height += 2*dy", " this.depth += 2*dz", "", "# UI", "def drag_r(this, x, y, z):", " if abs(this.width) < abs(this.height):", " d = abs(this.width)", " mid = this.ymax + this.height/2 - d / 2", " else:", " d = abs(this.height)", " mid = this.y", " r = 1 - (y - mid) / (d/2)", " this.r = float(min(1, max(0, r)))", "", "sb.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin),", " (xmax, ymax, zmin), (xmin, ymax, zmin)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax),", " (xmax, ymax, zmax), (xmin, ymax, zmax)], close=True)", "sb.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin),", " (xmin, ymax, zmax), (xmin, ymin, zmax)], close=True)", "sb.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin),", " (xmax, ymax, zmax), (xmax, ymin, zmax)], close=True)", "sb.ui.point(x, y, z)", "sb.ui.point(x + width/2, y + height/2, z + depth/2, drag=drag_hwd)", "sb.ui.point(xmax, ymax - r_, zmax, drag=drag_r, relative=False)", "" ], "uid": 16 }, { "datums": [ { "expr": "\u0011[__13.__2,__16.__7,__10.__2]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__16.__7]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('iiiaiam__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39niiam__f1aa-f-0.5X-Xf43.5a-f-0.5Y-Yf43.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-f16.2426X-Xf19.7157a-f18.3722Y-Yf24.1502a-f41.6039Z-Zf64.5832iiiiiiiiiiiiiiiiiiiiiam__f1aa-f5.25X-Xf37.75a-f5.25Y-Yf37.75a-f3.5Z-Zf33.5am__f1iaa-f1.5X-Xf41.5a-f5.25Y-Yf37.75aa-f5.25X-Xf37.75a-f1.5Y-Yf41.5a-f7.25Z-Zf29.75-r++q-Xf37.75q-Yf37.75q-Zf29.75f3.75-r++q-Xf5.25q-Yf37.75q-Zf29.75f3.75-r++q-Xf37.75q-Yf5.25q-Zf29.75f3.75-r++q-Xf5.25q-Yf5.25q-Zf29.75f3.75-r++q-Xf37.75q-Yf37.75q-Zf7.25f3.75-r++q-Xf5.25q-Yf37.75q-Zf7.25f3.75-r++q-Xf37.75q-Yf5.25q-Zf7.25f3.75-r++q-Xf5.25q-Yf5.25q-Zf7.25f3.75am__f1-r+q-Xf37.75q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf37.75q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf7.25f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf7.25f3.75a-f5.25Y-Yf37.75',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('64.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 1704.718769812818, 1061.6212698235515 ], "name": "u1", "script": [ "import fab.types", "", "title('Union')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a | b)", "" ], "uid": 17 }, { "datums": [ { "expr": "\u0011[__0.__4]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__2.__4]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5',float('0.000000'),float('0.000000'),float('-inf'),float('42.299999'),float('42.299999'),float('inf'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 66.34876571817135, 1100.536788424803 ], "name": "d0", "script": [ "import fab.types", "", "title('Difference')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a & ~b)", "" ], "uid": 3 }, { "datums": [ { "expr": "\u0011[__5.__4]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "21.15", "name": "x", "type": "float", "uid": 1 }, { "expr": "21.15\n\n", "name": "y", "type": "float", "uid": 2 }, { "expr": "4", "name": "n", "type": "int", "uid": 3 }, { "expr": "\u0012fab.types.Shape('iiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848',float('2.461523'),float('2.461523'),float('-inf'),float('39.838478'),float('39.838478'),float('inf'))", "name": "array", "type": "_fabtypes.Shape", "uid": 4 } ], "inspector": [ 1753.121574305299, 1551.7799317433739 ], "name": "a1", "script": [ "import fab", "import math", "", "title('Array (polar)')", "", "input('shape', fab.types.Shape)", "input('x', float)", "input('y', float)", "input('n', int)", "", "output('array', fab.shapes.iterate_polar(shape, x, y, n))", "", "# UI", "sb.ui.wireframe([", " (math.cos(i/36. * 2*math.pi) * 0.3 + x,", " math.sin(i/36. * 2*math.pi) * 0.3 + y, 0)", " for i in range(36)], close=True, color=sb.color.teal)", "", "sb.ui.point(x, y, 0, color=sb.color.teal)", "" ], "uid": 19 }, { "datums": [ { "expr": "\u0011[__17.__2]", "name": "a", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0011[__19.__4]", "name": "b", "type": "_fabtypes.Shape", "uid": 1 }, { "expr": "\u0012fab.types.Shape('aiiiaiam__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39niiam__f1aa-f-0.5X-Xf43.5a-f-0.5Y-Yf43.5a-f10Z-Zf29am__f1aa-f10.5X-Xf32.5a-f-0.5Y-Yf43.5a-f7Z-Zf32am__f1aa-f-0.5X-Xf43.5a-f10.5Y-Yf32.5a-f7Z-Zf32iiiiiiiiiiiiiiiiiiiiiam__f1aa-f5.25X-Xf37.75a-f5.25Y-Yf37.75a-f3.5Z-Zf33.5am__f1iaa-f1.5X-Xf41.5a-f5.25Y-Yf37.75aa-f5.25X-Xf37.75a-f1.5Y-Yf41.5a-f7.25Z-Zf29.75-r++q-Xf37.75q-Yf37.75q-Zf29.75f3.75-r++q-Xf5.25q-Yf37.75q-Zf29.75f3.75-r++q-Xf37.75q-Yf5.25q-Zf29.75f3.75-r++q-Xf5.25q-Yf5.25q-Zf29.75f3.75-r++q-Xf37.75q-Yf37.75q-Zf7.25f3.75-r++q-Xf5.25q-Yf37.75q-Zf7.25f3.75-r++q-Xf37.75q-Yf5.25q-Zf7.25f3.75-r++q-Xf5.25q-Yf5.25q-Zf7.25f3.75am__f1-r+q-Xf37.75q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf37.75f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf29.75f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf29.75f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf37.75q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf37.75q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf37.75q-Zf7.25f3.75a-f5.25Y-Yf37.75am__f1-r+q-Xf5.25q-Yf5.25f3.75a-f7.25Z-Zf29.75a-r+q-Yf5.25q-Zf7.25f3.75a-f5.25X-Xf37.75a-r+q-Xf5.25q-Zf7.25f3.75a-f5.25Y-Yf37.75aam__f1-r+q-Xf21.15q-Yf21.15f2.5a-f0Z-Zf64nam__f1aa-f16.2426X-Xf19.7157a-f18.3722Y-Yf24.1502a-f41.6039Z-Zf64.5832iiiiiiiiiiiiiiiiiiiiiam__f1aa-f5.25X-Xf37.75a-f5.25Y-Yf37.75a-f3.5Z-Zf33.5am__f1iaa-f1.5X-Xf41.5a-f5.25Y-Yf37.75aa-f5.25X-Xf37.75a-f1.5Y-Yf41.5a-f7.25Z-Zf29.75-r++q-Xf37.75q-Yf37.75q-Zf29.75f3.75-r++q-Xf5.25q-Yf37.75q-Zf29.75f3.75-r++q-Xf37.75q-Yf5.25q-Zf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-Yf4.3f1.83848',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('64.000000'))", "name": "shape", "type": "_fabtypes.Shape", "uid": 2 } ], "inspector": [ 2061.4143837305451, 1504.5760309516043 ], "name": "d3", "script": [ "import fab.types", "", "title('Difference')", "input('a', fab.types.Shape)", "input('b', fab.types.Shape)", "", "output('shape', a & ~b)", "" ], "uid": 18 }, { "datums": [ { "expr": "\u0011[__18.__2]", "name": "shape", "type": "_fabtypes.Shape", "uid": 0 }, { "expr": "\u0012fab.types.Shape('aiiiaiam__f1-r+q-Xf21.15q-Yf21.15f11a-f0Z-Zf41am__f1aaa-f0X-Xf42.3a-f0Y-Yf42.3niiim-Xf21.15-Yf21.15-Zf0m+*f1X*f0Y+*f-0X*f1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f6.12323e-17X*f1Y+*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0aa*f1-f-0.971954X*f1-f-1.00302Y*f1-X/+*f-0.971954-Yf-1.00302*+f-0.971954f5-+f-1.00302f5Yf5a-f0Z-Zf39niiam__f1aa-f-0.5X-Xf43.5a-f-0.5Y-Yf43.5a-f10Z-Zf29am__f1aa-f10.5X-Xf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*f-1X*f6.12323e-17Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848m-Xf21.15-Yf21.15-Zf0m+*f-1X*f1.22465e-16Y+*f-1.22465e-16X*f-1Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848m-Xf21.15-Yf21.15-Zf0m+*f-1.83697e-16X*f-1Y+*f1X*f-1.83697e-16Y_m-Xf-21.15-Yf-21.15-Zf0-r+q-Xf4.3q-Yf4.3f1.83848',float('0.000000'),float('0.000000'),float('0.000000'),float('42.299999'),float('42.299999'),float('64.000000'))", "name": "out", "type": "_fabtypes.Shape", "uid": 1 } ], "inspector": [ 2376.7338913048516, 1508.1069310297601 ], "name": "m0", "script": [ "import fab", "", "title('Mesh (.stl)')", "", "input('shape', fab.types.Shape)", "output('out', shape)", "", "sb.export.stl(shape)", "" ], "uid": 20 } ], "protocol": 6, "type": "sb" }