Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Spatial Geometry

A Python Robotics Package QUT Centre for Robotics Open Source

PyPI version Anaconda version PyPI - Python Version License: MIT

Build Status codecov

GitHub repository  |  Documentation

Spatial Geometry provides simple 3D shape primitives -- cuboids, cylinders, spheres, and triangle meshes -- for representing robot links, obstacles, and other geometry in a scene. Every shape carries a pose (position and orientation) and an optional colour, and can be tested for distance and collision against any other shape using Coal.

It's used by the Robotics Toolbox for Python to describe robot link geometry, and by Swift to render scenes in the browser.

Quick start

import spatialgeometry as gm
from spatialmath import SE3

cube = gm.Cuboid([1, 1, 1], pose=SE3(0, 0, 0))
sphere = gm.Sphere(0.5, pose=SE3(2, 0, 0), color="red")

d, p1, p2 = cube.closest_point(sphere, inf_dist=10)
cube.iscollided(sphere)

See the documentation for the full API reference and more examples, including how to display shapes with Swift.

Installation

pip (standard)

pip install spatialgeometry

JupyterLite / Pyodide

For browser runtimes (JupyterLite/Pyodide), use a pure-Python wheel build:

SPATIALGEOMETRY_BUILD_EXTENSION=0 python -m build --wheel

This disables native C-extension compilation and produces a wheel that uses the Python scene backend (spatialgeometry.scene).

Collision functionality depends on Coal and is not expected to work in JupyterLite.

For collision support:

pip install spatialgeometry[collision]

This installs Coal and trimesh. Coal publishes prebuilt wheels for macOS (including Apple Silicon/arm64) and Linux — no conda or manual build steps required there.

Windows note: Coal doesn't currently install via pip on Windows (one of its own dependencies, cmeel-assimp, has no Windows wheel in the version range Coal needs), so the collision extra skips it there and collision checking is unavailable via pip on Windows. Everything else in the package works normally.

Workaround: conda-forge publishes coal-python built for win-64 against its own assimp, sidestepping the missing wheel entirely:

conda install -c conda-forge coal-python
pip install spatialgeometry trimesh

If you don't need collision checking but do want to work with mesh files -- e.g. Mesh.corners()/bounds()/extents() for a mesh's bounding box, which reads the file via trimesh but never touches Coal at all -- install just that piece:

pip install spatialgeometry[mesh]

Unlike collision, this works on Windows too: trimesh has no Windows-wheel problem of its own, only Coal does.

conda / conda-forge

For development, the provided environment.yml installs the package in editable mode with all dev and collision extras:

