Home / How To / Code a charm bracelet: 8 steps (with pictures)

Code a charm bracelet: 8 steps (with pictures)



Context

3D modeling and 3D printing are already fun, engaging, high-tech activities. One of the coolest features of the 3D printing technique is that objects can be created with internal cavities that cannot be manufactured using traditional methods. A fascinating application of this ability is the creation of articulated objects that have hinge parts and are movable directly from the building plate.

In this activity, designers use geometric and mathematical concepts and experiment with "ChainCoding" – generating code for charm bracelets / chains based on the sample code in this guide. Designers choose the number of charms in the chain. The only limitation is the size of the print bed on the 3D printer.

Since 3D modeling and printing technology becomes more reliable, cheaper and easier for beginners to use, they become useful tools for practicing other skills such as coding, mathematics and logic. This activity is based on Tinkercad Codeblocks where the users "design with code" – making 3D models with traceable blocks of code.

Functions of code blocks:

  • There are calculation blocks for common mathematical functions, including: () + – * * /.
  • Objects can be moved around the design space on standard X, Y, Z axes and can also be scaled along these axes.
  • Designers can create and set variables for objects and for mathematical quantities and can call them into mathematical calculation blocks.
  • Counting and Repeating Loops are Available to Easily Copy Items
  • All common Tinkercad 3D modeling capabilities to build with primitive shapes that can be fixed or hole and group to create new shapes.

*********************************************** **************************

The first step is to get acquainted with the block-based programming environment of Tinkercad Codeblocks. See the Quick Start Guide on Codeblock's website to learn how to snap and speed blocks. Explore and practice these studies:

1. Work plan and origin

a. The work plan measures 200 mm x 200 mm. The origin is the midpoint where X = O, Y = O and Z = O

b. Objects enter the work plane with their centers of origin. To set items to specific positions, it is necessary to move them in the X, Y and Z directions. One convenient way to do this is to move the object by half the size in the X, Y and Z directions. Some objects allow you to set the width, length and height when they are created, others that you can determine by moving them around.

2. Moving

a. Choose a shape. Click and drag it to the black workspace.

b. Find the "Move" function. Click and drag it into the code space until it attaches to shape:

c. Play around with the values ​​X, Y and Z individually.

  • At what position do all shapes start when they are imported?
  • What happens when you make a value negative?

Example:


Source link