Metadata-Version: 2.1
Name: pyslvs
Version: 22.5.0
Summary: Pyslvs core module. An open source planar linkage mechanism synthesis tool.
Home-page: https://github.com/KmolYuan/pyslvs
Author: Yuan Chang
Author-email: pyslvs@gmail.com
License: AGPL
Keywords: pyslvs,mechanical-engineering,2d
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Cython
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

[![PyPI](https://img.shields.io/pypi/v/pyslvs.svg)](https://pypi.org/project/pyslvs/)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/KmolYuan/pyslvs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/KmolYuan/pyslvs/context:python)

# Pyslvs Libraries

A no-GUI module of mechanism synthesis system and a 2D geometric constraint solver.

## Installation

Install from PyPI:

```bash
pip install pyslvs
```

Or install and test from source:

```bash
pip install -e .
python test
```

## Documentation

Run the solver through an example:

```python
from pyslvs import example_list, parse_vpoints, t_config, expr_solving

# Get example with name
expr, inputs = example_list("Jansen's linkage (Single)")
# Parse the mechanism expression into a list of joint data
vpoints = parse_vpoints(expr)
# Config joint data and control data for the solver
exprs = t_config(vpoints, inputs)
# Solve the position
result = expr_solving(exprs, vpoints, {pair: 0. for pair in inputs})
# Get the result from joint 7
x, y = result[7]
print(x, y)  # -43.170055 -91.753226
```

The documentation of Pyslvs library is on [Readthedocs](https://pyslvs-ui.readthedocs.io/en/latest/pyslvs-lib/).

If you have any questions, please post on GitHub issue or contact <pyslvs@gmail.com>.
