
Purpose of this post
This post publishes the source code used for the 3×3 cube app. The code is loaded only when you open a file.
Tools used
- Qt6 (Core, Gui, Widgets, OpenGL, Network) and OpenGL: the 3D cube and the photo import screen
- Kociemba two-phase search: the C code from muodov/kociemba included as is. It is GPL-2.0.
- Qwen3-VL-8B-Instruct (transformers, Mac MPS): the VLM scan server. It connects to the app over TCP.
Folder layout
- src/CubeModel: cube state, rotations, colour classification
- src/CubeWidget, MainWindow: OpenGL screen and mouse rotation, scramble/previous/next/oracle buttons
- src/CubePhotoReconstructor: reading 54 stickers from two photos, rule checks, automatic correction
- src/PhotoImportDialog: photo import, regular and VLM scans, the six-colour ring that appears when a sticker is clicked
- src/KociembaSolver, Oracle, BeginnerSolver, MoveSolver: solving. Used in the order Kociemba → short search → beginner layer-by-layer.
- src/TcpCubeVlmClient, vlm_server: VLM scan client and server
- tools/face_scan_cli.py: a command-line tool for checking colours one face at a time
- third_party/ckociemba: Kociemba C code
Build with cmake as described in the README. Build outputs, virtual environments, Kociemba table files (cache) and test photos are not included. The 82 test programs were left out because the test photo paths are hard-coded in them.
Full source
42 files · 11,309 lines — open a folder and click a file to load its code.
Project root
CMakeLists.txt
Loading code…
README.md
Loading code…
src/
src/BeginnerSolver.cpp
Loading code…
src/BeginnerSolver.h
Loading code…
src/CubeModel.cpp
Loading code…
src/CubeModel.h
Loading code…
src/CubePhotoReconstructor.cpp
Loading code…
src/CubePhotoReconstructor.h
Loading code…
src/CubeWidget.cpp
Loading code…
src/CubeWidget.h
Loading code…
src/KociembaSolver.cpp
Loading code…
src/KociembaSolver.h
Loading code…
src/main.cpp
Loading code…
src/MainWindow.cpp
Loading code…
src/MainWindow.h
Loading code…
src/MoveSolver.cpp
Loading code…
src/MoveSolver.h
Loading code…
src/Oracle.cpp
Loading code…
src/Oracle.h
Loading code…
src/PhotoImportDialog.cpp
Loading code…
src/PhotoImportDialog.h
Loading code…
src/TcpCubeVlmClient.cpp
Loading code…
src/TcpCubeVlmClient.h
Loading code…
third_party/
third_party/ckociemba/coordcube.c
Loading code…
third_party/ckociemba/cubiecube.c
Loading code…
third_party/ckociemba/facecube.c
Loading code…
third_party/ckociemba/include/color.h
Loading code…
third_party/ckociemba/include/coordcube.h
Loading code…
third_party/ckociemba/include/corner.h
Loading code…
third_party/ckociemba/include/cubiecube.h
Loading code…
third_party/ckociemba/include/edge.h
Loading code…
third_party/ckociemba/include/facecube.h
Loading code…
third_party/ckociemba/include/facelet.h
Loading code…
third_party/ckociemba/include/prunetable_helpers.h
Loading code…
third_party/ckociemba/include/search.h
Loading code…
third_party/ckociemba/prunetable_helpers.c
Loading code…
third_party/ckociemba/README.md
Loading code…
third_party/ckociemba/search.c
Loading code…
tools/
tools/face_scan_cli.py
Loading code…
vlm_server/
vlm_server/cube_vlm_server.py
Loading code…
vlm_server/README.md
Loading code…
vlm_server/requirements.txt
Loading code…
COMMENTS · CHAPTER 04
The full source code and the tools used 0 comments
No comments yet. Leave a question or anything you would like to add.
To post a comment, continue with Google and register a nickname and email address.
Continue with Google