Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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:main
base:main
Choose a base branch
Loading
frombrunobeltran:path_center_of_mass
Draft
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletionsdoc/users/next_whats_new/2020-03-31-path-size-methods.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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.
Loading

[8]ページ先頭

©2009-2025 Movatter.jp