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)
MaryJane is a simple MJPEG server written in Python.

MaryJane is a simple MJPEG server written in Python.

bootrino 152 Dec 13, 2022
Sombra is simple Raytracer written in pure Python.

Sombra Sombra is simple Raytracer written in pure Python. It's main purpose is to help understand how raytracing works with a clean code. If you are l

Hernaldo Jesus Henriquez Nuñez 10 Jul 16, 2022
Tweet2Image - Convert tweets to Instagram-friendly images.

Convert tweets to Instagram-friendly images. How to use If you want to use this repository as a submodule, don't forget to put the fonts d

Janu Lingeswaran 1 Mar 11, 2022
FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it.

FrostedGlass FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it. The effect is drawn on t

Kivy Garden 24 Dec 10, 2022
Docbarcodes extracts 1D and 2D barcodes from scanned PDF documents or images. It can be used to automate extraction and processing of all kind of documents.

Intro Barcodes are being used in many documents or forms to enable machine reading capabilities and reduce manual processing effort. Simple 1D barcode

Arlind Nocaj 3 Jun 18, 2022
将位图转为彩色矢量 svg 图片

一个将位图描摹为彩色矢量 svg 图片的程序,是一个命令行工具,使用 Python 脚本实现,运行环境 Python3.8+。 ✨ 效果 以一个字帖图片为例,这是 png 格式的位图(370KB): 这是颜

Haujet Zhao 104 Dec 30, 2022
Next-generation of the non-destructive, node-based 2D image graphics editor

Non-destructive, node-based 2D image graphics editor written in Python, focused on simplicity, speed, elegance, and usability

Gimel Studio 238 Dec 30, 2022
With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen

Oraxen-item-to-yml With this simple py script you will be able to get all the .png from a folder and generate a yml for Oraxen How to use Install the

Akex 1 Dec 29, 2021
An agnostic Canvas API for the browser-less and insane

Apollo An agnostic Canvas API for the browser-less and mildly insane. Project Apollo is a Pythonic re-imagining of HTML Canvas element implementati

1 Jan 13, 2022
CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures.

CropImage is a simple toolkit for image cropping, detecting and cropping main body from pictures. Support face and saliency detection.

Haofan Wang 15 Dec 22, 2022
Group of interfaces interesting for users

Project: Interface to create GIF animation based on Fourier Series.

5 Aug 17, 2021
Simple mathematical operations on image, point and surface layers.

napari-math This package provides a GUI interfrace for simple mathematical operations on image, point and surface layers. addition subtraction multipl

Zach Marin 2 Jan 18, 2022
Nudity detection with Python

nude.py About Nudity detection with Python. Port of nude.js to Python. Installation from pip: $ pip install --upgrade nudepy from easy_install: $ eas

Hideo Hattori 881 Jan 06, 2023
This Github Action automatically creates a GIF from a given web page to display on your project README

This Github Action automatically creates a GIF from a given web page to display on your project README

Pablo Lecolinet 28 Dec 15, 2022
Fast Image Retrieval is an open source image retrieval framework

Fast Image Retrieval is an open source image retrieval framework release by Center of Image and Signal Processing Lab (CISiP Lab), Universiti Malaya. This framework implements most of the major binar

CISiP Lab 39 Nov 25, 2022
Transfers a image file(.png) to an Excel file(.xlsx)

Transfers a image file(.png) to an Excel file(.xlsx)

Junu Kwon 7 Feb 11, 2022
Repair broken bookmarks to referenced files in Apple Photos

Repair Apple Photos Bookmarks Work in progress to repair file location bookmarks in Apple Photos. Background Starting in macOS 10.15/Catalina, photos

Rhet Turnbull 10 Nov 03, 2022
Image histogram remapping

Hmap An image histogram remapping script written in Python 2.7 by Anthony Kesich and Ross Goodwin. Changes source image so that source image's histogr

Ross Goodwin 199 Nov 19, 2022
Samila is a generative art generator written in Python

Samila is a generative art generator written in Python, Samila let's you create arts based on many thousand points. The position of every single point is calculated by a formula, which has random par

Sepand Haghighi 947 Dec 30, 2022
Goddard Image Analysis and Navigation Tool

Copyright 2021 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is clai

NASA 12 Dec 23, 2022