1. A method of generating a model of a physical fastener, comprising: receiving, by a computer-aided design (CAD) system, one or more instructions identifying a geometric entity; generating a fastener model including the geometric entity and one or more associated elements, the one or more associated elements depending on the geometric entity and characteristics of an associated socket model.