# From 2D to 3D in AutoCAD

> How to turn a 2D drawing into a 3D solid in AutoCAD: extrude, press pull and revolve a closed profile, add and subtract. Free online 3D solids, still partial.

In AutoCAD a solid usually starts as a 2D drawing: a closed profile, drawn as any plan is, then extruded to a height or turned round an axis, and joined to other solids or cut by them. MellowCAD's 3D solids are made the same way, with the same commands. They are still partial: there are no sweeps, lofts, meshes or rendering yet. Each section shows a session the engine draws, its history as you would type it.

## Draw a closed profile

A solid needs a closed profile: a closed polyline, a rectangle, a circle or a region. Lines that meet end to end are still separate objects: `JOIN` makes one polyline of them, or `REGION` a region. Draw the profile in plan, where typing its points is easiest.

## Extrude it

`EXTRUDE`: pick the profile, press Enter and type the height. Seen from above, a solid looks just like its profile: turn the view with `VIEW` or the ViewCube to see it, and choose how it is drawn with `VSCURRENT`.

An L profile as one closed polyline, extruded 30, seen from the south-east.

```text
Command: PLINE
Specify start point: 0,0
Current line-width is 0.00
Specify next point or [Arc/Halfwidth/Length/Undo/Width]: @80,0
Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: @0,15
Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: @-60,0
Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: @0,45
Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: @-20,0
Specify next point or [Arc/Close/Halfwidth/Length/Undo/Width]: C
Command: EXTRUDE
Current wire frame density:  ISOLINES=4, Closed profiles creation mode = Solid
Select objects to extrude or [MOde]: 1 found
Select objects to extrude or [MOde]:
Specify height of extrusion or [Direction/Path/Taper angle/Expression]: 30
Command: -VIEW
Enter an option [Orthographic]: SEI
Regenerating model.
Command: VSCURRENT
Enter an option [2dwireframe/Hidden/Conceptual] <2dwireframe>: H
Command: ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or [All/Extents/Previous/Scale/Window/Object]: E
Command: ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or [All/Extents/Previous/Scale/Window/Object]: 0.8x
```

## Press and pull an area

`PRESSPULL` needs no profile: click inside any closed area, even one bounded by separate lines, and type the height. Clicked on a solid's face, it pushes or pulls that face.

A closed area, pressed and pulled from inside: it becomes a solid.

```text
Command: PRESSPULL
Select object or bounded area:
2 loops extracted.
1 Region created.
Specify extrusion height or [Multiple]: -8
1 extrusion(s) created
Select object or bounded area:
Command: -VIEW
Enter an option [Orthographic]: SEI
Command: ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or [All/Extents/Previous/Scale/Window/Object]: 0.8x
```

## Revolve it

`REVOLVE` turns a profile round an axis: pick the profile, give the axis by two points, an object or the X, Y or Z axis, then the angle, a whole turn by default.

A half section revolved round the Y axis.

```text
Command: REVOLVE
Current wire frame density:  ISOLINES=4, Closed profiles creation mode = Solid
Select objects to revolve or [MOde]: 1 found
Select objects to revolve or [MOde]:
Specify axis start point or define axis by [Object/X/Y/Z] <Object>: Y
Specify angle of revolution or [STart angle/Reverse/EXpression] <360>:
Command: -VIEW
Enter an option [Orthographic]: SEI
Command: ZOOM
Specify corner of window, enter a scale factor (nX or nXP), or [All/Extents/Previous/Scale/Window/Object]: 0.8x
```

## Add and subtract solids

`UNION` makes one solid of several, `SUBTRACT` takes one or more away from another, and `INTERSECT` keeps what they share. A hole is a cylinder subtracted from the solid it goes through.

A cylinder subtracted from a box: a hole through it.

```text
Command: SUBTRACT
Select solids, surfaces, and regions to subtract from ..
Select objects: 1 found
Select objects:
Select solids, surfaces, and regions to subtract ..
Select objects: 1 found
Select objects:
```

## What next

- The 3D [exercises](https://mellowcad.com/docs/exercises.md): [a mounting plate](https://mellowcad.com/docs/exercises/mounting-plate.md) made of regions and one extrusion, [a pulley](https://mellowcad.com/docs/exercises/pulley.md) revolved from its section and [a bearing block](https://mellowcad.com/docs/exercises/bearing-block.md) united and drilled.
- `3DORBIT` turns the view with the mouse, and `VSCURRENT` shades the faces.
