New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

pyslvs

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pyslvs

Pyslvs core module. An open source planar linkage mechanism synthesis tool.

22.7.0
100

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

70

License

Maintainers
1

PyPI Language grade: Python

Pyslvs Libraries

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

Installation

Install from PyPI:

pip install pyslvs

Or install and test from source:

pip install -e .
python test

Documentation

Run the solver through an example:

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.

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts