Skip to main content

Geometric solver and visualizer for 2D generic belt systems.

Project description

Geometric Solver and Visualizer for 2D Generic Belt Systems

This module provides the Belt and Circle classes to define, validate, and solve the geometry of a closed-loop belt-like system with no restrictions on the number of pulleys. It also supports custom routing topologies (front/back) via the BeltFace class, and dynamic length optimization via SciPy. Visualization is provided through Matplotlib. Axes and Figures are returned.

Examples

Standard 2-Pulley System

c1 = Circle(40.0, (0, 0), name="Drive Motor")
c2 = Circle(40.0, (250, 0), name="Driven Wheel")

pulleys = [c1, c2]
routing = [BeltFace.FRONT, BeltFace.FRONT]

belt = Belt(circles=pulleys, topology=routing, allow_crossing=False)
print(f"Total Belt Length: {belt.total_length:.2f}")
belt.plot()

Three-Pulley System with Mixed Routing and Optimization

import numpy as np

c1 = Circle(52 * 2 / np.pi / 2, (0, 0), name="c1")
c2 = Circle(23 * 2 / np.pi / 2, (10, 50), name="c2")
c3 = Circle(20 * 2 / np.pi / 2, (0, 78.87), name="c3")

pulleys = [c1, c2, c3]
routing = [BeltFace.FRONT, BeltFace.BACK, BeltFace.FRONT]

belt = Belt(circles=pulleys, topology=routing, allow_crossing=True)
print(f"Original Length: {belt.total_length:.2f}")

# Slide the tensioner (c2) along the X-axis to reach exactly 240 units
belt.find_movable_circle_position(
    target_length=240, movable_circle_idx=1, slide_vector=np.array([1, 0])
)
print(f"New Length: {belt.total_length:.2f}")
belt.plot()

4-Pulley System (Default Topology)

c1 = Circle(40.0, (0, 0), name="c1")
c2 = Circle(40.0, (250, 0), name="c2")
c3 = Circle(20.0, (240, -75), name="c3")
c4 = Circle(40.0, (100, -160), name="c4")

pulleys = [c1, c2, c3, c4]

# Topology defaults to all BeltFace.FRONT if not specified
belt = Belt(circles=pulleys, allow_crossing=False)
print(f"Total Belt Length: {belt.total_length:.2f}")
belt.plot()

Author: Vincent Wallsten
Date: 2026-06-23

Project details


Download files

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

Source Distribution

pybeltsolver-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

pybeltsolver-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pybeltsolver-0.1.0.tar.gz.

File metadata

  • Download URL: pybeltsolver-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pybeltsolver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5e59d941e94131c6a9d80c35ea5f68f1b2693d1996f5094773f22ee350b556a
MD5 05ae4121a11f6efec10f5722f85bcecb
BLAKE2b-256 563b5773a780e7bb4e7a5aba486fe465f2d7bb93a64da4af57425a330f697151

See more details on using hashes here.

File details

Details for the file pybeltsolver-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pybeltsolver-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pybeltsolver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e42120e1240ce49ff594a00182bd43c9482217f524e3bd5d27e475cb4db4dc0
MD5 7a9547e8d31d6933409a1fa4d9c3f631
BLAKE2b-256 53b2d9f08cb418090fb65233ff62c0f1d9d4d33b30a9e0e6d39574dce7e586e8

See more details on using hashes here.

Supported by

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