Debian Codegraph @

py/nodes/3D → 2D/slice_xy.node

raw
1 # Neil Gershenfeld 7/12/15
2
3 import fab
4 from fab.types import Shape
5
6 title('Slice (XY)')
7
8 def slice_xy(shape,z):
9 return Shape(('mXYf%g' % z) + shape.math,
10 shape.bounds.xmin,shape.bounds.ymin,
11 shape.bounds.xmax,shape.bounds.ymax)
12
13 input('shape',fab.types.Shape)
14 input('z',float,0)
15
16 output('slice',slice_xy(shape,z))
17