Automatic generation of 3D unstructured high-order curvilinear meshes