# SLICE in AutoCAD

> How AutoCAD's SLICE (SL) works, prompt by prompt: the solids, a plane by two points, 3points, an object or the UCS, then the side to keep. Try it free online.

SLICE cuts 3D solids with a plane and keeps the part on one side of it, or both parts as two solids. It asks for the solids to slice, until Enter: as in AutoCAD 2027, a set selected before it is dropped and asked for again, and what is not a solid is passed over. Then the plane: by default you give two points, and it stands upright through them, square to the UCS's XY plane; the options give it another way. Last, a point on the side to keep, or Enter to keep both.

Every solid of the set is cut by the same plane. One that the plane misses, or only touches on a face, along an edge or at a corner, stays as it was, and SLICE says so. A cut solid is no longer a box or a cylinder, and has no history. The whole command is one undo step. MellowCAD's 3D is still partial: solids exist, surfaces and meshes do not.

- **Command:** `SLICE`
- **Aliases:** `SL`
- **Panel:** [Modify](https://mellowcad.com/docs/commands.md#modify)
- **Try it:** [Open the editor](/draw), type `SL` and press Enter.

## At the command line

The engine draws it and writes its history as you would type it: the prompts in AutoCAD 2027's order, with the same option letters.

A cylinder sliced through its axis by two points, the half on the picked side kept: seen from the south-east.

```text
Command: SLICE
Select objects to slice: 1 found
Select objects to slice:
Specify start point of slicing plane or [planar Object/Surface/Zaxis/View/XY/YZ/ZX/3points] <3points>: 0,-30
Specify second point on plane: @0,60
Specify a point on desired side or [keep Both sides] <Both>:
```

## Options

### `planar Object` (`O`)

Takes the plane of an object you pick: a circle, an ellipse, an arc, a 2D polyline or a planar spline, a tilted circle too. A line, or the solid itself, has no plane of its own: it says `Unable to extract the plane of the selected object.` and asks again. Enter ends the command.

### `Surface` (`S`)

Asks for a surface to cut along. MellowCAD has no surfaces yet, so a pick says `No surfaces selected.`, and Enter ends the command.

### `Zaxis` (`Z`)

Asks for a point on the plane, then a point on its Z axis, the line square to it. The two cannot be the same point.

### `View` (`V`)

The plane parallel to the screen, through a point you give; Enter takes 0,0,0.

### `XY`

The UCS's XY plane, through a point you give: a point at a height makes a level cut there. Enter takes the UCS's origin.

### `YZ`

The UCS's YZ plane, through a point you give; Enter takes the UCS's origin.

### `ZX`

The UCS's ZX plane, through a point you give; Enter takes the UCS's origin.

### `3points` (`3`)

Three points on the plane, which may then tilt any way. It is the first prompt's default, so Enter there chooses it. The second point must differ from the first, and the third must not lie on the line through them.

### `keep Both sides` (`B`)

At the side prompt, and its default, so Enter chooses it: both parts are kept. The solid keeps one, and the other becomes a new solid with the same layer, colour, linetype and lineweight, not the current ones. A point instead keeps the side it lies on and discards the other; a point on the plane is refused.

## What it does not do yet

Surfaces, as the cutting plane and as objects to slice, and meshes. A planar 3D polyline as the plane's object, which AutoCAD takes. A torus or a revolved solid cut neither square to its axis nor along it, and the other cuts MellowCAD has no exact form for yet, which say that one boolean operation failed.

[What it does and still lacks, in detail (in English)](https://github.com/ovelilla/mellowcad/blob/main/docs/coverage/modify.md#slice--sl--es-corte--co--pt-br-fatiar--fat)

## Questions

### What is the shortcut for SLICE in AutoCAD?

`SL`, then Enter or Space. The full name works too, and `_SLICE` in any language of AutoCAD.

### How do I use SLICE in AutoCAD 3D?

Select the solid and press Enter. Pick two points the cut runs through: the plane stands upright through them. Then pick a point on the side to keep, or press Enter to keep both halves and move one away with [`MOVE`](https://mellowcad.com/docs/commands/move.md). For a cut at an angle, choose `3points` and give three points on it.

### Can SLICE cut lines or 2D objects?

No: SLICE cuts 3D solids, and passes lines, regions and blocks over; a set of them alone ends the command. To cut 2D objects, use [`TRIM`](https://mellowcad.com/docs/commands/trim.md) or `BREAK`. In AutoCAD SLICE also cuts surfaces and meshes, which MellowCAD does not have yet.

### Why does SLICE say the slicing plane does not intersect the solid?

Because the plane misses it, or only touches it on a face, along an edge or at a corner: that solid is left whole. Check how the plane was given. With two points it stands upright, so two points on a solid's top face cut it vertically, not level; for a level cut choose `XY` and give a point at the height of the cut.

## Related commands

- [SECTION](https://mellowcad.com/docs/commands.md#section): Section
- [SUBTRACT in AutoCAD](https://mellowcad.com/docs/commands/subtract.md)
- [UNION in AutoCAD](https://mellowcad.com/docs/commands/union.md)
- [EXTRUDE in AutoCAD](https://mellowcad.com/docs/commands/extrude.md)
