kicad_mmccoo icon indicating copy to clipboard operation
kicad_mmccoo copied to clipboard

Exception on python action plugin code

Open arcticlinux opened this issue 6 years ago • 3 comments

When I try to use the Orient the selected modules to underlying graphics, when I have my non straight box placement I get an error. Sample graphic attached.

1_4 sample arcs v4

Exception on python action plugin code

Traceback (most recent call last):

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_plugins.py", line 151, in Run break_curves=True)

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_utils.py", line 554, in traverse_graphics merged = merge_arcs_and_lines(merge_elts)

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_utils.py", line 329, in merge_arcs_and_lines remove_non_duals(e)

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_utils.py", line 307, in remove_non_duals remove_non_duals(other)

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_utils.py", line 307, in remove_non_duals remove_non_duals(other)

File "/home/mbest/.kicad_plugins/kicad_mmccoo/dxf_stuff/dxf_utils.py", line 306, in remove_non_duals other.other.remove(e)

File "/usr/lib/python2.7/sets.py", line 518, in remove del self._data[element]

KeyError: <kicad_mmccoo.dxf_stuff.dxf_utils.myline instance at 0x7fb16c2bce18>

arcticlinux avatar Sep 09 '18 03:09 arcticlinux

Discovered the problem is there are a ton of extra line segments in my sketch/dxf overlapping in the polygons and the the other.other.remove(e) call in dxf_stuff.dxf_utils.remove_non_duals somehow causes this exception, but if I go and remove the extra line segments it works fine.

arcticlinux avatar Sep 09 '18 03:09 arcticlinux

I'm not entirely surprised. I've been wanting to rework some of the polygon stuff. Any chance I can get a copy of the dxf?

On Sun, 9 Sep 2018 at 05:14, Michael Best [email protected] wrote:

Discovered the problem is there are a ton of extra line segments in my sketch/dxf overlapping in the polygons and the the other.other.remove(e) call in dxf_stuff.dxf_utils.remove_non_duals somehow causes this exception, but if I go and remove the extra line segments it works fine.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mmccoo/kicad_mmccoo/issues/10#issuecomment-419687637, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBErHmCW5FxHXHSojv78K6jZsOgID87ks5uZIeggaJpZM4WgHtA .

mmccoo avatar Sep 10 '18 18:09 mmccoo

I created a minimal test case and test project and included the dxf test.zip

arcticlinux avatar Sep 10 '18 19:09 arcticlinux