Skip to content

Instantly share code, notes, and snippets.

@julik
Last active September 16, 2021 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julik/34efa08dc9e61f0cb4809e5ab80a6c0f to your computer and use it in GitHub Desktop.
Save julik/34efa08dc9e61f0cb4809e5ab80a6c0f to your computer and use it in GitHub Desktop.
mft_gap_mm = 96
offset_outer_mm = 70 # (mft_gap_mm / 2)
# Long side needs an odd number of gaps so that the center span of the
# workbench ends up between two rows of holes and never overlaps the holes
1.step(22,2) do |n_gaps_x|
1.upto(10) do |n_gaps_y|
width_mm = (offset_outer_mm * 2) + (mft_gap_mm * n_gaps_x)
height_mm = (offset_outer_mm * 2) + (mft_gap_mm * n_gaps_y)
puts "#{width_mm}x#{height_mm}mm with #{n_gaps_x + 1} holes along and #{n_gaps_y + 1} holes across"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment