GithubHelp home page GithubHelp logo

aljen / spaghetti Goto Github PK

View Code? Open in Web Editor NEW
103.0 8.0 16.0 1.49 MB

Graphical logic editor/simulator

License: MIT License

CMake 4.55% C++ 91.81% C 3.63%
logic editor simulation cpp17 cpp14 cpp cpp-library logic-gates logic-circuit-simulator qt5

spaghetti's Introduction

Spaghetti - graphical logic editor/simulator

Build status Build status MIT License

Screenshots

spaghetti.gif spaghetti2.gif

Features

  • Feedback loops
  • Custom plugins
  • Run-time wiring

Rich library of built-in elements

Logic Gates

  • AND
  • NAND
  • NOR
  • NOT
  • OR

logic_gates.gif

Conditionals

  • A ≥ B
  • A > B
  • A ≡ B
  • A < B
  • A ≤ B

logic_conditionals.gif

Memory

  • Set-Reset
  • Reset-Set

logic_memory.gif

Multiplexing

  • Multiplexer
  • Demultiplexer

logic_multiplexing.gif

Edge detection

  • Rising edge detection

logic_detect_rising.gif

  • Falling edge detection

logic_detect_falling.gif

Math

  • abs(VALUE)

math_abs.gif

  • sin(ANGLE)
  • cos(ANGLE)

math_sincos.gif

  • lerp(MIN, MAX, T)

math_lerp.gif

  • sign

math_sign.gif

  • add
  • subtract
  • multiply
  • divide

math_operations.gif

  • add_if
  • subtract_if
  • multiply_if
  • divide_if

math_operations_if.gif

  • BCD

spaghetti.gif

Pneumatic

  • Tank
  • Valve

Timers

  • Simulation delta time

timers_delta_time.gif

  • Clock

logic_gates.gif

  • T_ON

timers_t_on.gif

  • T_OFF

timers_t_off.gif

  • T_PULSE

logic_detect_falling.gif

Values

  • Const bool
  • Const integer
  • Const float

values_consts.gif

  • min(A, B)
  • max(A, B)
  • clamp(VALUE, MIN, MAX)

values_min_max_clamp.gif

  • Degree to radian
  • Radian to degree

values_convert_angle.gif

  • Int to float
  • Float to integer

values_convert_int_float.gif

  • Characteristic curve with editor

values_characteristic_curve.gif

License

This project is licensed under the MIT License - see the LICENSE file for details.

spaghetti's People

Contributors

aljen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spaghetti's Issues

Building from source

Nice project !

Would be interesting to make more complicated chips emulation components (like 65C02 etc) ...

Had some troubles building from source - so leaving for others as reference

sudo apt-get install build-essential cmake qtbase5-dev qtdeclarative5-dev
cd /src && git clone --depth 1 --recurse-submodules https://github.com/aljen/spaghetti
cd /src/spaghetti && mkdir -p build && cd build && cmake .. && make
cd /src/spaghetti/build && mkdir -p packages && ./SpaghettiEditor 

Build Failed -- Detecting CXX boost::filesystem support -- NOT FOUND

Hello Aljen,

First of all, I wanted to thank you for your contribution with this wonderful project! I've been trying to build from source now for a few days, and I'm facing the typical problems that come along with trying to build a project that was written even just a few years ago, with the most updated versions of everything.

Somewhere along the way, I've run into some problem. I don't know how I got myself into this mess, but after many hours of googling, and no luck anywhere, I've come to asking you for help.

--

The Error I listed in the title has been persistent in pretty much all compilers. MSVC 16, MSVC 17, MinGW, MSYS2. No matter what magic I tried with either CMake or b2 for building Boost, I could not get CMake to see the filesystems library. Everything else seems to load fine, but its this filesystems Boost library that is getting hung up somewhere.

I've been using Boost 1.80.0, and if I'm a complete pinecone and just need to try an older combination of libraries, I'll do what I gotta do.

Like I said, I tried this with multiple compilers and could not get any of them to produce a successful result. I'll admit, I'm somewhat new to Boost, but I've got it working before, with other projects. Just not the filesystems library. I have the files in the correct folder, and it seems to be installed, but CMake just cannot see it.

I'm running Windows 11, with MinGW (TDM-64) as my compiler. Also, I'm using CLion, but I do the same commands from the terminal that CLion does, and it gives the same results. As well as from MinGW command prompt, or Visual Studio Command prompt, etc. No luck...

For reference, I've visited and tried/read several of the following:

https://stackoverflow.com/questions/54290254/problem-adding-stdfilesystem-to-cmake-project

https://stackoverflow.com/questions/46496549/how-to-find-boost-filesystem-library-compiled-with-vs-2017-with-cmake

https://stackoverflow.com/questions/57870032/cmake-v3-15-3-cannot-find-boost-v1-71-0

I could list some more, but I though I'd just let you know what I'm dealing with, and let you get to it when you have time.

I'm very interested in contributing to this project, it looks like it hasn't had a lot of progress for a while, and there were a couple issues in the queue that I think I could tackle, if I could get the dang project to build. facepalm

Thanks in advance for your help with this, again, I'd love to contribute to the project, and add some of the requested functionalities, but I just need to get the project building!

-John

Build tutorial request

Hello, I know this is probably an inappropriate place to ask,
but I'm struggling to build this project with visual studio cmake.

Could you maybe include a small tutorial how to do it from start to finish, @aljen?
That would be great so I could finally tinker with your marvellous creation.

Set up CI

  • Setup Travis CI
  • Setup AppVeyor CI

Simplify & clean project

  • Move Node/Element/Registry to spaghetti namespace
  • Modernize CMakeLists.txt:
  • Get rid of boost
  • Implement SharedLibrary
  • Detect & use C++ filesystem
  • Set flags per target
  • Export/install library
  • Add support for CPack

Can't install due to incomplete privileges

I've been trying to install this excellent tool for the last 2 weeks. I have built the INSTALL solution, but I get a std::bad_alloc error when the addElement function is called. I'm new to the C++ build process.

I am desperate to make this tool work because it looks perfect for my application. I'm on a work computer so I cannot give it unfettered access to everything.

Can someone please share an portable version so I can just click and run? Please.

Allow linking elements backwards in the x-direction

Hey, what a beautiful piece of software. Thank you so much. This seems to me to be so much more elegant and capable than most other tools with a really rich selection of objects and a modern simple user interface.

I'm trying to draw the following logic circuit:

image

I've struggled a bit -- partly because it seems difficult to link a node to another node which comes prior in the x direction. The routing just doesn't appear to work for this case.

Here's my best effort:

image

You can see the loop back in the top right corner of the first diagram can't be adequately represented in spaghetti without the edges overlapping the nodes or making other compromises.

Cleanup

  • Move headers for all elements to <spaghetti/elements>
  • Fix sparsepp as it's not being copied to <spaghetti/vendor>
  • Update vendor libs

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.