3D

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

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 for sketches on the faces of solids, and OpenCASCADE for lofts, projections and sections of solids.