"""Parallel dowel pin (ISO 8734 style), plain cylinder with chamfered ends. Its axis is Z, from the origin up.""" from steve import Model diameter = 4.0 # mm Nominal diameter length = 16 # mm Length chamfer = min(0.1 * diameter, 0.25 * length) model = Model() with model.sketch("profile", on="XZ", name="Profile") as sk: sk.polyline("outline", [(0, 0), (diameter / 2 - chamfer, 0), (diameter / 2, chamfer), (diameter / 2, length - chamfer), (diameter / 2 - chamfer, length), (0, length)]) model.revolve("pin", "profile", axis="Z") result = model.result()