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

Board editor: Tool to measure wire length #564

Merged
merged 5 commits into from Oct 31, 2019
Merged

Conversation

@dbrgn
Copy link
Member

dbrgn commented Oct 25, 2019

Allow measuring the length of the selected wire segment.

img

If not all selected netlines are directly connected, a warning is shown.

img

The functionality is currently quite limited. It only measures from start point to end point and does not consider the width of the netline. However, it's quite hard to define what the correct behavior should be.

Other changes in this PR:

  • Point::getLength now returns UnsignedLength
  • BI_NetLine now has a getLength method
  • In the board editor, right clicking will not clear the current selection anymore
  • Added a link to https://icons8.com/ to the about dialog, so we can now use all their icons for free
Copy link
Member

ubruhin left a comment

Nice, seems to work 🙂

Sorry for the amount of comments ;)
In addition to the comments, could you swap the order of the two new methods in bes_select.cpp to have consistent order in *.h and *.cpp?

libs/librepcb/common/units/point.h Outdated Show resolved Hide resolved
libs/librepcb/common/dialogs/aboutdialog.ui Outdated Show resolved Hide resolved
libs/librepcb/common/dialogs/aboutdialog.ui Outdated Show resolved Hide resolved
@dbrgn dbrgn force-pushed the measure-segment-length branch from 44c403a to 455fa58 Oct 27, 2019
@dbrgn dbrgn requested a review from ubruhin Oct 27, 2019
@dbrgn

This comment has been minimized.

Copy link
Member Author

dbrgn commented Oct 27, 2019

I think all comments should be addressed now.

@ubruhin ubruhin added this to the 0.1.3 milestone Oct 29, 2019
@ubruhin

This comment has been minimized.

Copy link
Member

ubruhin commented Oct 29, 2019

I think all comments should be addressed now.

You forgot one 🙂:

In addition to the comments, could you swap the order of the two new methods in bes_select.cpp to have consistent order in *.h and *.cpp?

And CI seems to be broken now ;)

@dbrgn

This comment has been minimized.

Copy link
Member Author

dbrgn commented Oct 29, 2019

You forgot one slightly_smiling_face:

WTF, I did fix that, but for some reason it got lost during rebasing...

@dbrgn dbrgn force-pushed the measure-segment-length branch from 455fa58 to 7a55934 Oct 29, 2019
@dbrgn

This comment has been minimized.

Copy link
Member Author

dbrgn commented Oct 29, 2019

Hopefully CI should be fixed now. It was due to a unused-variable warning.

dbrgn added 4 commits Oct 25, 2019
When right-clicking on an element in the board editor, if the
right-clicked element is part of an active selection, keep it as-is.
However, if it's not part of an active selection, clear the selection
and select the right-clicked element instead.
@dbrgn dbrgn force-pushed the measure-segment-length branch from 7a55934 to f75dd96 Oct 30, 2019
The tool in the right-click context menu measures the total length of
all selected netlines directly connected to the netline below the
cursor.
@dbrgn dbrgn force-pushed the measure-segment-length branch from f75dd96 to 590b869 Oct 30, 2019
@ubruhin

This comment has been minimized.

Copy link
Member

ubruhin commented Oct 31, 2019

Thanks! 👍

@ubruhin ubruhin merged commit 7a75aa3 into master Oct 31, 2019
11 checks passed
11 checks passed
LibrePCB Build #20191030.4 succeeded
Details
LibrePCB (Doxygen) Doxygen succeeded
Details
LibrePCB (Linux Ubuntu_1404_GCC) Linux Ubuntu_1404_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1604_GCC) Linux Ubuntu_1604_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1604_Qt_5_12_3_GCC) Linux Ubuntu_1604_Qt_5_12_3_GCC succeeded
Details
LibrePCB (Linux Ubuntu_1804_Clang) Linux Ubuntu_1804_Clang succeeded
Details
LibrePCB (Linux Ubuntu_1904_GCC9) Linux Ubuntu_1904_GCC9 succeeded
Details
LibrePCB (Stylecheck) Stylecheck succeeded
Details
LibrePCB (macOS) macOS succeeded
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@ubruhin ubruhin deleted the measure-segment-length branch Oct 31, 2019
ubruhin added a commit that referenced this pull request Nov 17, 2019
Board editor: Tool to measure wire length
(cherry picked from commit 7a75aa3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.