Metadata-Version: 2.3
Name: pymadcad
Version: 0.19.1
Summary: Simple yet powerful CAD (Computer Aided Design) library, written with Python
License: LGPL v3
Author: jimy-byerley
Author-email: jimy.byerley@gmail.com
Requires-Python: >=3.8
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Provides-Extra: obj
Provides-Extra: ply
Provides-Extra: pyqt5
Provides-Extra: pyqt6
Provides-Extra: pyside6
Provides-Extra: stl
Requires-Dist: arrex (>=0.5.1,<0.6.0)
Requires-Dist: freetype-py (>=2.3,<3.0)
Requires-Dist: moderngl (>=5.6,<6.0)
Requires-Dist: numpy (>=1.1,<3)
Requires-Dist: numpy-stl (>=2.0,<3.0) ; extra == "stl"
Requires-Dist: pillow (>5,<12)
Requires-Dist: plyfile (>=0.7) ; extra == "ply"
Requires-Dist: pnprint (>=1.1,<2.0)
Requires-Dist: pyglm (>=2.5,<3.0)
Requires-Dist: pyqt5 ; extra == "pyqt5"
Requires-Dist: pyqt6 ; extra == "pyqt6"
Requires-Dist: pyside6 ; extra == "pyside6"
Requires-Dist: pywavefront (>=1.3,<2.0) ; extra == "obj"
Requires-Dist: pyyaml (>=5,<7)
Requires-Dist: scipy (>=1.3,<2.0)
Project-URL: Documentation, https://pymadcad.readthedocs.io
Project-URL: Homepage, https://madcad.netlify.app/pymadcad
Project-URL: Repository, https://github.com/jimy-byerley/pymadcad
Description-Content-Type: text/markdown

![madcad-logo](docs/logo.png)

# Py-MADCAD

*>>> it's time to throw parametric softwares out !*

Simple yet powerful CAD (Computer Aided Design) library, written with Python.

- [Official website](https://madcad.netlify.app)
- [Installation](https://pymadcad.readthedocs.io/en/latest/installation.html)
- [Documentation](https://pymadcad.readthedocs.io/)
- [Repository](https://github.com/jimy-byerley/pymadcad)
- [Matrix community](https://matrix.to/#/#madcad:matrix.org)

[![support-version](https://img.shields.io/pypi/pyversions/pymadcad.svg)](https://img.shields.io/pypi/pyversions/pymadcad)
[![PyPI version shields.io](https://img.shields.io/pypi/v/pymadcad.svg)](https://pypi.org/project/pymadcad/)
[![Documentation Status](https://readthedocs.org/projects/pymadcad/badge/?version=latest)](https://pymadcad.readthedocs.io/en/latest/?badge=latest)
[![#madcad:matrix.org](https://img.shields.io/matrix/madcad:matrix.org.svg)](https://matrix.to/#/#madcad:matrix.org)

## Features

- surface generation (3D sketch primitives, extrusion, revolution, inflation, tubes, ...)
- fast boolean operations
- common mesh file format import/export
- kinematic manipulation
- implicit geometry definition through the constraint/solver system
- objects display with high-quality graphics

![example-bearing](examples/bearing.png)

Checkout some [complete examples](examples)


## Sample usage

```python
from madcad import *

# define points
O = vec3(0)
A = vec3(2,0,0)
B = vec3(1,2,0)
C = vec3(0,2,0)

# create a list of primitives
line = [
	Segment(O, A),          
	ArcThrough(A, B, C),
	Segment(C,O),           
	]

# create and solve constraints
solve([
		Tangent(line[0], line[1], A),   
		Tangent(line[1], line[2], C),   
		Radius(line[1], 1.5),           
	], fixed=[O])

# generate surfaces
part = extrusion(line, vec3(0,0,1))

# display in a 3D scene
show([part])
```

The result will be this window
![example-window](docs/screenshots/readme-example.png)


## About

MADCAD is born from the idea that the current approach of parametric CADs for mechanical engineering is not the best possible. This library is part of a project targeting the best possible mechanical design tool for both engineers and handymen. See the 
[comparison](https://pymadcad.readthedocs.io/en/latest/concepts.html#comparison-with-existing-cad-softwares) 
for more details.

## License   ![LGPL logo](https://www.gnu.org/graphics/lgplv3-88x31.png)

Copyright 2019-2023 Yves Dejonghe <jimy.byerley@gmail.com>

This library is distributed under the LGPL-v3 license. A copy of that license is provided with this software.

