Printable Self-Mating Mushroom-Head Pin Fastener

This project demonstrates a simple, fully printable self-mating fastening system based on an array of identical mushroom-head pins. Both mating halves are identical, eliminating the need for separate male and female components. When pressed together, the mushroom-head pins engage with the gaps between the opposing pins, forming a secure, reusable mechanical connection.

The design is intended as a universal fastening concept rather than a finished product. It can serve as a starting point for creating custom detachable mounting systems, closures, fixtures, wearable accessories, organizers, equipment mounts, removable panels, enclosures, prototypes, and many other applications where quick attachment and removal are desirable.

Three basic versions are included, featuring different pin spacing and therefore different locking characteristics:

Dense – the strongest and most rigid connection. It requires noticeably more force to engage and separate but provides the highest holding strength.
Medium – a balanced compromise between retention and ease of use.
Sparse – the easiest version to connect and disconnect, making it suitable for applications requiring frequent removal.

The most appropriate version depends entirely on the intended application, desired holding force, and printing material. The included models are intended as reference designs and starting points for further customization rather than universal, ready-to-use solutions.

The geometry is intentionally simple and can be easily modified to suit specific requirements. Parameters such as pin diameter, head diameter, spacing, height, and overall dimensions can be adjusted to achieve different insertion forces, retention strength, flexibility, and printing characteristics.

This project demonstrates the underlying fastening principle and provides a practical foundation for developing custom self-mating fastening systems for virtually any application where a compact, reusable, mechanically interlocking connection is needed.

UPD1: 18.07.2026: A parametric .scad file (OpenSCAD version 2021.01) was added. The mushroom's head can now be made conical by "setting profile_points = 1".
Direct mesh generation is used instead of CSG to avoid slow boolean processing.

UPD2: the parametric model now has two render modes: MESH & CSG
MESH — fast generation via direct mesh. It may have minor topology issues, but works fine with most slicers.
CSG — slower generation via true boolean operations. Produces a clean solid with correct topology for final export. I would be glad if someone could optimize this mode.