Catalyzes the conversion of 7,8-dihydroneopterin into 6-hydroxymethyl-7,8-dihydropterin, a biosynthetic precursor of the vitamin tetrahydrofolate. Can use L-threo-dihydroneopterin and D-erythro-dihydroneopterin as substrates for the formation of 6-hydroxymethyldihydropterin, but it can also catalyze the epimerization of carbon 2' of dihydroneopterin and dihydromonapterin. 7,8-dihydroneopterin = 6-hydroxymethyl-7,8-dihydropterin + glycolaldehyde Cofactor biosynthesis; tetrahydrofolate biosynthesis; 2-amino-4-hydroxy-6-hydroxymethyl-7,8-dihydropteridine diphosphate from 7,8-dihydroneopterin triphosphate: step 3/4. Homooctamer. Forms a hollow cylinder assembled from two ring-shaped tetramers. Expressed in roots, leaves, stems and siliques. Belongs to the DHNA family.