Apple Pencil case. Made for the first generation of pens, but the case should fit the second generation since it is shorter. Could move around more though. Has space for an extra tip and for the end cap.
Just print the two parts and snap them together by laying the lid on top of the bottom offset so that the end stops is placed within the rail span and push down.
The author hasn't provided the model origin yet.