is there a way to get all the connectedparts without the supported joint types?

if you know anything please let me know.