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 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 ubruhin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
libs/librepcb/projecteditor/boardeditor/fsm/bes_select.cpp Outdated Show resolved Hide resolved
@dbrgn
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
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
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
Copy link
Member Author

dbrgn commented Oct 29, 2019

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

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.
The tool in the right-click context menu measures the total length of
all selected netlines directly connected to the netline below the
cursor.
@ubruhin
Copy link
Member

ubruhin commented Oct 31, 2019

Thanks! 👍

@ubruhin ubruhin merged commit 7a75aa3 into master Oct 31, 2019
@ubruhin ubruhin deleted the measure-segment-length branch October 31, 2019 13:09
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
Development

Successfully merging this pull request may close these issues.

2 participants