Skip to content

Commit

Permalink
[Rotations][Fixed] JLCPCB bottom rotations with offset
Browse files Browse the repository at this point in the history
The angle must be -angle and the X offset mirrored

See #591
  • Loading branch information
set-soft committed Mar 26, 2024
1 parent 6d73196 commit a94d09d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Netlist generation problems with components on the PCB but not in schematic.
(#578)
- Filters: _none filter not always honored (i.e. exclude in BoM) (#580)
- Filters:
- _none filter not always honored (i.e. exclude in BoM) (#580)
- Rotation for bottom JLCPCB parts with offset (#591)
- PCB Parity: components excluded from the board reported anyways (#585)
- BoardView:
- X axis mirroring issues (whitequark/kicad-boardview#11)
Expand Down
6 changes: 5 additions & 1 deletion kibot/fil_rot_footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ def apply_rotation(self, comp):
self.apply_rotation_angle(comp, 0)

def apply_offset_value(self, comp, angle, pos_offset_x, pos_offset_y):
if comp.bottom and self.mirror_bottom:
logger.debugl(2, '- applying mirror to the offset')
pos_offset_x = -pos_offset_x
angle = -angle
if angle:
rotation = radians(angle)
rsin = sin(rotation)
Expand Down Expand Up @@ -282,7 +286,7 @@ def apply_field_offset(self, comp):
pos_offset_x = -pos_offset_x
pos_offset_y = -pos_offset_y
logger.debugl(2, f'- changing to {pos_offset_x}, {pos_offset_y} mm to match signs')
self.apply_offset_value(comp, comp.offset_footprint_rot, pos_offset_x, pos_offset_y)
self.apply_offset_value(comp, comp.footprint_rot, pos_offset_x, pos_offset_y)
return True
return False

Expand Down

0 comments on commit a94d09d

Please sign in to comment.