Skip to main content

OpenSolid

OpenSolid is an under-development 2D/3D CAD library. This package contains its official Python bindings. The bindings (and OpenSolid itself) are still under active development, but you’re welcome to try them out!

The package contains a single opensolid module containing a variety of classes representing geometric values and quantities, such as Length, Angle, Point2d, and Direction2d. Each class and function has a brief docstring, but here’s a brief sampling of some of the operations you can do:

>>> from opensolid import *

# Define some Length values
>>> width = Length.meters(5)
>>> height = Length.centimeters(10)

# Multiply those to get an Area value
>>> width * height
Area.square_meters(0.5)

# All values are stored in SI units internally,
# so you can mix and match units freely
>>> Length.centimeters(100) + Length.inches(10)
Length.meters(1.254)

# You can request that any length be converted into
# a value in specific units (giving back a plain 'float')
>>> Length.meters(2).in_inches()
78.74015748031496

# Define a couple of points in 2D from their
# X and Y coordinates, given in centimeters
>>> p1 = Point2d.centimeters(50, 60)
>>> p2 = Point2d.centimeters(100, 80)

# Measure the distance between the points
>>> p1.distance_to(p2)
Length.meters(0.5385164807134505)

# Build up a parametric curve (expression);
# 'Curve.t' is the curve parameter, which
# ranges from 0 to 1, so here x will range
# from 0 to 5.
>>> x = 5 * Curve.t
>>> y = x.squared() - 5 * x + 1

# Evaluate the curve at t=0.5
>>> y.evaluate(0.5)
-5.25

# Find the values of t for which y=0. For this, we need
# to set up a tolerance value. (A tolerance is needed
# for cases where e.g. the curve decreases to a tiny
# value like 1e-9 before increasing again; should that
# be considered a solution or not? Similarly, if the
# curve decreases to -1e9 and then increases again,
# should that be considered two zeros or just one? See
# the documentation of Curve.zeros for more info.)
>>> with Tolerance(1e-6):
...     # Get the location of each zero, i.e. the
...     # value of t (not x!) for which y is zero
...     roots = [zero.location() for zero in y.zeros()]
>>> roots
[0.041742430504416, 0.9582575694955838]

# Find the values of x at which y is zero,
# by evaluating x at those roots
>>> [x.evaluate(t) for t in roots]
[0.20871215252208, 4.7912878474779195]

# Check that y is in fact zero at those roots
>>> [y.evaluate(root) for root in roots]
[0.0, 0.0]

# Construct a displacement (vector with length units)
# from its components in meters
>>> d = Displacement2d.meters(1, 2)

# To get the direction of a vector, we also need to
# define a tolerance (any vector with magnitude
# smaller than this value will be considered 'zero'
# and therefore have no direction, so attempting to
# get its direction will raise an exception).
>>> with Tolerance(Length.nanometer):
...     d.direction()
Direction2d.degrees(63.434948822922)

Metadata

Release files for opensolid 0.10.0

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

Built distributions (wheels)

Table of built distributions (wheels) for opensolid 0.10.0
File Actions
opensolid-0.10.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for opensolid-0.10.0-py3-none-win_amd64.whl
opensolid-0.10.0-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details for opensolid-0.10.0-py3-none-manylinux_2_35_x86_64.whl
opensolid-0.10.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for opensolid-0.10.0-py3-none-macosx_11_0_x86_64.whl
opensolid-0.10.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for opensolid-0.10.0-py3-none-macosx_11_0_arm64.whl

Total release size: 67.3 MB

Release files / opensolid-0.10.0-py3-none-win_amd64.whl

Download URL opensolid-0.10.0-py3-none-win_amd64.whl
Size 10.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1b558b2adb649b38599b4d524f61f83dfd8df0cadcd7f9bc85ebd046869db058
BLAKE2b-256 checksum
How to use checksums
bf3c2c2a8fec43775fd4f56c461cbcf82478a0b0bce28c02f33f3b9e9d77960f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Release files / opensolid-0.10.0-py3-none-manylinux_2_35_x86_64.whl

Download URL opensolid-0.10.0-py3-none-manylinux_2_35_x86_64.whl
Size 18.2 MB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c75956bf9f3d3ac4a5c1bd3e336972bf3d9d0906c2013da9de729ad7452438d9
BLAKE2b-256 checksum
How to use checksums
8f9c1a5892a35ff92dff24f061c2944029ff12a27374e334f885fbd0273ff9e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Release files / opensolid-0.10.0-py3-none-macosx_11_0_x86_64.whl

Download URL opensolid-0.10.0-py3-none-macosx_11_0_x86_64.whl
Size 20.0 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
54718ed5dd66f891bd82d4ea2461ef15e0c45897ce9fa1ee9c9285db4f1bbbf7
BLAKE2b-256 checksum
How to use checksums
624c2f9df7b3dbc044910f80f4e7e9e538b64db1cbf4926bb2753888683be6df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Release files / opensolid-0.10.0-py3-none-macosx_11_0_arm64.whl

Download URL opensolid-0.10.0-py3-none-macosx_11_0_arm64.whl
Size 18.3 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
05dd15df822e5b98cdf629bf233f4558523a4976c80758a610dd068c9043cab7
BLAKE2b-256 checksum
How to use checksums
25c5524d44d4f1de6d1847cc0a6791f1ea7872c1d7eadab93a72cfed25473c9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

Security for opensolid 0.10.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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for opensolid-0.10.0-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.

Transparency log

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