This is a remix of the D1 Mini DIN Rail Case 1TE, RS485 by https://www.thingiverse.com/thing:3337686.
Modifications: - Slightly resized to accept the D1 ESP32 module (which is bigger than the 8266 version) - it sticks out about 3mm more. - The RS485 board has moved to the back by 3mm, so now fits only without the screw terminals. - The small clips on the lid have been slightly reinforced with a small bevel. - Added 0.2mm (approx) clearance between lid and back of the case for a slightly better fit. - USB port hole moved slightly for better alignment with the port.
I found that the clip retainer bar wasn't needed - PETG is a slightly 'sticky' material, so the clip is retained by friction.
The ESP32 fit isn't perfectly well but good enough.