{"id":24598746,"url":"https://github.com/abdulrhman-dev/circuit-simulator","last_synced_at":"2025-03-18T06:17:26.781Z","repository":{"id":267317104,"uuid":"885203387","full_name":"abdulrhman-dev/circuit-simulator","owner":"abdulrhman-dev","description":"A simple circuit solver that solves DC circuits that contain independent sources and resistors.","archived":false,"fork":false,"pushed_at":"2024-12-09T16:22:40.000Z","size":3796,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T12:46:08.536Z","etag":null,"topics":["circuit-simulator","circuit-solver","circuits","cpp","dc","graphics","mna","raylib"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abdulrhman-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T06:38:39.000Z","updated_at":"2025-01-12T18:30:23.000Z","dependencies_parsed_at":"2024-12-09T17:44:01.406Z","dependency_job_id":null,"html_url":"https://github.com/abdulrhman-dev/circuit-simulator","commit_stats":null,"previous_names":["abdulrhman-dev/circuit-simulator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdulrhman-dev%2Fcircuit-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdulrhman-dev%2Fcircuit-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdulrhman-dev%2Fcircuit-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdulrhman-dev%2Fcircuit-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdulrhman-dev","download_url":"https://codeload.github.com/abdulrhman-dev/circuit-simulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166762,"owners_count":20409180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circuit-simulator","circuit-solver","circuits","cpp","dc","graphics","mna","raylib"],"created_at":"2025-01-24T12:45:01.076Z","updated_at":"2025-03-18T06:17:26.749Z","avatar_url":"https://github.com/abdulrhman-dev.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/9494c07a-1433-44f5-8ea2-fa535fb48f23\" width=\"500\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e \nCircuit Simulator\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/C%2B%2B-00599C?style=for-the-badge\u0026logo=c%2B%2B\u0026logoColor=white\" \u003e\n  \u003cimg src=\"https://img.shields.io/badge/Visual_Studio-5C2D91?style=for-the-badge\u0026logo=visual%20studio\u0026logoColor=white\" \u003e\n  \u003cimg src=\"https://img.shields.io/badge/Windows-0078D6?style=for-the-badge\u0026logo=windows\u0026logoColor=white\" \u003e\n\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e \n  A circuit simulator that provides an intuitive platform for designing, modifying, and solving simple DC circuits. \n\u003c/p\u003e\n\n## Features\n\n- ✅ **Interactive Circuit Design:** Create circuit elements like resistors, voltage sources, current sources, wires, and ground on a user-friendly grid interface.\n\n- ✅ **Efficient Value Input:** Update circuit element values directly with support for metric prefixes (e.g., k, M, µ) for precision.\n\n- ✅ **Seamless Input Navigation:** Quickly switch between circuit elements to modify values.\n\n- ✅ **Multiple Circuits:** Design and solve multiple circuits simultaneously within a single canvas.\n\n- ✅  **Easy Circuit Solving:** Solve the circuit and hover over nodes and elements to view detailed information like voltage and current values.\n\n- ✅ **Error Detection:** Automatically identifies and alerts you to invalid circuit configurations.\n\n- ✅ **Camera Control and Zoom:** Adjust the view and zoom level to easily navigate and manage large circuits.\n\n- ✅ **Undo/Redo Actions:** Effortlessly correct mistakes with undo functionality.\n\n## User Guide\n\n### 1. Creating a Circuit Element  \n- **Start Drawing**: Click on any grid intersection to begin creating a circuit element. The element will extend from the clicked intersection to the mouse cursor position.  \n- **Cancel Creation**: Right-click or press `Ctrl + Z` to cancel the creation.  \n- **Complete Element**: Click on another grid intersection to finalize the circuit element.  \n- **Switch Elements**: Press the first character of a circuit element to switch to its drawing mode:\n  - `R`: Resistor\n  - `V`: Voltage Source\n  - `C`: Current Source\n  - `W`: Wire\n  - `G`: Ground\n\n---\n\n### 2. Modifying Circuit Element Values  \n- **Single Element Input**:\n  - Left-click on the element to enter input mode.  \n  - Type the desired value and press `Enter` (metrix prefixes can be added at the end).\n  - Supported metric prefixes include:\n    - `p`: $`10^{-12}`$\n    - `n`: $`10^{-9}`$\n    - `µ`: $`10^{-6}`$ (write `u` instead of µ)\n    - `m`: $`10^{-3}`$\n    - `k`: $`10^3`$\n    - `M`: $`10^6`$\n    - `G`: $`10^9`$\n\n- **Multiple Elements Input**:\n  - Press `Tab` to navigate to the next element.\n  - Press `Shift + Tab` to navigate to the previous element.\n  - Input mode exits when:\n    - `Enter` is pressed.\n    - `Shift + Tab` is pressed on the first element.\n    - `Tab` is pressed on the last element.\n\n---\n\n### 3. Solving the Circuit  \n- **Solve Command**: Press `Ctrl + Enter` to solve the circuit (multiple circuits can be solved in one canvas).  \n- **View Results**:\n  - Hover over nodes to see nodal voltages.  \n  - Hover over elements to view voltage differences and currents.  \n- **Error Handling**: Invalid circuits will display an error message.\n\n---\n\n### 4. Extra Features  \n- **Camera Controls**:\n  - Move the view: Hold `Right Click` and drag the mouse.  \n  - Zoom in/out: Use the mouse wheel or press `Ctrl + =` / `Ctrl + -`.  \n- **Undo Actions**: Press `Ctrl + Z` to undo the last action.  \n\n---\n\n### 5. Shortcuts Summary  \n\n| **Action**                   | **Shortcut**           |  \n|-------------------------------|------------------------|  \n| Draw Resistor                | `R`                   |  \n| Draw Voltage Source          | `V`                   |  \n| Draw Current Source          | `C`                   |  \n| Draw Wire                    | `W`                   |  \n| Draw Ground                  | `G`                   |  \n| Cancel Element Creation      | `Right Click`         |  \n| Enter Input Mode             | `Left Click on Element` |  \n| Enter Input Mode for First Element  | `Tab` |  \n| Navigate to Next Element     | `Tab`                 |  \n| Navigate to Previous Element | `Shift + Tab`         |  \n| Solve Circuit                | `Ctrl + Enter`        |  \n| Move Camera                  | `Right Click + Drag`  |  \n| Zoom In/Out                  | `Mouse Wheel` / `Ctrl + =` / `Ctrl + -` |  \n| Undo Last Action             | `Ctrl + Z`            |  \n\n---\n\n## Project Setup\n\n### Steps\n\n**1.\tInstall Raylib on your system:**\n\nOne of the easiest ways to install Raylib is using `vcpkg`\nFollow this video for instructions: [here](https://youtu.be/UiZGTIYld1M?si=jz9CSbnuvEvrdDks)\n\n**2.\tClone the  repository:**\n\n\u003cimg src=\"https://github.com/user-attachments/assets/29d99323-fb76-4faf-a792-754b7ee34da0\" alt=\"Example Image\" width=\"400\"\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/a52fa04c-52dc-4ca4-8096-5a4ddb12b2d8\" alt=\"Example Image\" width=\"400\"\u003e\n\n**3. You’re done!:**\n\nRun the  project via  `Ctrl + F5`.\n\n\u003cimg src=\"https://github.com/user-attachments/assets/5b9cef7b-7ec0-4cc5-b673-1fb0f2caa122\" alt=\"Example Image\" width=\"400\"\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdulrhman-dev%2Fcircuit-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdulrhman-dev%2Fcircuit-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdulrhman-dev%2Fcircuit-simulator/lists"}