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.1.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.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybeltsolver-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2c4124a7e63150227b3ced2ba7c0356fe7349914830dea255770951b468db411
MD5 2352a558141e572afa5473f43a504fcb
BLAKE2b-256 6437eec72bbee63944631cdfd446c8c57ec7e34875a69b00151096257a795e73

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybeltsolver-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2c35402913dd0e3094d7c24c1b7d0546a531f700ebb9ea35a5b84c7bf64a52
MD5 d4f8aa6aeafed483a764225104de1391
BLAKE2b-256 debf145e846d76a0403f9f05a1451c0162ec6b5ed18c967cdd3b8827651b936a

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