--- jupyter: description: 'Solids from planex2d geometry: Pad and Pocket extrude faces and sketches into OpenCASCADE solids and cut them out, up to a length, a plane or a face, with the names of the profile on the faces of the solid.' --- # 3D
Pad and PocketPad and Pocket A unit cube with a square tunnel through which a larger cube passesExample Prince Rupert's cube: a cube through a cube A cross vault and the Steinmetz solids of its barrelsExample Vaults and Steinmetz solids
- [Pad and Pocket](pad-pocket.md) planex2d is a 2D kernel, but every face and sketch lies on a plane that can be placed anywhere in 3D, and it becomes a solid in OpenCASCADE. `px.Pad` extrudes a face, a shape or a sketch into a solid, and `px.Pocket` cuts such an extrusion out of a solid, either by a length or up to a plane or a face. The side faces of the solid carry the names of the profile edges they come from, so they can be selected by name for meshing and boundary conditions. A flat face of a solid works wherever planex2d takes a plane. A sketch is drawn on it with `px.Sketch(face)`, and a pocket runs up to it with `until=face`, so the next feature of a part is built on the faces of the last one. Solids need the OpenCASCADE bindings, the optional package planex2d-occ (`pip install "planex2d[occ]"`, which brings netgen).

In this section

Pad and Pocket
Pad and PocketSolids from faces and sketches, extruded and cut with OpenCASCADE, named after the profile.
## Everything at a glance | | | |---|---| | **Pad** | `px.Pad(profile, length, length2=0)`, or `until=` a plane, a face, or a planex2d face, shape or sketch | | **Pocket** | `px.Pocket(target, profile, length)`, or `until=` as for Pad, and `px.first` or `px.last`, the first or last flat face of the target along the direction | | **Direction** | The plane's normal by default, for a pocket its negative; `dir=` any direction that leaves the plane, `reverse=True` the other way | | **Sketches on solids** | `px.Sketch(face)`, `px.QuickSketch(face)` and `px.Plane(face)` on a flat face of a solid | See [Placing a sketch](../sketch/placement.md) for sketches on the faces of solids, and [OpenCASCADE](../../integrations/occ/index.md) for lofts, projections and sections of solids.