Skip to main content

gh-actions-ci GitHub license PyPI pyversions PyPi Version codecov

Most lift and drag calculations require the use of a frontal/projected area. This is normally not that big of a deal, especially when dealing with nice clean CAD files. Unfortunately, in fast-paced design environments (motorsport especially), you'll often get a collection of STL geometry files instead. This is annoying for a number of reasons, but mainly because there are several methods for computing the frontal area of an STL and all of them involve a fairly tedious/lengthy process. pArea aims to solve this with a single command. [original blog post]

Installation

pip install parea

Usage

As a simple example, the cube STL located within the tests directory has a projected area of 4.0 along all three coordinate axes. To validate this, simply run the following (assuming you've downloaded cube_ascii.stl into your current working directory):

parea -stl cube_ascii.stl -x

For models comprised of multiple STL files, simply separate the file names with a space:

parea -stl file_1.stl file_2.stl file_3.stl -x

Or use shell-style wildcards:

parea -stl file_*.stl  -x

When simulating ground vehicles with non-rigid wheels, you will need to account for the tire deformation and subsequent ride height drop. This can be accounted for by using the -floor flag followed by a floor height value. Note that floor height is in reference to the vertical axis of the specified projection plane and maintains the same units as the STL file. As an example:

parea -stl file_*.stl  -x -floor 0.0125

Since the projection vector is x, our projection plane is therefore yz yielding a projected area based off all geometry above z >= 0.0125. All geometry below the horizontal line z=0.0125 is accordingly trimmed (if necessary) and removed from the calculation.

Options

vectors: -x, -y, -z

planes: -yz/-zy, -xz/-zx, -xy/-yx

References

  • Computational Geometry: Algorithms and Applications (3rd Edition) by Mike de Borg, Otfried Cheong, Mark van Kreveld, and Mark Overmars
  • Computational Geometry in C (2nd Edition) by Joseph O'Rourke
  • Finite Element Mesh Generation by Daniel S.H. Lo
  • Command Line Interface Guidelines [link]

Metadata

Release files for parea 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parea 0.2.0
File Size Uploaded Provenance Actions
parea-0.2.0.tar.gz 8.0 kB Without provenance Details for parea-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parea 0.2.0
File Interpreter ABI Platform Actions
parea-0.2.0-py3-none-any.whl Python 3 none any Details for parea-0.2.0-py3-none-any.whl

Total release size: 15.9 kB

Release files / parea-0.2.0.tar.gz

Download URL parea-0.2.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0baf0d6a6bf4e79b17e505a557443ff998d2a0a6899151b77d9a39226537db4c
BLAKE2b-256 checksum
How to use checksums
cd2f5e080d0779e2d8c49c0f35ca22654809dbe833fc36b5fa3c2fbe085cc754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Release files / parea-0.2.0-py3-none-any.whl

Download URL parea-0.2.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
719eb13fa07646afd0ade93445ad7f4d924615c250341d4f1d5c651f333a68f7
BLAKE2b-256 checksum
How to use checksums
fad741b279307b3d154ead0f32f036e5257190714a41cd0d3a9c787251251665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Security for parea 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page