conda env create -f environment.yml
conda activate spatialgeometry-dev

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spatialgeometry-1.4.0rc1.tar.gz (819.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spatialgeometry-1.4.0rc1-cp313-cp313-win_amd64.whl (774.3 kB view details)

Uploaded CPython 3.13Windows x86-64

spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (798.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (793.6 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

spatialgeometry-1.4.0rc1-cp313-cp313-macosx_11_0_arm64.whl (768.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

spatialgeometry-1.4.0rc1-cp312-cp312-win_amd64.whl (774.4 kB view details)

Uploaded CPython 3.12Windows x86-64

spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (798.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (793.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

spatialgeometry-1.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl (768.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

spatialgeometry-1.4.0rc1-cp311-cp311-win_amd64.whl (775.0 kB view details)

Uploaded CPython 3.11Windows x86-64

spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (799.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (795.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

spatialgeometry-1.4.0rc1-cp311-cp311-macosx_11_0_arm64.whl (769.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

spatialgeometry-1.4.0rc1-cp310-cp310-win_amd64.whl (775.2 kB view details)

Uploaded CPython 3.10Windows x86-64

spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (799.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (795.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

spatialgeometry-1.4.0rc1-cp310-cp310-macosx_11_0_arm64.whl (769.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file spatialgeometry-1.4.0rc1.tar.gz.

File metadata

  • Download URL: spatialgeometry-1.4.0rc1.tar.gz
  • Upload date:
  • Size: 819.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for spatialgeometry-1.4.0rc1.tar.gz
Algorithm Hash digest
SHA256 1df860d8e614b7aa0f6ee0cd1f45301a5d7f0166168e5d1d46beb16ca3361874
MD5 bb4d560bccb60de8bb6a81725aeffc74
BLAKE2b-256 ea1db19c4ad0d54431487f969bd167fea14324e110769190fa01c4ef671c6600

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1.tar.gz:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6b0f862bbefe36cd87e3a52292dcf97c3888544b344f04eb06cbc3d25a41ed30
MD5 1cae9c7d9a72d3db9ea0a44db3a83cf4
BLAKE2b-256 1eb48cff1adba9437429444edc00b0e3deab689ff0da42db2ae5d2d5f72ce332

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp313-cp313-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3a0593c44a265b2c6ee3915b92a7c66b77b047622aea3015772977d6120096bf
MD5 3691b343e49a72cf292bdf8af9aad676
BLAKE2b-256 dbb24a73220202f614839c013af4819230eeb91573ffbd13d92edef70f898783

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 1448759748cb11b83e349f1eb9424ac921e9acc97103d5f12aeafdf084f5c379
MD5 d3072d59d43aea566273f6d747316705
BLAKE2b-256 718592b7b4175e3f3075dfa340aa0bf7aaa2280d6c550215f066b0e9903ca035

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b6dbd4ff1a76091dc22209a3ff822f12571e72ee15a7778cfe8c5605bdd8a4bf
MD5 d7963bec3498f1c629153151ad65ba68
BLAKE2b-256 cf075187622d5e5f67b2001ab85f41cb65e96d6ffeaa41806e11a5866e7eb220

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d3b2bd99d63d8ade6a6a5c9532de6af791ea4838e9df573b6817420bf1dd33ac
MD5 01d3227de8119c5a2c1eaee2348a4ecb
BLAKE2b-256 a6aa086afadd70a7511a5f98e1b73d0503acbb9f055a004c164a21489c1a386c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp312-cp312-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9c98aceebb79be73362c96d16367a477fdb5fa2483b8283d64e271928d01748d
MD5 783c817e2925779866fb85cdaaa12127
BLAKE2b-256 12ddd86c8f8462ae7fdeabdfdd419db697c2bdfa6076249ec953a58fdac35d1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 9189ad3941b1f9f7ff707d74114c444160e05f9087d18a8ea7d1b8776d1a57dd
MD5 99e8450e665ddbd6ddd40bc74f76a5ff
BLAKE2b-256 a92b42c359d9fb9ebcd6f165986e928ec45bf6facf6b34a97d98d8a57f164a4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea5bb480d149709877552687b246b1d95b420c286669a34b5d4dfc65f829ca0f
MD5 cf3782243b4146b15588bffecd68884d
BLAKE2b-256 70265ce110aff0003c167ea72372d0f0dbb390bb9d3a2270e546fb38a53b1c32

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b846afb24742f77ec5d7ea801146a4b1050b876b302258bd3b74451988bd18e2
MD5 7bcaecec92ff140e0db23b82b156782e
BLAKE2b-256 51a8c01c11a98543f64e83daa5f48808758b9ac439ebd1d0b99965ab37300464

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp311-cp311-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b2012bcbaa9ddd94e8afaf34e9747d43d99d18b02d1b9a9aae09cbda09c8d01f
MD5 50235682e7a8d1a9c4e9446f3f63c487
BLAKE2b-256 d3b4c46d83b97f42b5ac48f7e4d4aa40259dd8aa86d86f26bcba47f148deec83

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 aa1e4ec15c65f5384d1798d913d2ff410919c2827fc8af0d9c475a3b69b68333
MD5 78fc85845b2cd2618ca35f794b4d4cc4
BLAKE2b-256 ef2209b1792e1241cc0f10adeaa110e79fdc99ebb0a7d871c5727db60d7d6d4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c53f7bc9185520933a50e21a65cfb420c71451b102bc01b4943ace2f92b997e9
MD5 1adcb2fa28d6e32b2fbd47b490c6d395
BLAKE2b-256 6050efe126640ce668f29c4b11a8a9c674f5f06a6a11dc7d9e3c89aafaf2bee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 62871407cea8634f11d16fd49907601cfb4ad7f930db29983a81e18ec1a49d04
MD5 aea1de2ac7d16c13a5c26d71ec3b511f
BLAKE2b-256 1c25d8db7b5bec8e94782e956b2678553a171312a02a052e68c7cbe2656ea0e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp310-cp310-win_amd64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a928e9bdbc7fc29d9dfc12c16e447ac074e550de8644f81c08c737bb528ce004
MD5 0bd59e9e0edd8096445514e772d018c4
BLAKE2b-256 a852fcbe39f2d0f63087a07db6048966f80a5b333e5a1e5f0b7d553602cf9b7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 0d6d25ebe337d9c2af4d2400b81b75358a247c8b73b41f0154ec68ca821d4da3
MD5 30241a85d57bf962fc11adf3e847d43b
BLAKE2b-256 90617bef2ba0fee75cb824f26e82a87943bdf4c23863369ece4f44b40816a80a

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spatialgeometry-1.4.0rc1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fb6133cea752d6651b8c0fc7a03b431e3d441e77339d747141f4ce2042ae682
MD5 93a0789580a13edb0ae5a8aa106c48ff
BLAKE2b-256 d88eab986967952d39ce4737d11942cebde96f04043cf05a238604fc2409427f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0rc1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: cibuildwheel.yml on jhavl/spatialgeometry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.4.0

17 files

This release

1.4.0rc1 This release

17 files

1.3.0

17 files

1.2.0

17 files

1.1.0

30 files

1.0.3

30 files

1.0.1

14 files

1.0.0

14 files

0.2.0

2 files

0.1.2

2 files

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page