Makertron Tutorials

Makertron Teapot Tutorial 01

Interface Overview



The tool bar contains the non dynamic parts of the scene that you cannot edit. The first button saves your complete project to server. Second exports your project out to a zip containing stl files. [ Third button takes you to the editor. – depreciated ] 

*Like most things in the Makertron how an stl is exported directly depends on how you configure your model. If you completely unifiy your model you will get a single STL. If you break your model up in to parts each of those will be contained with the zip file seperately. STL files are currently exported in the STL binary format. 

Main Display

display In the centre is the main display area which contains the tool bar  and the viewing area for your project. Below this is the debugging window which will tell you if you have any errors and if the Makertron has successfully managed to process your project. 


Panel Area

accordion Panels are dynamically generated at load time based on the code you have written. A project should always begin with an ‘About’ panel.  Each panel that is stacked in the accordion will load a set of components associated with that panel in to the menu space on the right hand side of the interface. In the  default project you begin with you will see that the ‘About’ panel loads three sliders in to the right hand interaction menu when selected. These are not currently connected to anything and have no descriptions. We will demonstrate in this tutorial how to get them to do something useful to your model.

In the editor where you access your code each panel entry is defined as a panel at the start of each module.  Each module that you write will typically begin with a panel.  If you include no panels you will have no interactivity aside from the main display and no interaction menus will be selectable. The very first line in the root of your project should always be a panel definition. 

Interaction Menus


Interaction menus are also dynamically generated at load time based on the code you have written. Each interaction menu will typically contain a combination of sliders spinners and editing fields to let you tweak specific aspects of your model as you develop it. These changes can then be saved and in turn will be reflected in your code.

*Both the left hand panels and the right hand menu area are dynamically generated based on the code that you write when your model is loaded. This is what seperates the Makertron from pure computational solids generation systems like OpenSCAD. As you develop your project you are also developing an interface to interact with that project. In the coming update you wont need to switch between the editor and graphical display area. It will be in the same window.

 Associating A Slider With Code

All widgets in the right hand interaction menus are associated with code that you create in the editor. At the moment in the default teapot example you will see three sliders associated with the about panel when you select it ( select about panel interaction menu appears on right ) . They currently have no names and are not associated with anything.


If you go in to the editor edit and look at the start of the first  module you will see three lines of code each of them associated with the about  panel.  We will edit the first one.


{ “type”: “set”, “panel”: “About”, “note”: “”, “value”: “teapot_body_enable”, “operation”:”range|0|1|1″ }

Set commands will typically intialize the variable and generate a widget.  The variable and widget can be defined even if you do not use them right away.

In this case we are initializing a variable called “teapot_body_enable” and associating it with the panel “About”. However we have not assigned it a note yet or associated it with anything in our project.  Change the code to the following

{ “type”: “set”, “panel”: “About”, “note”: “This Enables Teapot“, “value”: “teapot_body_enable”, “operation”:”range|0|1|1″ }

A range slider enables you to slide across a number range. This number range can either be  an interger range or floating point value. At the moment the range slider is set as a toggle between 0-1 and defaults to 1.   That is “range|0|1|1.

*The operation field in a set is where you define what sort of variable you want to set and also describes what widget will be defined for that variable. You can set spinners. Array fields. Bezier fields. Menu fields. Color Fields. More of these fields will become available as the interface develops. Controls for Chamfers. Complex organic surfaces. 

Now we want to get this slider to do something useful.  Scroll down to the bottom of the default. jsn module.  The final function is a union. It unifies together the body of the teapot and the handle. It currently has a state of 1 which means it is enabled.  Change that state to “teapot_body_enable”.


Then click save. When you return to the main window from the editor you should now see the first slider in the interaction menu is labled.


Drag it to the left and the teapot and handle should both disable. Drag it to the right and it should be enabled again. You will also see that when you disable the unified teapot body and handle that it is no longer exported in the STL.

In the next tutorial I will demonstrate how to union the teapot body and handle with the spout.