User:Amarjeet Singh Kapoor/GSoC2016/Project

< User:Amarjeet Singh Kapoor
Revision as of 08:29, 6 May 2016 by Amarjeet Singh Kapoor (talk | contribs) (Detailed Description)

Form-based Customization

Personal Information

Name:Amarjeet Singh Kapoor

Email Address:

IRC Username: amarjeet

Phone number: +91 8568988521


Brief Background Information

I am 3rd year B.Tech student of Computer Science and Engineering at Guru Nanak Dev Engineering College, Ludhiana, India.

A few of the numerous projects I have worked on are briefed below:

  • I have worked on Image Processing using OpenCV.
  • I have made a project "Civil Octave" for the Analysis of Dynamics of Structures.
  • Currently, I am working on completely new idea i.e SIM (Structure Information Model). Idea behind the project is modeling the structure based on information and storing it in database so that information can be used for analysis.

For more details, my Github account can be referred:

I have knowledge of C++, Python, Shell scripting, HTML, CGI, SQL, LaTeX, doxygen, etc.

Project Information

Title: Form based script parameterization

An Overview

This project is based on the User interface of OpenSCAD Software. The main idea of this project is to provide users with features to change certain variables or parameters in .scad file using form like interface which may include slide bar, check box, text box, ranges etc. so that we can visualize the changes in output on the basis of input side by side instead of manually changing different parameters. It will help the user able to create the templates for given model which can further be changed as per user’s requirements.

Detailed Description

The basic implementation of the this project is almost done. There is need to modify some existing features and to enhance its functionality so that it could be more interactive and user friendly. We can improve its UI for parameter window by adding the following new features under the scope of this project

  1. Option to specify input widget

    At present, input type widget in the output form is automatically identified based upon the values specified by user in annotation.

    With this feature we want to provide additional functionality to users that gives them additional control about the type of input widget i.e they can choose between different widgets like spinbox, vertical slider, horizontal slider, drop box, text box etc for getting the value of parameter through parameter window from user. And we can provide some more features like specify the increment value in range widget and some additional features like:

    1. We can use syntax like @parameter(["spinbox"],[1:10],[2]) which will make a spinbox with value range between 1:10 and will increment next value by 2 as we increase values in spinbox.
    2. If user specifies @parameter([1:10]) then it will take the default input widget like it's working in its present state.

    We will extend the code in ParameterEntryWidget::setValue()for implementation purpose. Image05.png

  2. Grouping of parameters

    At present, the parameter widget are shown as individual widget. We can group the related or alike parameters. This feature will help in grouping the parameters which are related and we can make the group of parameter collapse or expand to provide better user interface and more useful for bigger models.

    One of the two syntaxes from below can be used:

    1. @group("name") before @parameter() to specify which group the parameter belongs else they will be displayed as individual parameters.
    2. We can use @parameter( , , group="name") where group is optional parameter in @parameter annotation.

  3. Reflecting changes made to variable's value through form

    At present, if we make any changes to the value of parameterized variable, we cannot save those changes by assigning that new value to the variable automatically and for that we have to manually change that variable's value.

    A save button can be provided with the help of which the values given through variables can be saved i.e. changes we made to model through form are temporary and don't exist after we open that model file again but we can make it permanent in program.

    e.g. We can give a save button on top of parameter list which will save the new values in the .scad file and we can give optional save button for saving the individual parameter in parameter window.

  4. Make UI better

    We can make UI of the parameter window better by providing additional features like:

    1. Make individual input widgets dockable so that we can adjust the position of the individual input widgets.
    2. Make description hover the input widget when we hover cursor over that input widget.
    3. Make the input widgets more space efficient.
    4. Option to minimize the parameter and library window instead of just hide option.

    And their can be many more based upon the user's feedback.

  5. Resolve issues found with existing code

    There are some issues with existing code like if we change the value in @parmameter then changes are reflected on parameter window but if we change the value of parameterized variable then no corresponding change occur on the parameter window for viewing new input widget based upon the change in value of parameterized variable we have to reopen the file. e.g. For an instance in following screenshot 1, everything is correct.

    screenshot 1

    But if the value of G=False and resolution=[10,34,45] are changed from their initial value of G=0 and resolution=10, than result is screenshot 2 but instead it should be as per screenshot 3 which is obtained on re-opening the document.

    screenshot 2

    screenshot 3

  6. Saving scad file without annotation (optional)

    After making all the changes in model we can save those changes in file without annotation code which will make scad file backward compatible.


Community Bonding Period

  • Interaction with the community and get to know about the existing code.
  • Study existing parameter widget code and will try fixing some existing bugs.

Week 1

  • Write prototype code to add more widget options.
  • Take community feedback on it.

Week 2

  • Check each use case associated with it.
  • Finalise the code for specifying the input parameter widget.
  • Write documentation for this part of code.

Week 3

  • Revising parsing and bison which will be used later this week.
  • Figure out special features which can be associated with each input widget like step value for spin box etc.
  • Start writing prototype code for that.

Week 4

  • Complete prototype code for all use case.
  • Take community feedback on it.
  • Figure out way to solve existing problems with associated with parameter window.

Week 5

  • Complete study of bison.
  • Solving problems associated with parameter window.
  • Documenting the new code.

Week 6

  • Study the existing code which can be used for assigning new values to parameterized variables.
  • Writing examples for new annotation syntax.
  • Add feature to change single parameterized variable in .scad file.

Week 7

  • Add feature of assigning new values of parameterized variable to variables in .scad file.
  • Documenting the code till now.
  • Take community feedback.

Week 8

  • Add feature of Saving scad file without annotation.
  • Documentation of work done so far.

Week 9

  • Start working on feature of Grouping of Parameters.
  • Documenting the code.
  • Take community feedback.

Week 10

  • Test all the code till now.
  • Solving issues found by other people on using this code.
  • Study the UI of some existing software and take people's feedback on how to improve it.
  • Write example .scad file for the new features added after mid term.

Week 11-12

  • Take community feedback on UI of parameter window.
  • Improve UI of parameter window.
  • Write user document for all features added during this time.

Week 13

  • More testing and cleaning.
  • Time to make up for missed milestone (if any).

Week 14


Time Availability

I will be available 40 hours / week, if needed can spend more .

Why OpenSCAD?

I liked the concept of OpenSCAD (CAD for programmers) during the different seminars that were conducted regarding the OpenScad in our group. When I saw your project of Form based script parameterization I found it really interesting that we can make a template of the model and then change the model based on the form based parameter.

Why me?

I am really enthusiastic to contribute in such a project which can improve user experience. I believe that I am a quick learner and this opportunity would enhance my skills. I truly feel that I will be maintaining and cherishing this bond in terms of time-to-time contribution in future also and would be a valuable asset to the organization.