Just for reference and maybe other ideas: https://bugs.launchpad.net/kicad/+bug/593972
I just tried applying your patch, but it will segfault when I try to apply the teardrops. It was a previously routed design I tested. I also tried the coldfire demo board. Attached is a backtrace. 2015-05-09 4:01 GMT+02:00 Михаил Карпенко <[email protected]>: > The patch attached adds simple teardrops implementation. All the teardrops > are "painted" by tracks and I mark the tracks with FLAG1 in order to > differentiate them from regular tracks. This flag is not used anywhere in > the sources so I took the liberty to use it for my purpose. I hope nobody > will object. This is definitely not the most elegant solution but it works. > > > This implementation should not be considered as a final work and it has a > number of limitations: > > 1. I can not figure out a clean solution which would allow me to delete a > single teardrop from inside the code. Currently, the user have the options > to either remove all the tracks composing a teardrop manually or use the > batch processing to remove all the teardrops from the board. I guess the > best option would be to link teardrops to parent tracks but this requires > deeper modifications to the sources. > > 2. Adding teardrops to medium or big size boards takes pretty much time. I > add teardrops to the board calling BOARD::Add() and KIGFX::VIEW::Add() for > every single track composing teardrop and profiler (callgrind) says that > those are two most expensive operations in my code. Are there any ways of > speeding up the process? > > > I will continue to work on the code but may be with less effort. Your advice > and criticism are highly welcome. I hope this patch will be useful. > > > Mikhail Karpenko, > > Elphel, Inc. > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp >
(gdb) bt #0 0x00007fffe438c5e9 in PNS_NODE::QueryColliding(PNS_ITEM const*, std::vector<PNS_OBSTACLE, std::allocator<PNS_OBSTACLE> >&, int, int) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #1 0x00007fffe42b620e in TEARDROPS_EDITOR::drawSegments(TEARDROP&, TRACK&) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #2 0x00007fffe42b6936 in TEARDROPS_EDITOR::iterateTracks(BOARD_CONNECTED_ITEM const*) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #3 0x00007fffe42b6cfb in TEARDROPS_EDITOR::addToAll(DIALOG_TEARDROPS::TEARDROPS_SETTINGS const&) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #4 0x00007fffe42b6fe3 in TEARDROPS_EDITOR::EditTeardrops(DIALOG_TEARDROPS::TEARDROPS_SETTINGS const&) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #5 0x00007fffe4247be5 in PCB_EDIT_FRAME::ShowTeardropsEditor(wxCommandEvent&) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #6 0x00007ffff631893e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0 #7 0x00007ffff64b02e8 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0 #8 0x00007ffff64b03eb in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0 #9 0x00007ffff64b07a8 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0 #10 0x00007fffe430ed09 in EDA_BASE_FRAME::ProcessEvent(wxEvent&) () from /home/foo/kicad_new/build/pcbnew/_pcbnew.kiface #11 0x00007ffff64b05a3 in wxEvtHandler::DoTryChain(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0 #12 0x00007ffff64b0895 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0 #13 0x00007ffff6e517a8 in wxWindowBase::TryAfter(wxEvent&) () from /usr/lib/libwx_gtk2u_core-3.0.so.0 #14 0x00007ffff64b05f7 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0 #15 0x00007ffff6df2d21 in wxMenuBase::SendEvent(int, int) () from /usr/lib/libwx_gtk2u_core-3.0.so.0 #16 0x00007ffff6ccb3b5 in ?? () from /usr/lib/libwx_gtk2u_core-3.0.so.0 #17 0x00007ffff2c262d5 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #18 0x00007ffff2c3800c in ?? () from /usr/lib/libgobject-2.0.so.0 #19 0x00007ffff2c40668 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #20 0x00007ffff2c408cf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #21 0x00007ffff3364926 in gtk_widget_activate () from /usr/lib/libgtk-x11-2.0.so.0 #22 0x00007ffff326081d in gtk_menu_shell_activate_item () from /usr/lib/libgtk-x11-2.0.so.0 #23 0x00007ffff3260bbb in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #24 0x00007ffff324e90f in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #25 0x00007ffff2c262d5 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #26 0x00007ffff2c37f02 in ?? () from /usr/lib/libgobject-2.0.so.0 #27 0x00007ffff2c40175 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0 #28 0x00007ffff2c408cf in g_signal_emit () from /usr/lib/libgobject-2.0.so.0 #29 0x00007ffff3365b9c in ?? () from /usr/lib/libgtk-x11-2.0.so.0 #30 0x00007ffff324d054 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0 #31 0x00007ffff324d4eb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #32 0x00007ffff2ec22cc in ?? () from /usr/lib/libgdk-x11-2.0.so.0 #33 0x00007ffff1e519fd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #34 0x00007ffff1e51ce0 in ?? () from /usr/lib/libglib-2.0.so.0 #35 0x00007ffff1e52002 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #36 0x00007ffff324c467 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #37 0x00007ffff6c2c485 in wxGUIEventLoop::DoRun() () from /usr/lib/libwx_gtk2u_core-3.0.so.0 #38 0x00007ffff635dc53 in wxEventLoopBase::Run() () from /usr/lib/libwx_baseu-3.0.so.0 #39 0x00007ffff631cb46 in wxAppConsoleBase::MainLoop() () from /usr/lib/libwx_baseu-3.0.so.0 #40 0x000000000041c016 in ?? () #41 0x00007ffff63b38f0 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-3.0.so.0 #42 0x0000000000411bfe in ?? () #43 0x00007ffff377f800 in __libc_start_main () from /usr/lib/libc.so.6 #44 0x0000000000414899 in _start () (gdb)
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

