Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add two new wire forms #1232

Merged
merged 4 commits into from
Feb 10, 2025
Merged

Add two new wire forms #1232

merged 4 commits into from
Feb 10, 2025

Conversation

wawuwo
Copy link
Contributor

@wawuwo wawuwo commented Feb 6, 2025

Hi! This PR enhances wire laying by adding two new ways to create (or "routes to lay") a wire in addition to two that already present.

These two are available right now:

    From o---+
             |
             o To

    From o
         |
         +---o To

These two become available with this PR:

    From o---+
             |
             +---o To

      o From
      |
      +---+
          |
          o To

The way the wire is laid out is changed with right click while drawing a wire

@ra3xdh
Copy link
Owner

ra3xdh commented Feb 7, 2025

Thanks for the contribution! Please fix the build error. Some files still referencing wire_planner.hpp while the PR contains wire_planner.h

@ra3xdh ra3xdh added this to the 25.1.0 milestone Feb 7, 2025
@wawuwo
Copy link
Contributor Author

wawuwo commented Feb 7, 2025

Some files still referencing wire_planner.hpp while the PR contains wire_planner.h

I made a mistake while organising commit history, now it's fixed :)

@ra3xdh
Copy link
Owner

ra3xdh commented Feb 7, 2025

I have found a crash. Try to draw a closed loop from wires and you will get a crash at the following point:

Thread 1 "qucs-s" received signal SIGABRT, Aborted.
0x00007ffff60a5334 in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff60a5334 in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff604c120 in raise () from /usr/lib/libc.so.6
#2  0x00007ffff60334c3 in abort () from /usr/lib/libc.so.6
#3  0x00007ffff60333df in ?? () from /usr/lib/libc.so.6
#4  0x00007ffff6044177 in __assert_fail () from /usr/lib/libc.so.6
#5  0x0000555555664092 in Schematic::connectWithWire (this=0x555558c22570, a=..., b=...) at /home/vvk/qucs_s/qucs/schematic_element.cpp:3274
#6  0x00005555556721a2 in MouseActions::MPressWire2 (this=0x555555f262a0, Doc=0x555558c22570, Event=0x7fffffffb770, fX=286, fY=201) at /home/vvk/qucs_s/qucs/mouseactions.cpp:1494
#7  0x000055555560484a in Schematic::contentsMousePressEvent (this=0x555558c22570, Event=0x7fffffffb770) at /home/vvk/qucs_s/qucs/schematic.cpp:722
#8  0x0000555555a72c5c in Q3ScrollView::viewportMousePressEvent (this=0x555558c22570, e=0x7fffffffbd30) at /home/vvk/qucs_s/qucs/qt3_compat/q3scrollview.cpp:1748
#9  0x0000555555a72169 in Q3ScrollView::eventFilter (this=0x555558c22570, obj=0x555558c52e20, e=0x7fffffffbd30) at /home/vvk/qucs_s/qucs/qt3_compat/q3scrollview.cpp:1471
#10 0x00007ffff6754a08 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#11 0x00007ffff76fe77a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#12 0x00007ffff7702a26 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#13 0x00007ffff6757ac8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#14 0x00007ffff76f613d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /usr/lib/libQt6Widgets.so.6
#15 0x00007ffff7769752 in ?? () from /usr/lib/libQt6Widgets.so.6
#16 0x00007ffff776ae40 in ?? () from /usr/lib/libQt6Widgets.so.6
#17 0x00007ffff76fe78a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#18 0x00007ffff6757ac8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#19 0x00007ffff6d8752b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt6Gui.so.6
#20 0x00007ffff6e02b44 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Gui.so.6
#21 0x00007ffff724ea14 in ?? () from /usr/lib/libQt6Gui.so.6
#22 0x00007ffff5f1c559 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007ffff5f7f257 in ?? () from /usr/lib/libglib-2.0.so.0
#24 0x00007ffff5f1ba55 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0x00007ffff69c22fd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#26 0x00007ffff6761ee6 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#27 0x00007ffff6758f4f in QCoreApplication::exec() () from /usr/lib/libQt6Core.so.6
#28 0x00005555555eb44b in main (argc=1, argv=0x7fffffffd378) at /home/vvk/qucs_s/qucs/main.cpp:1234
Screencast_20250207_152249.webm

@ra3xdh ra3xdh merged commit c1a05d4 into ra3xdh:current Feb 10, 2025
7 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Feb 10, 2025

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants