Stepping Through Tinkercad’s Codeblocks and Viewing Holes

Ron Mourant
2 min readOct 28, 2018

The Run Button

The toolbar in Codeblocks now looks like this:

Toolbar at Upper-Right

Following the Speed: slider is the “Run” button. Clicking on the Run button

Run Button

will run the simulator in a continuous manner at the speed set in the Speed-slider. This is very helpful when determining the values for the size and placement parameters of shape codeblocks. The general procedure is:

  1. Estimate the values of the size and placement parameters.
  2. Press the Run button to see the simulation of codeblocks being executed.
  3. Use the View-Cube to view your object for possible errors.
  4. Make better estimates of the size and placement parameters.
  5. Press the Reset button (the curved arrow in the tollbar).
  6. Press the Run Button again.

The Step Button

A recent welcome addition is the “Step” button. This is for running through codeblocks in a step-by-step manner.

When you press the Step button, the first codeblock is highlighted. Pressing the spacebar advances to the next codeblock. This allows you to examine what the highlighted codeblock has done. Very useful!

Hint: In some cases, you may want to temporarily remove the Create Group Codeblock before pressing the Run or Step button. This allows viewing of the simulation just before addition and subtraction operations are executed.

Viewing Holes

During a simulation holes can be difficult to see. Try:

  1. Change the color of non-hole shapes to white.
  2. Change a hole to a color. Of course it is no longer a hole, but you may be able to see where it is.
  3. Use the View-Tool in the workplane to see all six views. Drag the view-cube and then click on the face that you want to view.

Here is an example of changing the color of a Box shape to white and making the two holes yellow and green when designing a table.

Viewing holes when making a table.

For the Codeblocks code to create a table see: https://medium.com/@ronm333/a-table-using-codeblocks-example-1-66a1c0a5bfb

--

--

Ron Mourant

TinyML, AI, Edge Impulse, Arduino, Raspberry Pi, Pickleball