Skip to main content

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.0.tar.gz (818.8 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.0-cp313-cp313-win_amd64.whl (796.6 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: spatialgeometry-1.4.0.tar.gz
  • Upload date:
  • Size: 818.8 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.0.tar.gz
Algorithm Hash digest
SHA256 58f31be527cb644684786d2249240b68feeeecdbdd6b50629510349ffd77f379
MD5 c8a5c427483e8209aed407458c70edbc
BLAKE2b-256 912ecb3b7b025d00e0a91b3560bcccf601f0f6eca4ada56e45c6644517c9fd7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0.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.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dd502feab0d065beefbcf6f5f87cd4985bce9b1a98c6af44989c7f84b89c986f
MD5 f2cb7089ed984eca9c75ea476fe5a827
BLAKE2b-256 75478dd53278581e0a73da3976db9438b9b7ed4e0fa080fd49338f9e276d28f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e02f98e1e7ba83757a67f62e51fc6b2ed2e8074dec5703eccdeea3e546416ff4
MD5 4f21e7fd653a5c536064372b033262e1
BLAKE2b-256 89f23b326fccbe5027376a64049c6bcd2513ba0de885bd4e41f6db91ca33c63d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 93e1976c303afc77550b2f24c01607b3e07a3c015f8228a4e152c67bfa149438
MD5 f2b9894229f69c48f1dc3b240742bc23
BLAKE2b-256 004694e17b0e709493108636b5563aa1cd450d2dbd7fec3c2f81b985529297b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8827160e221b09203a01c92dee3b6e0c1d9fd36e73b3180c037897e87e8a2aa1
MD5 93bc49c3ee1a35b769c41f849550127d
BLAKE2b-256 882aa0aa0082702f1b10282a910f30d0a49977b5b03b5ea2d7970423ee7c9f3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 46abdcb4b444267d2832aa7b74a4dd6887213324f22939699f8637b7fed0e2ca
MD5 3205071368bacaab2aae03eebf988535
BLAKE2b-256 2a4046fa60a8157c83ffcf3a5c278b6735d94193f44e48f1a5fb21a5e5128a02

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ebb515c84f14b7917d6965edc7a9b79604c6c828048b918099dd71c7426611ba
MD5 1b6a086a854bf97e02550068414c697f
BLAKE2b-256 acb12358293ff571f475ce952c9d9b2174426c7bb4a1605b41e9647170c50a11

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 1be790aab35f569043c078bd1102ff22ed4850f8febc4ab0411cbd3ef04b2625
MD5 704326e82908fa74fb1966b050f91b20
BLAKE2b-256 59562a694373e8fe82ae75285dd025d6d613b966f63bcccb08bb1dfba02bba12

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ddc980d983c0fabc4a55bc9beb8d428ee861df5779263fdb9546ef42bf06da91
MD5 b159bff8b182471af8513f4984d4141d
BLAKE2b-256 66ca064405f1362076e0659ab58e8007569bc95b0ed9d213a782cc308529025f

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32832a9ca1866197d5e59c5d9ac343e15704bac8e46f2dc7fb834b53f69964ce
MD5 a67c9a03c3d8256f8e0693ab461b42f8
BLAKE2b-256 d5a3de2f1de85340192fc28910c856a68d0dc4779d7105e88f0c6c372a4ec6af

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3bd84d2e8410265df350f94ebe17cb51c942455df2f7421a9e0735888885aae1
MD5 74c3c95be0fa9481067e03766ad43c4d
BLAKE2b-256 6848d53ea0cffdccdd34a8d0e08c79777c7732dd53297c1c93a76590462628c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 25aa422b2d74c58c99d178077ce83d4640f20d0fef06100f6d64d1b5b4b0c481
MD5 7d1cdfead1e7967271aa3239b2d2382a
BLAKE2b-256 008a7f0eedf5bf0e847543dce806d6d6a73da3a56fa199af47a57e62029cdb84

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b892c87eaff071bf6090f74e15a409db181f6c8d078f3ee5fd184cbd81005a70
MD5 61fcbc35f4d4820be4e26c198b2b71aa
BLAKE2b-256 cbac90ceda35390b9eb8a0f61e52f9913ddc469866f4e7b557cf25fa45b7ee78

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e21bdba7114c9258ac239118be41a29bb157a5991652be2aa47ca4c3ec76958b
MD5 19fac737857e86f6ef167b077c590b97
BLAKE2b-256 bc96714b388a36326d0fa3c1d303093207c0f024f3ac318b03c4816153982df6

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b676d2fcc0932d3305e9be8adca32a2a36943097fa1f07d47a4ba0e3675105e1
MD5 c1e20a4bcf4c32787291ef1405abbc1b
BLAKE2b-256 2d25347f77959aab3d662e9b11f4920e9660f501e5e9b4d5caffa5e943b213b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 9afe03ce992ce07d279f11ef848f638ad4dcd0564db49e00f93418d3323dda61
MD5 ea7a13c0c2afdfebdc2b69b101fa4fb6
BLAKE2b-256 0f89aa1ff288b08d5bce17b9290e167298927ce8b8906ed679b423d5721fd58b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spatialgeometry-1.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 172f3cec7a1aebe3687f3da566562b5c5d6ddf58e9bd06bf05c5439fb54b77fc
MD5 6656f3302fec8a262fb481e56f63dab3
BLAKE2b-256 94ce521bfcb26d0f0f79a8e96c6cefe709d15ace2a8dfa9ec06be2cbbe40ddb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for spatialgeometry-1.4.0-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

This release

1.4.0 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