The Run Button
The toolbar in Codeblocks now looks like this:
Following the Speed: slider is the “Run” button. Clicking on the 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:
- Estimate the values of the size and placement parameters.
- Press the Run button to see the simulation of codeblocks being executed.
- Use the View-Cube to view your object for possible errors.
- Make better estimates of the size and placement parameters.
- Press the Reset button (the curved arrow in the tollbar).
- 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.
During a simulation holes can be difficult to see. Try:
- Change the color of non-hole shapes to white.
- Change a hole to a color. Of course it is no longer a hole, but you may be able to see where it is.
- 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.
For the Codeblocks code to create a table see: https://medium.com/@ronm333/a-table-using-codeblocks-example-1-66a1c0a5bfb