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)
Multi-view 3D reconstruction using neural rendering. Unofficial implementation of UNISURF, VolSDF, NeuS and more.

Multi-view 3D reconstruction using neural rendering. Unofficial implementation of UNISURF, VolSDF, NeuS and more.

Jianfei Guo 683 Jan 04, 2023
Instagram-like image filters.

PyGram Instagram-like image filters. Usage First, import the client: from filters import * Instanciate a filter and apply it: f = Nashville("image.jp

Ajay Kumar Nagaraj 0 Oct 18, 2022
HyperBlend is a new type of hyperspectral image simulator based on Blender.

HyperBlend version 0.1.0 This is the HyperBlend leaf spectra simulator developed in Spectral Laboratory of University of Jyväskylä. You can use and mo

SILMAE 2 Jun 20, 2022
An add to make adding screenshots and copied images to the scene easy

Blender Clipboard to Scene It doesn't work with version 2.93 and higher (I tested it on 2.91 and 2.83) There is an issue with importing the Pillow mod

Mohammad Mehdi Afkhami 3 Dec 29, 2021
Wand is a ctypes-based simple ImageMagick binding for Python

Wand Wand is a ctypes-based simple ImageMagick binding for Python, supporting 2.7, 3.3+, and PyPy. All functionalities of MagickWand API are implement

Eric McConville 1.2k Jan 03, 2023
Computer art based on quadtrees.

Quads Computer art based on quadtrees. The program targets an input image. The input image is split into four quadrants. Each quadrant is assigned an

Michael Fogleman 1.1k Dec 23, 2022
A not exist person image generator python module

A not exist person image generator python module

Fayas Noushad 2 Dec 03, 2021
Leshycam - Generate Inscryption styled portrait sprites from any image

Leshy's Camera Generate Inscryption styled portrait sprites from any image. Setu

3 Sep 27, 2022
Fixed Version Of Blender Low Poly Rock Generator For Blender 3.0.0

Blender (3.0.0) - Low Poly Rock Generator This is an addon for Blender 3.0.0 to generate low poly rocks. It was based on an addon that unfortunately h

3 Mar 24, 2022
Nutrify - take a photo of food and learn about it

Nutrify - take a photo of food and learn about it Work in progress. To make this a thing, we're going to need lots of food images... Start uploading y

Daniel Bourke 93 Dec 30, 2022
DP2 graph edit codes.

必要なソフト・パッケージ Python3 Numpy JSON Matplotlib 動作確認環境 MacBook Air M1 Python 3.8.2 (arm64) Numpy 1.22.0 Matplotlib 3.5.1 JSON 2.0.9 使い方 draw_time_histgram(

1 Feb 19, 2022
Make your master artistic punk avatar through machine learning world famous paintings

Master-art-punk Make your master artistic punk avatar through machine learning world famous paintings. 通过机器学习世界名画制作属于你的大师级艺术朋克头像 Nowadays, NFT is beco

蒋虎成 23 Jan 04, 2022
Avatar Generator Python

This is a simple avatar generator project which uses your webcam to take pictures and saves five different types of your images into your device including the original image.

Faisal Ahmed 3 Jan 23, 2022
⚡ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

ZenGL is a minimalist Python module providing exactly one way to render scenes with OpenGL.

Szabolcs Dombi 133 Dec 17, 2022
Fix datetime EXIF data in photos downloaded from Google Takeout

fix-google-takeout Warning Use at your own risk. Backup your photos. Overview Google takeout for photos

Mayank Mandava 20 Nov 05, 2022
Python modules to work with large multiresolution images.

Large Image Python modules to work with large, multiresolution images. Large Image is developed and maintained by the Data & Analytics group at Kitwar

Girder 136 Jan 02, 2023
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character.

Room Formatter This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character. There is cur

Thomas Landstra 1 Nov 13, 2021
Snowfall - helpful image handling utils - abstracts various file and opencv and pil features into result oriented functions

snowfall helpful image handling utils - abstracts various file and opencv and pil features into result oriented functions usage examples: from image_h

Less Wright 2 Jan 09, 2022
Draw a torus passing through three given points.

PyTorusThreePoints Draw a torus passing through three given points. Usage import numpy as np import pyvista as pv from torus_three_points.main import

2 Nov 19, 2021