IPXXD is where the top of the enclosure allows entry of a test wire, but should not touch anything live within 100mm of penetration. It is not limited to 1mm size, but 100mm penetration.
IPXXD affords the same level of protection as IP4X, in theory
whilst IPXXB affords the same as IP2X, in theory
This is general understanding. However the IPXXB and IPXXD are subjected to more stringent testing with application of probes under test.
Think of it this way..
IP2X and IP4X represents degrees of protection for the live parts against the penetration of solids and liquids - it's protecting the live parts within.
However IPXXB and IPXXD is designed and tested to protected the person (or livestock) from accessing the live parts within - hence the use of probes and test fingers under their manufacture.
If you are protecting against dust and liquid penetration you use IP2X and IP4X etc, if its to protect people from touching live parts, it's the IPXXB and IPXXD.
I'm waffling again..