py/nodes/3D → 2D/slice_yz.node
raw| 1 | # Neil Gershenfeld 7/12/15 |
| 2 | |
| 3 | import fab |
| 4 | from fab.types import Shape |
| 5 | |
| 6 | title('Slice (YZ)') |
| 7 | |
| 8 | def slice_yz(shape,x): |
| 9 | return Shape(('mf%gXY' % x) + shape.math, |
| 10 | shape.bounds.ymin,shape.bounds.zmin, |
| 11 | shape.bounds.ymax,shape.bounds.zmax) |
| 12 | |
| 13 | input('shape',fab.types.Shape) |
| 14 | input('x',float,0) |
| 15 | |
| 16 | output('slice',slice_yz(shape,x)) |
| 17 |