The Cube() primitive command will add a 6 sided figure with parallel sides.
In it’s basic form the cube(); command does not need any parameters.
You can create a cube with the unit measure of 1 by adding the above command, here is the result:
cube();
![](https://www.openscad.info/wp-content/uploads/2020/06/Selection_763.png)
If you add a single parameter you can add cubes of any uniform size
cube( 7 );
![](https://www.openscad.info/wp-content/uploads/2020/06/Selection_764.png)
To change cube dimensions individually must use a vector of values. They are in the order of X, Y , Z and they must be non-zero. Zero values will not generate an error but nothing will be rendered.
cube( [7,9,1]);
![](https://www.openscad.info/wp-content/uploads/2020/06/Selection_765.png)
The final parameter available in centering. This places the origin of the cube in the volumetric center of the cube.
cube([10,10,10],center=true);
![](https://www.openscad.info/wp-content/uploads/2020/06/Selection_766.png)
That’s really all there is to the cube. Not very complicated at all.