Sounds like you could be thinking of a contour gauge?
Help! It's a tool. It has pins that retract and it's used to find a complex shape. Anyone know what it is called?
Picture of a contour gauge:
https://www.lowes.com/pd/General-Tools-Instruments-6-in-Stainless-Steel-Contour-Gauge/1016371