Skip to content

Commit

Permalink
Fix front panel rectangular hole
Browse files Browse the repository at this point in the history
We didn't check for rotation. This commit fixes that.
  • Loading branch information
ohmtech-rdi committed Dec 27, 2023
1 parent a914e89 commit 7f30578
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build-system/erbui/generators/front_panel/dxf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,14 @@ def generate_control_part (self, msp, control, part):
)

elif isinstance (gr_shape, pcb.GrRect) and gr_shape.layer == 'Eco1.User':
start_x = min (gr_shape.start.x, gr_shape.end.x)
end_x = max (gr_shape.start.x, gr_shape.end.x)
start_y = min (gr_shape.start.y, gr_shape.end.y)
end_y = max (gr_shape.start.y, gr_shape.end.y)
self.add_rounded_rectangle (
msp,
gr_shape.start.x, PANEL_HEIGHT - gr_shape.start.y,
gr_shape.end.x, PANEL_HEIGHT - gr_shape.end.y,
start_x, PANEL_HEIGHT - start_y,
end_x, PANEL_HEIGHT - end_y,
1.5 # drill bit 3mm
)

Expand Down

0 comments on commit 7f30578

Please sign in to comment.