A GUI-based (PyQt5) tool used to design 2D linkage mechanism.

Overview

Build status Build status Documentation Status GitHub repo size in bytes Downloads

Language grade: Python PyPI sourceforge

kernel kernel

pyslvs-icon Pyslvs-UI

A GUI-based (PyQt5) tool used to design 2D linkage mechanism.

  • Planar Linkages Simulation
  • Mechanical Synthesis
    • Number Synthesis: Combine the attributes of mechanism.
    • Structural Synthesis: Cython algorithm used to find out structural possibilities of the mechanism.
    • Dimensional Synthesis: Kernel from the three Cython algorithms (rewrite).
  • Websites
  • Others
    • Cross three platforms.
    • CAD-like user interface.
    • Auto layout of generalized chain.
    • The code is following with Python Enhancement Proposals (PEP):

If you have any question, please post on GitHub issue or contact [email protected].

Getting Started

Executables

Download portable executable file of your platform.

PyPI

pip install pyslvs-ui

Source

Branch master is in development, use stable branch to install stable dependencies directly.

git checkout stable
pip install -e .

There are more detailed instructions in the documentation.

Libraries

Pyslvs has a solver backend that can works without the GUI:

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

Please see the documentation for more information.

Documentation

The documentation of Pyslvs and kernel API. Start it from sources:

pip install mkdocs
pip install -r doc-requirements.txt
mkdocs serve

Cite

Please see the reference.

