GSoC 2020 with OpenSCAD

About the Project

  • Implementing User-Defined Shortcut Feature through GUI
  • Number Scroll via Mouse Wheel in the Text Editor
  • Enhanced Error Reporting & a new Error-Log Widget

The following PRs have been made during GSoC-

Work Done

1. Shortcuts-GUI

  • Improving the File-Based Approach for Shortcuts, on which I started working before the commencement of the Coding Period of GSoC.
  • A simple JSON file can now be used to override the default shortcuts for various actions in OpenSCAD.
// remove all shortcuts
"action1" : "",

// overwrite default shortcut
"action2" : "CTRL-X",
// overwrite default shortcut with multikey shortcut
"action3" : "CTRL-X, CTRL-Y",
// add shortcut leaving the default one active as default
"action4" : ["DEFAULT", "CTRL-X"],

// set multiple shortcuts
"action6" : ["CTRL-X", "CTRL-Y"],
  • Making a GUI for Shortcut Configuration.
  • Added a GUI for allowing users to set custom-shortcuts.
  • Users can set new shortcuts by selecting the action and pressing the key-sequence.
  • Added a search bar at the top of the widget, to search actions by name.
  • All the shortcuts can be reset to defaults using the ‘Reset’ button.
  • A validator for Pressed Key-Sequences.
  • Import a file from GUI to the user-config path.

2. Number Scroll via Mouse Wheel in Text-Editor:

What has been done:

  • Numerical Values can be changed by mouse wheel scroll with a modifier.
  • The modifier can be selected from Editor Preferences.
  • The step size can be configured from Editor Preferences.
  • The feature can be disabled from Editor Preferences.
  • Disabling Mouse Movements while changing numbers (causing abrupt jump when the Most-Significant-Digit, changes its size)
  • Delay Preview Until Done

3. Better Error Reporting & a new Error Log Widget

a. Introducing a new unified method to accept the messages for Errors, Warnings, Trace, etc from different parts of the application:

LOG(message_group, Location, Document Path, Message, Args.....)
LOG(message_group::Warning,inst->location(),ctx->documentPath(),"color() expects numbers between 0.0 and 1.0. Value of %1$.1f is out of range");

b. Making a new GUI Widget for logging all the Errors/Warnings kind of messages:

  • A new Dockable Error Log Widget where all the errors/warnings and other messages will be listed in the tabular form.
  • The row containing messages are selectable and jump the cursor/caret to the error/warning location inside the text-editor if the location exists.
  • An option to Hide/Unhide Error-Log in View menu.
  • A filter in the new widget to view messages belonging to a particular group.

c. Hyperlink the messages in the console, with their locations:

  • Old PRINTB() like statements in the PRs which are not yet merged, have to be replaced with a new LOG() method.


  • Testing for GUI Features is done manually, by abusing the GUI Systems and trying different interactions.
    Feedback from the mentors helped me a lot in bringing new bugs into the notice.
  • Testing of the new LOG() method introduced, is done through the already existing test-bed of OpenSCAD, which is ctests.


  • The biggest challenge for me was to jump from working on one feature to another, because they were quite different in implementation, and it took time for me to understand my tasks, before making significant progress at the start of all the three features.
  • While introducing the new LOG() method for messages, most of the tests start failing due to certain differences in the expected output. So, handling those tests made me explore the entire source-code, and it was quite challenging.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store