Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Extrude into 3D

Now, we want to convert the three 2D sketches into a 3D geometry part. This can be achieved by extrusion. The corresponding µcad operation is called std::ops::extrude.

As a first example, let's take the cap of the brick and extrude it by 1.0 mm into 3D:

test

use std::ops::extrude;
use std::geo2d::Rect as Cap;

width = 15.8mm;
height = 31.8mm;

Cap(width, height)
    .extrude(1.0mm);

This will create a box with dimensions 15.8 ⨯ 31.8 ⨯ 1.0 mm.

Note that with std::ops::extrude() we will extrude along Z-axis by default.

Picture