-
Notifications
You must be signed in to change notification settings - Fork 439
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 'connected' argument to 'Plotter.add_lines' to create a series of connected lines #4214
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4214 +/- ##
=======================================
Coverage 95.77% 95.77%
=======================================
Files 97 97
Lines 20687 20687
=======================================
Hits 19813 19813
Misses 874 874 |
If True, will use pyvista.lines_from points rather than pyvista.line_segments_from_points. This will treat the points as a series of coordinates in a single connected line
… to 'add_lines' is False
Co-authored-by: Andras Deak <adeak@users.noreply.github.com>
7e4a41c
to
b9686f1
Compare
@p-j-smith although we don't have an official policy about this, I recommend merging instead of rebasing and force pushing on PRs unless you have a strong opinion of your own in this regard :) We use squash merge so the local history on PRs is not a concern, and rebasing runs the risk of losing commits pushed by others (not a concern in your case probably, because you know what you're doing) and not being able to use the "changes since you last viewed" button on github that helps reviewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @p-j-smith. One comment, works for me with or without that.
sorry about that! I do usually rebase and force push but I'm happy to merge in future pyvista prs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-j-smith LGTM. Thanks for this. It is perfect!
Thanks for the fast reviews @adeak and @tkoyama010 ! Would one of you mind merging as I'm not authorised? Thanks! |
We usually check that there are no objections 24 hours after the initial approval is given. This is to give accounts in all time zones a fair opportunity to comment. Already, I am going to merge because it has been 24 hours since the first approval. |
Overview
Add support for using
Plotter.add_lines
to create a series of connected lines from an array of points, i.e. the behaviour of this function prior to #3687resolves #4065
Details
add a
connected
argument toPlotter.add_lines
. Ifconnected=True
, the points passed toPlotter.add_lines
will be taken to form a series of connected lines. The default isFalse
to maintain the current behaviour of the functionadd a test to check the correct number of line segments is created when setting
connected=True