summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gerbonara/cad/kicad/footprints.py6
-rw-r--r--gerbonara/cad/primitives.py3
-rw-r--r--gerbonara/cad/protoboard.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/gerbonara/cad/kicad/footprints.py b/gerbonara/cad/kicad/footprints.py
index 9debaa9..31a5f33 100644
--- a/gerbonara/cad/kicad/footprints.py
+++ b/gerbonara/cad/kicad/footprints.py
@@ -908,7 +908,7 @@ class Footprint:
for fe in obj.render(variables=variables):
fe.rotate(rotation)
- fe.offset(x, -y, MM)
+ fe.offset(x, y, MM)
layer_stack[layer].objects.append(fe)
for obj in self.pads:
@@ -940,7 +940,7 @@ class Footprint:
for fe in obj.render(margin=margin, cache=cache):
fe.rotate(rotation)
- fe.offset(x, -y, MM)
+ fe.offset(x, y, MM)
if isinstance(fe, go.Flash) and fe.aperture:
fe.aperture = fe.aperture.rotated(rotation)
layer_stack[layer_map[layer]].objects.append(fe)
@@ -948,7 +948,7 @@ class Footprint:
for obj in self.pads:
for fe in obj.render_drill():
fe.rotate(rotation)
- fe.offset(x, -y, MM)
+ fe.offset(x, y, MM)
if obj.type == Atom.np_thru_hole:
layer_stack.drill_npth.append(fe)
diff --git a/gerbonara/cad/primitives.py b/gerbonara/cad/primitives.py
index 82c06e1..591999c 100644
--- a/gerbonara/cad/primitives.py
+++ b/gerbonara/cad/primitives.py
@@ -118,7 +118,7 @@ class Board:
def layer_stack(self, layer_stack=None):
if layer_stack is None:
- layer_stack = LayerStack()
+ layer_stack = LayerStack(board_name='proto')
cache = {}
for obj in chain(self.objects):
@@ -127,6 +127,7 @@ class Board:
layer_stack['mechanical', 'outline'].objects.extend(self.outline)
layer_stack['top', 'silk'].objects.extend(self.extra_silk_top)
layer_stack['bottom', 'silk'].objects.extend(self.extra_silk_bottom)
+ print('layer stack is', repr(layer_stack['top', 'copper'].objects)[:1000])
return layer_stack
diff --git a/gerbonara/cad/protoboard.py b/gerbonara/cad/protoboard.py
index f009e7a..0a5bbbe 100644
--- a/gerbonara/cad/protoboard.py
+++ b/gerbonara/cad/protoboard.py
@@ -538,7 +538,7 @@ class SpikyProto(ObjectGroup):
self.fp_between = kfp.Footprint.load(res.joinpath('pad-between-spiked.kicad_mod').read_text(encoding='utf-8'))
self.right_pad = kfp.FootprintInstance(1.27, 0, self.fp_between, unit=MM)
- self.top_pad = kfp.FootprintInstance(0, 1.27, self.fp_between, rotation=math.pi/2, unit=MM)
+ self.top_pad = kfp.FootprintInstance(0, 1.27, self.fp_between, rotation=-math.pi/2, unit=MM)
@property
def objects(self):