bfoz / sketch

Ruby framework for 2D mechanical sketches
3 stars 3 forks source link

Add a grid command #13

Open bfoz opened 11 years ago

bfoz commented 11 years ago

Accepts grid spacing arguments and a block. Duplicates the block with a transformation for each grid point. If the block has arity==1, then pass it the x-coordinate for each grid point and group the resulting geometry by y-value. If the block has arity==2, then pass it x and y for each grid point and put all of the generated geometry in a single group.