thehardwarestore.ai

where AI agents shop for the right tools

$ show jimy-byerley/pymadcad

[account ↗] [repo ↗] APPLICATION ★ 294 30 ● maintained (last update 2 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

pymadcad is a Python library for script-based mechanical design, providing a comprehensive set of tools for 3D geometry creation, manipulation, and analysis. It allows engineers to define mechanical parts and assemblies programmatically, enabling version control, automated testing, and parametric design. The library covers the full pipeline from primitive generation (extrusion, revolution, boolean operations) to advanced features like bevel/chamfer, offsetting, hull computation, gear generation (involute and spherical), and kinematic simulation with joint constraints. It also includes a high-quality OpenGL-based rendering system with Qt integration for interactive 3D visualization, and supports file I/O for STL, PLY, and OBJ formats. The architecture is modular, with core data structures (Mesh, Web, Wire) in the madcad/mesh package, algorithms in separate modules, and a Rust extension (madcad.core) for performance-critical operations like triangulation, boolean operations, and spatial hashing. The rendering pipeline is built on moderngl and Qt, with custom GLSL shaders for efficient display. The library is designed to be used as a Python package, with examples demonstrating typical usage for gearboxes, bearings, and kinematic mechanisms. Key reusable components include the math utilities (mathutils.py) for vector and interpolation math, and the spatial hashing module (hashing.py) for efficient proximity queries. The kinematic solver and joint definitions provide a robust framework for mechanism analysis. While many modules are tightly coupled to the library's internal structures, the core algorithms and data structures are well-crafted and demonstrate strong engineering practices. The repository is actively maintained with CI/CD pipelines, comprehensive tests, and ongoing Rust migration for performance. However, some Rust implementations are incomplete, and the heavy dependency chain (numpy, scipy, moderngl, Qt) may pose version compatibility challenges.

RATING7.4/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTmedium
CONTRIBUTORS9
VELOCITY0.54
OPEN ISSUES32
CLOSED ISSUES53
LAST COMMIT2 weeks ago
pyo3 (cargo) 0.28
vecmat (cargo) 0.7
rustc-hash (cargo) 2.0
heapless (cargo) 0.8
multiversion (cargo) 0.8
Files by Type (count)
Other (.png)
176
Python
101
Markdown
41
Other (.svg)
35
Other (.frag)
15
Other (.vert)
15
Rust
11
Other (.stl)
10
YAML
4
Other (.drawio)
4
Other (no ext)
2
TOML
2
Files by Type (size)
Other (.zip)
22MB
Other (.stl)
13MB
Other (.png)
9MB
Other (.svg)
9MB
Python
853KB
Other (.blend)
661KB
Other (.blend1)
661KB
Other (.ttf)
605KB
Rust
128KB
Other (.drawio)
87KB
Markdown
74KB
Other (.ico)
51KB

The LLM identified 2 files worth highlighting for reuse:

Provides a comprehensive set of vector math functions (cross, dot, project, reflect, etc.), interpolation (lerp, smoothstep, hermite), and transformation helpers (translate, rotate, scale). Self-contained with only numpy dependency. Reusable for any 3D geometry or graphics project.

file: madcad/mathutils.py ↗ | tags: #vector-math #interpolation #geometry-utilities

Implements PositionMap, PointSet, and Asso for efficient spatial hashing and proximity queries. Used internally for boolean operations and triangulation. The core algorithm is self-contained (depends on common.py for typedlist, but could be adapted). Demonstrates non-obvious skill in spatial indexing.

file: madcad/hashing.py ↗ | tags: #spatial-hashing #proximity-query #geometry-index
Last analyzed: 2026-10-25 05:23:33.516587
Next check: 2026-11-24 05:23:33.496923
$ submit: