Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Path center of mass#16889
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
brunobeltran wants to merge4 commits intomatplotlib:mainChoose a base branch frombrunobeltran:path_center_of_mass
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Draft
Path center of mass#16889
Changes fromall commits
Commits
Show all changes
4 commits Select commitHold shift + click to select a range
5f8493b
correctly compute bounding box for path
brunobeltran5be375f
add function to compute (signed) area of path
brunobeltrancaf0324
code to compute bezier segment / path lengths
brunobeltran23ae477
add function to get center of mass of path
brunobeltranFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletionsdoc/users/next_whats_new/2020-03-31-path-size-methods.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Functions to compute a Path's size | ||
---------------------------------- | ||
Various functions were added to `~.bezier.BezierSegment` and `~.path.Path` to | ||
allow computation of the shape, size and area of a `~.path.Path` and its | ||
composite Bezier curves. | ||
In addition to the fixes below, `~.bezier.BezierSegment` has gained more | ||
documentation and usability improvements, including properties that contain its | ||
dimension, degree, control_points, and more. | ||
Better interface for Path segment iteration | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
`~.path.Path.iter_bezier` iterates through the `~.bezier.BezierSegment`'s that | ||
make up the Path. This is much more useful typically than the existing | ||
`~.path.Path.iter_segments` function, which returns the absolute minimum amount | ||
of information possible to reconstruct the Path. | ||
Fixed bug that computed a Path's Bbox incorrectly | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
Historically, `~.path.Path.get_extents` has always simply returned the Bbox of | ||
a curve's control points, instead of the Bbox of the curve itself. While this is | ||
a correct upper bound for the path's extents, it can differ dramatically from | ||
the Path's actual extents for non-linear Bezier curves. | ||
Path area | ||
~~~~~~~~~ | ||
A `~.path.Path.signed_area` method was added to compute the signed filled area | ||
of a Path object analytically (i.e. without integration). This should be useful | ||
for constructing Paths of a desired area. |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.