diff --git a/schlib/kicad_sym.py b/schlib/kicad_sym.py index ad8ab31a..c29799d2 100644 --- a/schlib/kicad_sym.py +++ b/schlib/kicad_sym.py @@ -122,7 +122,7 @@ def as_json(self): def compare_pos(s, x, y): if 'posx' in s.__dict__ and 'posy' in s.__dict__: - return s.posx == x and s.posy == y + return round(s.posx, 6) == round(x, 6) and round(s.posy, 6) == round(y, 6) return False @classmethod diff --git a/schlib/rules/rule.py b/schlib/rules/rule.py index df4caa44..ca8b605f 100644 --- a/schlib/rules/rule.py +++ b/schlib/rules/rule.py @@ -11,7 +11,7 @@ from rulebase import * def mil_to_mm(mil): - return mil * 0.0254 + return round(mil * 0.0254, 6) def mm_to_mil(mm): return round(mm / 0.0254)