Git Product home page Git Product logo

vykstorm / pylib3d-mec-ginac Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 35.04 MB

Extension of the library lib3d-mec-ginac implemented in Python language.

License: GNU General Public License v2.0

Python 65.71% C++ 31.07% Jupyter Notebook 0.05% C 0.64% Objective-C 0.05% Dockerfile 0.36% Shell 0.14% HTML 1.98% Batchfile 0.01%
python cython extension cplusplus vtk visualization mechanics multibody-dynamics

pylib3d-mec-ginac's Introduction

Introduction

This package is an extension of the symbolical C++ library lib3d_mec_ginac for Python.

lib3d_mec_ginac provides all the features of a modern symbolic kernel (matrix algebra, expressions atomization, trigonometric simplifications, ...). It is designed specifically to pose and solve equations in dynamical mechanical multibody systems.

pylib3d_mec_ginac brings all the features of this library to a high level interpreted language with a clean and easy to use API and a graphical user interface to visualize mechanical simulations.

Installation

You will need python==3.7 and ubuntu OS ( 64-bit ). For the time being, only ubuntu 18.04 system was tested succesfully. Later versions of ubuntu and python may also work.

You can use this script to install this library and its dependencies in your system, or just run the next code in your bash console:

curl https://raw.githubusercontent.com/Vykstorm/pylib3d-mec-ginac/stable/install.sh | bash

Usage

This software can be used in different ways.

As a python module

Import all the functions & classes of this library inside the python interpreter and embed its features to your applications.

python
>>> from lib3d_mec_ginac import *
>>> ...

As a framework

Use the integrated graphical user interface where you can build and simulate mechanical systems within this library. The interface includes an interactive console to run arbitrary python code and a 3D viewer to display the mechanism.

The contextual menu provides options to change simulation parameters, open, edit and run python files, customize the interface, among other things.

Execute the next statement to start using it:

python -m lib3d_mec_ginac

framework

Try it online

Finally you can run a jupyter notebook and use this library. No installation needed, but features are limited ( 3D viewer is not avaliable ).

Try it now!

Documentation

Most of the classes and methods of the API are documented. You can use the command help inside the Python interpreter to get information about them e.g:

from lib3d_mec_ginac import System
help(System)

Also this page contains the reference of the API and a quick start tutorial.

Examples

This library provides a few usage examples under the directory examples/ Here we list a few of them

Four bar linkage

four-bar

Go to the directory where you downloaded this repository and run this example with:

python -m lib3d_mec_ginac examples/four_bar

Simple pendulum

simple-pendulum

Go to the directory where you downloaded this repository and run this example with:

python -m lib3d_mec_ginac example/simple_pendulum

License

This project is under GPLv2 license

pylib3d-mec-ginac's People

Contributors

vykstorm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aitorplaza

pylib3d-mec-ginac's Issues

Carga asíncrona de modelos 3D

Los modelos en 3D se obtienen conviertiendo archivos STL a obj, utilizando la herramienta OpenSCAD. Esto se lleva a cabo lanzando un subproceso ( cuando se invoca la función load_stl ).
El proceso de compilación del modelo 3D no es inmediato y a veces puede tardar varios segundos. Como resultado, la ejecución de ciertos programas puede verse realentizada.

Se propone cargar de forma asíncrona los modelos en 3D, de forma que el programa ( y la simulación del mecanismo ) pueda ejecutarse en paralelo. De modo que, cuando los modelos hayan sido cargados, se apliquen sobre las entidades de la escena de forma automática.

La ventana gráfica no se cierra al pulsar el botón X de la misma

La ventana gráfica no se cierra al pulsar el botón X. En vez de eso, esta se queda bloqueada hasta que la sesión en la consola termina ( enviando una señal SIGINT ).

Además, presionar la tecla Q tiene la misma función que el botón X ( eliminar esta lógica )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.