diff --git a/CHANGELOG.md b/CHANGELOG.md index d2a728cd..3d07f369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Now you can nest imports (import from an imported file) (#218) - Preflights can be imported (#181) +### Fixed +- OAR computation (Report) + ## [1.2.0] - 2022-06-15 ### Added diff --git a/kibot/out_report.py b/kibot/out_report.py index 39925126..48d2139a 100644 --- a/kibot/out_report.py +++ b/kibot/out_report.py @@ -521,7 +521,7 @@ class ReportOptions(BaseOptions): via_id = (via.GetDrill(), via.GetWidth()) self._vias[via_id] = self._vias.get(via_id, 0) + 1 d = adjust_drill(via_id[0]) - self.oar_vias = min(self.oar_vias, via_id[1] - d) + self.oar_vias = min(self.oar_vias, (via_id[1] - d) / 2) self._drills_real[d] = self._drills_real.get(d, 0) + 1 self.track_min = min(self.track_d, self.track) ########################################################### @@ -580,8 +580,8 @@ class ReportOptions(BaseOptions): # print('{} @ {}'.format(dr, pad.GetPosition())) self._drills_real[d_r] = self._drills_real.get(d_r, 0) + 1 pad_sz = pad.GetSize() - oar_x = pad_sz.x - dr_x_real - oar_y = pad_sz.y - dr_y_real + oar_x = (pad_sz.x - dr_x_real) / 2 + oar_y = (pad_sz.y - dr_y_real) / 2 oar_t = min(oar_x, oar_y) if oar_t > 0: self.oar_pads = min(self.oar_pads, oar_t) @@ -636,7 +636,7 @@ class ReportOptions(BaseOptions): h = v.m_Drill if not d and not h: continue # KiCad 6 - self.oar_vias_d = min(self.oar_vias_d, d - adjust_drill(h)) + self.oar_vias_d = min(self.oar_vias_d, (d - adjust_drill(h)) / 2) self._vias_defined.add((h, d)) self._via_sizes_sorted.append((h, d)) ########################################################### diff --git a/tests/reference/5_1_6/light_control-report.txt b/tests/reference/5_1_6/light_control-report.txt index de340131..85f9a55e 100644 --- a/tests/reference/5_1_6/light_control-report.txt +++ b/tests/reference/5_1_6/light_control-report.txt @@ -38,11 +38,11 @@ Via: 0.51/0.25 mm (20/10 mils) - Micro via: no [0.2/0.1 mm (8/4 mils)] - Burried/blind via: no -Outer Annular Ring: 0.16 mm (6 mils) +Outer Annular Ring: 0.08 mm (3 mils) -- By design rules: 0.16 mm (6 mils) +- By design rules: 0.08 mm (3 mils) -Eurocircuits class: 6C +Eurocircuits class: 10C # General stats diff --git a/tests/reference/5_1_6/light_control-report.txt_2 b/tests/reference/5_1_6/light_control-report.txt_2 index de340131..85f9a55e 100644 --- a/tests/reference/5_1_6/light_control-report.txt_2 +++ b/tests/reference/5_1_6/light_control-report.txt_2 @@ -38,11 +38,11 @@ Via: 0.51/0.25 mm (20/10 mils) - Micro via: no [0.2/0.1 mm (8/4 mils)] - Burried/blind via: no -Outer Annular Ring: 0.16 mm (6 mils) +Outer Annular Ring: 0.08 mm (3 mils) -- By design rules: 0.16 mm (6 mils) +- By design rules: 0.08 mm (3 mils) -Eurocircuits class: 6C +Eurocircuits class: 10C # General stats diff --git a/tests/reference/5_1_6/light_control-report_simple.txt b/tests/reference/5_1_6/light_control-report_simple.txt index d58aa6bc..8ae8acda 100644 --- a/tests/reference/5_1_6/light_control-report_simple.txt +++ b/tests/reference/5_1_6/light_control-report_simple.txt @@ -3,7 +3,7 @@ Size: - 59.69x48.26 mm -Class: 6C +Class: 10C Track width: ≥ 0.15 mm @@ -13,7 +13,7 @@ Minimum drill size: ≥ 0.35 mm (finished metalized hole: 0.25 mm) Minimum slot width: ≥ 0.6 mm -Ring collar: ≥ 0.16 mm +Ring collar: ≥ 0.08 mm Materials: diff --git a/tests/reference/6_0_4/light_control-report.txt b/tests/reference/6_0_4/light_control-report.txt index 5029e518..b0dff466 100644 --- a/tests/reference/6_0_4/light_control-report.txt +++ b/tests/reference/6_0_4/light_control-report.txt @@ -63,11 +63,11 @@ Via: 0.51/0.25 mm (20/10 mils) - Micro via: no [0.2/0.1 mm (8/4 mils)] - Burried/blind via: no -Outer Annular Ring: 0.16 mm (6 mils) +Outer Annular Ring: 0.08 mm (3 mils) -- By design rules: 0.16 mm (6 mils) +- By design rules: 0.08 mm (3 mils) -Eurocircuits class: 6C +Eurocircuits class: 10C # General stats diff --git a/tests/reference/6_0_4/light_control-report_simple.txt b/tests/reference/6_0_4/light_control-report_simple.txt index 4f8b4f23..9c88fd56 100644 --- a/tests/reference/6_0_4/light_control-report_simple.txt +++ b/tests/reference/6_0_4/light_control-report_simple.txt @@ -3,7 +3,7 @@ Size: - 59.69x48.26 mm -Class: 6C +Class: 10C Track width: ≥ 0.15 mm @@ -13,7 +13,7 @@ Minimum drill size: ≥ 0.35 mm (finished metalized hole: 0.25 mm) Minimum slot width: ≥ 0.6 mm -Ring collar: ≥ 0.16 mm +Ring collar: ≥ 0.08 mm Special features: