Bottom side rotates still not quite right

Inverting around 360 degrees looked fine for angles, even 45 degrees and 10 degrees and so on, but turns out it actually needs inverting around 180 degrees else your diodes are all backwards. Arrrg.
This commit is contained in:
RevK
2023-06-21 11:13:11 +01:00
committed by GitHub
parent d42611753e
commit f832e4e007
+3 -3
View File
@@ -176,9 +176,9 @@ class ProcessManager:
pos_offset = ( pos_offset[0] * rcos - pos_offset[1] * rsin, pos_offset[0] * rsin + pos_offset[1] * rcos )
mid_x, mid_y = tuple(map(sum,zip((mid_x, mid_y), pos_offset)))
# JLC expect 'Rotation' to be 'as viewed from above component', so bottom needs inverting.
if layer == 'bottom' and rotation != 0:
rotation = 360.0 - rotation
# JLC expect 'Rotation' to be 'as viewed from above component', so bottom needs inverting, and ends up 180 degrees out as well
if layer == 'bottom':
rotation = (540.0 - rotation) % 360.0
self.components.append({
'Designator': designator,