Comments
  • [AppImage] v18.2.0.glibc2.17 does not work on Debian Stretch 9.3

    [AppImage] v18.2.0.glibc2.17 does not work on Debian Stretch 9.3

    I downloaded the most recent release, pyslvs-18.2.0.glibc2.17-x86_64.AppImage. It does not work on Debian Stretch 9.3.

    $> ./pyslvs-18.2.0.glibc2.17-x86_64.AppImage 
    
    Traceback (most recent call last):
      File "/tmp/.mount_J3kT0G/usr/bin/pyslvs", line 6, in <module>
        from core import *
      File "/tmp/.mount_J3kT0G/usr/bin/core/__init__.py", line 10, in <module>
        from .info import *
      File "/tmp/.mount_J3kT0G/usr/bin/core/info/__init__.py", line 9, in <module>
        from .info import (
      File "/tmp/.mount_J3kT0G/usr/bin/core/info/info.py", line 23, in <module>
        import requests
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/requests/__init__.py", line 43, in <module>
        import urllib3
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/urllib3/__init__.py", line 8, in <module>
        from .connectionpool import (
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/urllib3/connectionpool.py", line 11, in <module>
        from .exceptions import (
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/urllib3/exceptions.py", line 2, in <module>
        from .packages.six.moves.http_client import (
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/urllib3/packages/__init__.py", line 3, in <module>
        from . import ssl_match_hostname
      File "/tmp/.mount_J3kT0G/usr/lib/python3.5/site-packages/urllib3/packages/ssl_match_hostname/__init__.py", line 9, in <module>
        from ssl import CertificateError, match_hostname
      File "/usr/lib/python3.5/ssl.py", line 135, in <module>
        PROTOCOL_SSLv23 = _SSLMethod.PROTOCOL_SSLv23 = _SSLMethod.PROTOCOL_TLS
      File "/usr/lib/python3.5/enum.py", line 274, in __getattr__
        raise AttributeError(name) from None
    AttributeError: PROTOCOL_TLS
    

    Maybe you want to reach out to the IRC channel #AppImage on Freenode. There you'll find AppImage developers who are willing to help fix any problems you may have with packaging and testing your AppImage.

    opened by KurtPfeifle 15
  • [ENH] Extract calculation functions from GUI

    [ENH] Extract calculation functions from GUI

    Hi! First of all I would like to say that this system is amazing, it works great!

    I would like to use this in my thesis with Reinforcement learning in which I am creating mechanism (1-DOF, derived from a fourbar linkage) from python and I need to get the trajectories of those mechanism as fast as possible (3trajectories /second). Is there any way of defining the mechanism in a script and get the trajectories there without using the GUI interface ?

    This is how I define the linkages in python currently image

    Thanks in advance for your help!

    enhancement question 
    opened by juanma9613 10
  • AppImage builds for Linux

    AppImage builds for Linux

    @KmolYuan, thank you for the DEB's produced for KUbuntu 16.04, but it look little incomplete (no dependency information included)

    What about producing AppImages, that could run on near all Linux-based distributives?

    @probonopd, please, take a look and give an instructon how produce AppImage for Pyslvs under KUbuntu 16.04

    • https://github.com/KmolYuan/Pyslvs-PyQt5/releases
    opened by Symbian9 6
  • Can't Maximize program window

    Can't Maximize program window

    When try Maximize (Ctrl+Alt+5) program window size of it just freezed.

    The only way to change window is manually drag each windowborder or use "Filex -> Full screen (Shift+F1)"

    Pyslvs: v0.9.0(beta3) OS: Linux Mint 18 Xfce (64bit)

    opened by Symbian9 4
  • Compilation error on Mac OSX - symbol(s) not found

    Compilation error on Mac OSX - symbol(s) not found

    Hi,

    I would like to try your software but I get the following error during compilation (make build-kernel):

    [...]
     slvs_wrap.o
          SWIG_Py_Void() in slvs_wrap.o
          SWIG_Python_NewShadowInstance(SwigPyClientData*, _object*) in slvs_wrap.o
          SWIG_Python_AppendOutput(_object*, _object*) in slvs_wrap.o
      "__Py_NotImplementedStruct", referenced from:
          SwigPyObject_richcompare(SwigPyObject*, SwigPyObject*, int) in slvs_wrap.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [_slvs.so] Error 1
    make: *** [build-solvespace] Error 2
    

    I tried few workaround with no success. Any idea ?

    macOS support 
    opened by matthieu-lapeyre 3
  • Linkage operational functions

    Linkage operational functions

    Let the linkage has more interactions on main canvas just like points.

    • [x] Merge function to move points to another linkage, then delete the original linkage.
    • [x] Select function.
      • Switch selection mode by entities tab widget.
      • Save selected item for each table.
    • [x] Free move function for adjust dimension of linkages.
    enhancement 
    opened by KmolYuan 3
  • [DOC] The docs don't seem to display well in Safari, Firefox, and Chrome (haven't tried more yet)

    [DOC] The docs don't seem to display well in Safari, Firefox, and Chrome (haven't tried more yet)

    When I open the documentation (https://pyslvs-ui.readthedocs.io/en/stable/python-solvespace-api/) I mostly see some huge search and code icons, it does show a menu but returns 404 errors as I navigate through it. I would love to dig in to this documentation though as I'm eager/curious to use the library for a course I am teaching on Algorithmic Folding (lecture = linkage folding)

    so far I tested with Chrome, Firefox, and Safari, happy to test more if that helps

    I love this project, thanks so much for putting this together!

    opened by ThijsRoumen 2
  • Compilation error using MSYS2

    Compilation error using MSYS2

    Traceback (most recent call last):
      File "launch_pyslvs.py", line 12, in <module>
        main()
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\__init__.py", line 49, in main
        from .core.main_window import MainWindow
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\core\main_window\__init__.py", line 24, in <module>
        from .io import IOMethodInterface
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\core\main_window\io.py", line 57, in <module>
        from .actions import ActionMethodInterface
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\core\main_window\actions.py", line 21, in <module>
        from .storage import StorageMethodInterface
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\core\main_window\storage.py", line 27, in <module>
        from .solver import SolverMethodInterface
      File "Y:\tmp\Pyslvs-UI\pyslvs_ui\core\main_window\solver.py", line 24, in <module>
        from pyslvs import (
    ImportError: cannot import name 'SolverSystem' from 'pyslvs' 
    
    invalid 
    opened by mdecourse 2
  • Can't run v0.9.0

    Can't run v0.9.0

    Pyslvs-PyQt5 version: 0.9.0 OS: MX Linux MX-17 (Debian 9 "Stretch"), x86_64 (64-bit)

    $ ./pyslvs-0.9.0.glibc2.17-x86_64.AppImage
    zenity, kdialog, Xdialog missing. Skipping /var/tmp/.mount_bbVPnT/usr/bin//pyslvs.wrapper.
    Traceback (most recent call last):
      File "/var/tmp/.mount_bbVPnT/usr/bin/pyslvs", line 6, in <module>
        from core.info.info import INFO, args
      File "/var/tmp/.mount_bbVPnT/usr/bin/core/info/info.py", line 21, in <module>
        import platform
      File "/usr/lib/python3.5/platform.py", line 117, in <module>
        import sys, os, re, subprocess
      File "/usr/lib/python3.5/subprocess.py", line 50, in <module>
        import signal
      File "/usr/lib/python3.5/signal.py", line 3, in <module>
        from functools import wraps as _wraps
      File "/var/tmp/.mount_bbVPnT/usr/lib/python3.5/functools.py", line 23, in <module>
        from weakref import WeakKeyDictionary
      File "/var/tmp/.mount_bbVPnT/usr/lib/python3.5/weakref.py", line 12, in <module>
        from _weakref import (
    ImportError: cannot import name '_remove_dead_weakref'
    $ 
    
    opened by Symbian9 2
  • "bata" (typo mistake in versioning)

    Version 0.9 bata 1

    This typo mistake should be fixed to "Version 0.9 beta 1". But I also recommend write it as "Pyslvs-PyQt5 0.9-beta.1", and as tag use v0.9-beta.1

    Also recommend you read the guide "Semantic Versioning"

    • http://semver.org

    "Semantic Versioning" now is most popular versioning sheme for user software.

    REFERENCE

    • https://www.sitepoint.com/semantic-versioning-why-you-should-using/
    • https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e
    • https://en.wikipedia.org/wiki/Software_versioning
    opened by Symbian9 2
  • [BUG] release v20.08.0 Mac OS 10.15.1 版本启动闪退

    [BUG] release v20.08.0 Mac OS 10.15.1 版本启动闪退

    Describe the bug A clear and concise description of what the bug is. v20.08.0 Mac Release 版本 在 Mac OS 10.15.1 上启动后会直接崩溃退出,没有任何提示.

    PS. 如果哪位恰巧看到这条信息,并想在北京找一份机械设计师的工作请跟看看我们公司,想必喜欢这个软件的人都是能力极强的. http://www.autolabor.com.cn/join

    To Reproduce Steps to reproduce the behavior:

    1. 解压下载的安装包
    2. 点击启动程序
    3. 程序直接退出

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: Mac OS
    • Version: 10.15.1

    Additional context Add any other context about the problem here.

    macOS support 
    opened by apachecd 1
  • [BUG]

    [BUG]

    Not sure if this is the correct place to report this, but

    pip install python-solvespace
    

    does not install on Ubuntu22.04

    In file included from python_solvespace/src/constraint.cpp:7:
          python_solvespace/src/solvespace.h:39:10: fatal error: Eigen/SparseCore: No such file or directory
             39 | #include <Eigen/SparseCore>
                |          ^~~~~~~~~~~~~~~~~~
          compilation terminated.
    
    
    opened by jloveric 0
  • [ENH] Plotting time histories of positions, velocities and accelerations

    [ENH] Plotting time histories of positions, velocities and accelerations

    Hi,

    this software is really great, thank you for sharing it. I just want to suggest an improvement to make it even better. Would it be possible to add an option to plot time histories of positions, velocities and accelerations for selected points ? It seems that currently these variables can be plotted only with respect to position. Such a feature would be very useful in my opinion.

    opened by FEA-eng 0
  • [BUG] Slider-crank mechanism doesn't work with aligned points

    [BUG] Slider-crank mechanism doesn't work with aligned points

    Hi,

    I think that I've encountered a bug. I followed this tutorial: https://www.youtube.com/watch?v=cB5wYyc0J0c

    and modeled a simple slider-crank mechanism:

    slider crank

    The problem is that it doesn't work properly - you can see that the curves showing paths of points belonging to the mechanism are very short and motion of this linkage can't be simulated. However, it happens only when point 0 and point 2 have the same Y coordinate. When I move one of them slightly above or below the other, it starts working:

    slider crank 2

    I also attached the .pyslvs file packed to zip below. Would it be possible to fix this bug ?

    Crank slider problem.zip

    opened by FEA-eng 0
Releases(v22.07.0)
Program for analyzing shadows from Cassini images

Moons: An Analysis Module for Vicar Files General This packages/program was created for my bachelor's thesis for the Astronomy department at Universit

Joni 1 Jul 16, 2021
A Blender add-on to create interesting meshes using symmetry

Procedural Symmetries This Blender add-on automates the process of iteratively applying a set of reflection planes to a base mesh. The result will con

1 Dec 29, 2021
Seaborn-image is a Python image visualization library based on matplotlib and provides a high-level API to draw attractive and informative images quickly and effectively.

seaborn-image: image data visualization Description Seaborn-image is a Python image visualization library based on matplotlib and provides a high-leve

48 Jan 05, 2023
A GUI-based (PyQt5) tool used to design 2D linkage mechanism.

Pyslvs-UI A GUI-based (PyQt5) tool used to design 2D linkage mechanism. Planar Linkages Simulation Python-Solvespace: Kernel from Solvespace with Cyth

Yuan Chang 141 Dec 13, 2022
An python script to convert images to upscaled versions made out of one-colour emojis.

ABOUT This is an python script to convert png, jpg and gif(output isnt animated :( ) images to scaled versions made out of one-colour emojis. Please n

0 Oct 19, 2022
A functional and efficient python implementation of the 3D version of Maxwell's equations

py-maxwell-fdfd Solving Maxwell's equations via A python implementation of the 3D curl-curl E-field equations. This code contains additional work to e

Nathan Zhao 12 Dec 11, 2022
Convert a DOS Punk image to text

DOS Punk Text Inspired by MAX CAPACITY's DOS Punks & the amazing DOS Punk community. DOS Punk Text is a Python 3 script that renders a DOS Punk image

4 Jan 13, 2022
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
Blue noise image stippling in Processing (requires GPU)

Blue noise image stippling in Processing (requires GPU)

Mike Wong 141 Oct 09, 2022
Anime2Gif - an algorithm that detects scenes in a video and generates gifs from it

Anime2Gif Anime2Gif is an algorithm that detects scenes in a video and generates gifs from it. How to use To use it, first, you'll need to install it'

1 Dec 09, 2021
A 3D structural engineering finite element library for Python.

An easy to use elastic 3D structural engineering finite element analysis library for Python.

Craig 220 Dec 27, 2022
Hide sensitive information in images

Data-Preserved Script allowing to blur the most sensitive information on images. Prerequisites Before you begin, ensure you have met the following req

2 Dec 01, 2021
Convert bitmap images to seeds for Tiny-83 NFT project.

What is this? This tool allows you to convert any 14p high and 22p wide Bitmap (.bmp) to the seed needed for the Tiny-83 NFT project. Project Twitter:

shib_maximalist 1 Oct 31, 2021
Pixel art as well as various sets for hand crafting

Pixel art as well as various sets for hand crafting

1 Nov 09, 2021
Computer art based on joining transparent images

Computer Art There is no must in art because art is free. Introduction The following tutorial exaplains how to generate computer art based on a series

Computer Art 12 Jul 30, 2022
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 2022
Convert HDR photos taken by iPhone 12 (or later) to regular HDR images

heif-hdrgainmap-decode Convert HDR photos taken by iPhone 12 (or later) to regular HDR images. Installation First, make sure you have the following pa

Star Brilliant 5 Nov 13, 2022
Script that organizes the Google Takeout archive into one big chronological folder

Script that organizes the Google Takeout archive into one big chronological folder

Mateusz Soszyński 1.6k Jan 09, 2023
SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration

SimpleITK is an image analysis toolkit with a large number of components supporting general filtering operations, image segmentation and registration

672 Jan 05, 2023
Change the image one color channel at a time.

Building-a-Contact-Sheet This hands-on Project is in Python 3 Programming Specialization offered by University of Michigan via Coursera. change the im

Eszter Pai 1 Jan 03, 2022