sorry is mine as well, but what was the crime they charged u under? also frankly speaking, in Thailand, as a foreigner, if we are involved in some legal case, the only solution is to use money; but due to language barrier, network wise, it is hard for us to find the right contact from the right channel. :-( it is something you need to look for Thai community rather than in here with a bunch of foreigners who are unlikely to be well connected in Thai government... pay a high price to hire an International law firm to help you is more practical...
Non-B is usually applied when the applicant is in overseas for work and business purposes , but under the circumstances that u can convert to Non B visa if you already have a valid work permit from previous Non B visa but exit Thailand to get a travel visa, then when u reenter, u can convert your travel visa to a Non-B visa, but it is called “convert “ rather than “apply”.