Skip to content

Commit

Permalink
Add option for reversed stabs
Browse files Browse the repository at this point in the history
  • Loading branch information
nooges committed Mar 21, 2021
1 parent 2f67e8b commit 4670c95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion switch-maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,15 @@ def add_support_holes(self, fp, sw_types):
fp.append(Pad(type=Pad.TYPE_NPTH, shape=Pad.SHAPE_CIRCLE, at=hole_location, size=[
drill_size, drill_size], drill=drill_size, layers=Pad.LAYERS_NPTH))

def add_stabilizers(self, fp, sw_types):
def add_stabilizers(self, fp, sw_types, reversed=False):
for sw_type in sw_types:
for holes in [self.stabilizer_big_holes, self.stabilizer_small_holes]:
if holes.get(sw_type) is None:
continue
drill_size = holes[sw_type]['size']
for hole_location in holes[sw_type]['locations']:
if reversed:
hole_location = [hole_location[0], -hole_location[1]]
fp.append(Pad(type=Pad.TYPE_NPTH, shape=Pad.SHAPE_CIRCLE, at=hole_location, size=[
drill_size, drill_size], drill=drill_size, layers=Pad.LAYERS_NPTH))

Expand Down

0 comments on commit 4670c95

Please sign in to comment.