Skip to content

Abdullah Mohamed Report

Satvik Ramaprasad edited this page Aug 25, 2019 · 2 revisions

This is my final report for GSoC'19. After about 3 months of working, The project is finally done. I would like to thank GSoC program and circuitverse for this great journey. Also I would like to thank my mentor Mr.Satvik for his help and support during the project.

Project Goal

The organization "CircuitVerse" manages a site that provides free digital design platform for online users. One of the features the site provides is having a pre-made circuit used in your project as a sub-circuit. I was supposed to enhance the features of this specific part of the project "sub-circuits".

Summary

I added a menu for the user containing all the elements in his circuit that he is allowed to show on the surface of his subcircuit. The user is allowed to drag any of them and place it wherever he wants on his subcircuit. The user gets to choose some of the preperties for any element such as: label, using a properties menu. The user also can now control his circuit from the outside. This means that if a button is clicked on the surface of the subcircuit, the click is captured and the circuit is resolved as if the button was clicked from within the circuit. If you prefer a visual summary for the project, check this my GSoC final project video. The first 10 minutes shows enough.

Video Report

Code

This Pull Request is the final one gathering all the commits I have made since the start of my project. As this PR shows I made over 35 commits, added 824 lines of code to the branch.


All the PRs are merged to a branch "feature/subcircuit". This branch is unmerged yet to master, still need further testing. All the required tasks in my proposal have been made and a live preview can be seen in the video link at the end of the summary section above.


Project sections

1. Adding the sidebar customized element-menu

This menu will vary according to the circuit it represents. The user get a group of lists for the elements he can insert in his subcircuit. Also setting up the base for the changes that are to come in next phases.

PR: 394

2. Drag and Drop for elements

The user gets to click on an element in the list. The element adheres to the mouse until the mouse is clicked again. If the mouse is clicked within the borders of the sub-circuit rectangle, the element is placed. Else if it's placed outside, the element goes back to the list. The following screenshot represents a Hex-display element being dragged from the menu and placed inside the sub-circuit.

3. Render the elements and Properties menu for the element

Each element is drawn on the HTML5 canvas. Also each element has some properties, such as: label, label direction, and so on. Now the properties menu can change these 2 with addition to showing the label or not. How ever the code itself is build so that each element can override a specific object, allowing for a custom properties menu for each element. That is a very important concept: things must be easy to customized and change.

PRs: 401, 405, 410

4. A control panel from the outside

A sub-circuit is supposed to be a black-box. What is inside the circuit doesn't concern the user?! Not exactly !! What if the circuit contains some signal that the user wants to trigger by clicking a button. This last section of my project made this possible. The user can click on a button on the surface of his sub-circuit and viola!! It is the same as if he clicked the button inside. The following screenshot represent a sub-circuit that contains a button that controls a LED. The Button is clicked and the LED goes on.

PR: 420

To be done

  • Some of the render for the elements need to be adjusted, just to make it more beautiful.
  • As this crucial part contains a lot of circuit resolving logic, Further testing for the code need to be done by using a lot of test-circuits.

Additional links

My first blog, regarding the first 2 parts of my project Post

Clone this wiki locally